final case class Stepper(rate: MaybeRate, trig: GE, reset: GE = 0, lo: GE = 0, hi: GE = 2147483583, step: GE = 1, resetVal: GE = 0) extends SingleOut with Product with Serializable
A pulse counting UGen. Each trigger increments a counter which is output as a
signal. The counter wraps inside the interval from lo to hi (inclusive).
That if you use a lo other than zero, you might want to adjust resetVal as
well. Stepper always starts with the value in resetVal , no matter what lo
is or whether the reset trigger is high or not.
- trig
The trigger signal which increments the counter. A trigger happens when the signal changes from non-positive to positive. Note that if the UGen is created with the trigger initially high, the counter will also be incremented immediately. Thus a
Stepper.kr(Impulse.kr(1))will begin by outputting1. If you want to avoid this, you could their subtractImpulse.kr(0)from the trigger input, or setresetValtohi. E.g.Stepper.kr(Impulse.kr(1), lo = 0, hi = 4, resetVal = 4)will produce the sequence 0, 1, 2, 4, 0, ...- reset
A trigger which resets the counter to
resetValimmediately.- lo
The minimum value output. For a decremental
stepvalue, the counter jumps tohiif it were to fall belowlo.- hi
The maximum value output. For an incremental
stepvalue, the counter jumps toloif it were to rise beyondhi. Note that values greater than0x7FFFFFBF(the default) cause numeric overflow and the UGen to malfunction.- step
The amount by which the counter increases or decreases upon receiving triggers. Note that if you use a decremental counter, still
lomust be the minimum andhimust be the maximum value output. Iflo>hi, the UGen behaves wrongly. In the case of decremental counter, setresetValtohi. E.g. to count from 4 down to 0, useStepper.kr(trig, lo = 0, hi = 4, step = -1, resetVal = 4), or, if you want to ignore an initial high trigger, you could doStepper.kr(Impulse.kr(1), lo = 0, hi = 4, step = -1, resetVal = 0)-- soresetValislobut due to the initial trigger fromImpulsetheStepperwill in fact start outputting from4.
- See also
- Alphabetic
- By Inheritance
- Stepper
- Serializable
- SingleOut
- SomeOut
- Lazy
- GE
- UGenSource
- Expander
- Lazy
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Stepper(rate: MaybeRate, trig: GE, reset: GE = 0, lo: GE = 0, hi: GE = 2147483583, step: GE = 1, resetVal: GE = 0)
- trig
The trigger signal which increments the counter. A trigger happens when the signal changes from non-positive to positive. Note that if the UGen is created with the trigger initially high, the counter will also be incremented immediately. Thus a
Stepper.kr(Impulse.kr(1))will begin by outputting1. If you want to avoid this, you could their subtractImpulse.kr(0)from the trigger input, or setresetValtohi. E.g.Stepper.kr(Impulse.kr(1), lo = 0, hi = 4, resetVal = 4)will produce the sequence 0, 1, 2, 4, 0, ...- reset
A trigger which resets the counter to
resetValimmediately.- lo
The minimum value output. For a decremental
stepvalue, the counter jumps tohiif it were to fall belowlo.- hi
The maximum value output. For an incremental
stepvalue, the counter jumps toloif it were to rise beyondhi. Note that values greater than0x7FFFFFBF(the default) cause numeric overflow and the UGen to malfunction.- step
The amount by which the counter increases or decreases upon receiving triggers. Note that if you use a decremental counter, still
lomust be the minimum andhimust be the maximum value output. Iflo>hi, the UGen behaves wrongly. In the case of decremental counter, setresetValtohi. E.g. to count from 4 down to 0, useStepper.kr(trig, lo = 0, hi = 4, step = -1, resetVal = 4), or, if you want to ignore an initial high trigger, you could doStepper.kr(Impulse.kr(1), lo = 0, hi = 4, step = -1, resetVal = 0)-- soresetValislobut due to the initial trigger fromImpulsetheStepperwill in fact start outputting from4.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- lazy val hashCode: Int
- Definition Classes
- UGenSource → AnyRef → Any
- val hi: GE
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val lo: GE
- def makeUGen(_args: Vec[UGenIn]): UGenInLike
- Attributes
- protected
- Definition Classes
- Stepper → UGenSource
- def makeUGens: UGenInLike
Abstract method which must be implemented by creating the actual
UGens during expansion. - final def name: String
- Definition Classes
- UGenSource
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val rate: MaybeRate
- val reset: GE
- val resetVal: GE
- val step: GE
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val trig: GE
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated