Interface DoubleSignalSource
- All Superinterfaces:
AbstractSignalSource,CompilableDataFlow,DoubleSupplier
- All Known Subinterfaces:
DoubleADSR,DoubleClockedSignalSource
- All Known Implementing Classes:
CompilableDoubleStoredSignalSource,DoubleClockedSignalSource.AbstractRandom,DoubleDelay,DoubleEnvelope,DoubleFMOsci,DoubleFractionalDelay,DoubleMultiDelay,DoubleMux,DoubleOctaveRepeatingTabledTuning,DoubleOscillator,DoublePost,DoubleProcessMux,DoubleSaH,DoubleSequencerColumn,DoubleSignalArrayPort,DoubleSignalPort,DoubleSignalSourceChooser,DoubleSignalSourceChooser.OfEnum,DoubleSignalSourceChooser.OfEnumInt,DoubleSignalSourceChooser.OfInt,DoubleStoredSignalSource,DoubleTableOscillator,DoubleUpsamplingSignalSource
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
double.
This basic interface is neutral with respect to whether values may change at arbitrary times or synchronously with respect to a clock, and to whether values are computed on the fly when demanded, or stored when available and then just retrieved.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault DoubleSignalSourceabs()Returns a new signal source whose value is the absolute of the value of this signal source.default DoubleSignalSourceadd(DoubleSignalSource other) Returns a new signal source whose value is the sum of the simultaneous values of this and another signal source.default DoubleSignalSourceasDouble()default FloatSignalSourceasFloat()default IntSignalSourceasInt()default DoubleSignalSourceceil()static DoubleSignalSourcechoose(BooleanSignalSource condition, DoubleSignalSource inTrue, DoubleSignalSource inFalse) Returns a new signal source whose value is that of either of two given type-compatible signal sources, depending on the current value of a condition signal source.static <E extends Enum<E>>
DoubleSignalSourcechoose(EnumSignalSource<E> selector, DoubleSignalSource... cases) Returns a new signal source whose value is selected dynamically from a range of cases indexed byenumvalues.static <E extends Enum<E>>
DoubleSignalSourcechoose(EnumSignalSource<E> selector, EnumMap<E, ? extends DoubleSignalSource> cases) Returns a new signal source whose value is selected dynamically from a range of cases indexed byenumvalues.static <E extends Enum<E>>
DoubleSignalSourcechoose(SignalSource<E> selector, EnumMap<E, ? extends DoubleSignalSource> cases) Returns a new signal source whose value is selected dynamically from a range of cases indexed byenumvalues.static DoubleClockedSignalSourceclock(DoubleSignalSource output, Process... processes) default Consumer<CompilationContext> Returns a code generator for outputting the value of this entity.default voidstatic DoubleSignalSourceconstant(double value) Returns a signal source whose value is constant (never changes).default Processdefault BooleanSignalSourcedefined()Returns a new signal source whose value istrueiff the value of this signal source is a valid number.default DoubleClockedSignalSourcedelayed(double initialValue) Returns a new signal source that mirrors the values of this signal source delayed by one clock tick.default DoubleClockedSignalSourcedelayed(double... initialValues) Returns a new signal source that mirror the values of this signal source delayed by a given number of clock ticks.static DoubleClockedSignalSourcedelayedFeedback(Function<? super DoubleClockedSignalSource, ? extends DoubleSignalSource> loop, double initialValue) Returns a new signal source that receives its own delayed output as input.static DoubleClockedSignalSourcedelayedFeedback(Function<? super DoubleClockedSignalSource, ? extends DoubleSignalSource> loop, double... initialValues) default DoubleSignalSourcedivide(DoubleSignalSource other) Returns a new signal source whose value is the quotient of the simultaneous values of this and another signal source.default BooleanSignalSourceequal(DoubleSignalSource other) Returns a new signal source whose value istrueiff the value of this signal source is equal to the simultaneous value of another signal source.default DoubleSignalSourcefloor()static DoubleSignalSourcefromArray(double[] data, IntSignalSource index) Returns a new signal source whose value is an element of a given array, whose index is determined by a given signal source.static DoubleSignalSourcefromArrayCyclic(double[] data, IntSignalSource index) Returns a new signal source whose value is an element of a given array, whose index is determined by a given signal source.doubleReturns the current value of this signal source.Returns the constant value of this signal source, if applicable.default Class<?> Returns the type of values produced by this entity.default DoubleClockedSignalSourceglidingAverage(int width) Returns a signal source whose value at each clock index is the average of values of this signal source at a fixed number of preceding clock indices, including to the current one.default DoubleClockedSignalSourceglidingStandardDeviation(int width) Returns a signal source whose value at each clock index is the standard deviation of values of this signal source at a fixed number of preceding clock indices, including to the current one.default DoubleClockedSignalSourceglidingSum(int width) Returns a signal source whose value at each clock index is the sum of values of this signal source at a fixed number of preceding clock indices, including to the current one.default DoubleClockedSignalSourceglidingVariance(int width) Returns a signal source whose value at each clock index is the variance of values of this signal source at a fixed number of preceding clock indices, including to the current one.default BooleanSignalSourcegreaterOrEqual(DoubleSignalSource other) Returns a new signal source whose value istrueiff the value of this signal source is greater than or equal to the simultaneous value of another signal source.default BooleanSignalSourcegreaterThan(DoubleSignalSource other) Returns a new signal source whose value istrueiff the value of this signal source is greater than the simultaneous value of another signal source.default BooleanSignalSourceguard(DoublePredicate pred) Returns a boolean signal source whose values are derived from the values of this signal source by applying a unary predicate.default booleanChecks whether this signal source has a constant value.default DoubleClockedSignalSourcedefault BooleanSignalSourcelessOrEqual(DoubleSignalSource other) Returns a new signal source whose value istrueiff the value of this signal source is less than or equal to the simultaneous value of another signal source.default BooleanSignalSourcelessThan(DoubleSignalSource other) Returns a new signal source whose value istrueiff the value of this signal source is less than the simultaneous value of another signal source.default DoubleSignalSourceReturns a signal source whose values are derived from the values of this signal source by applying a unary function.default DoubleSignalSourcemax(DoubleSignalSource other) Returns a new signal source whose value is the maximum of the simultaneous values of this and another signal source.default DoubleSignalSourcemin(DoubleSignalSource other) Returns a new signal source whose value is the minimum of the simultaneous values of this and another signal source.default DoubleSignalSourcemodulo(DoubleSignalSource other) Returns a new signal source whose value is the division remainder of the simultaneous values of this and another signal source.default DoubleSignalSourcemultiply(DoubleSignalSource other) Returns a new signal source whose value is the product of the simultaneous values of this and another signal source.default DoubleSignalSourcenegate()Returns a new signal source whose value is the negative of the value of this signal source.default BooleanSignalSourcenegative()Returns a new signal source whose value istrueiff the value of this signal source is a negative number.default BooleanSignalSourcenonEqual(DoubleSignalSource other) Returns a new signal source whose value istrueiff the value of this signal source is not equal to the simultaneous value of another signal source.default BooleanSignalSourceReturns a new signal source whose value istrueiff the value of this signal source is a nonnegative number.default BooleanSignalSourceReturns a new signal source whose value istrueiff the value of this signal source is a nonpositive number.default BooleanSignalSourcenonzero()Returns a new signal source whose value istrueiff the value of this signal source is not the number zero.default BooleanSignalSourceReturns a new signal source whose value istrueiff the value of this signal source is not a valid number.default BooleanSignalSourcepositive()Returns a new signal source whose value istrueiff the value of this signal source is a positive number.default DoubleClockedSignalSourcepower(BinaryOperator<DoubleSignalSource> op, long n) default ProcessReturns a realtime event that, when fired, notifies the concerned observer of the current value of this signal source.default voiddefault BooleanSignalSourcerelateWith(DoubleBiPredicate pred, DoubleSignalSource other) Returns a boolean signal source whose values are derived from the simultaneous values of this and another signal source by applying a binary predicate.default DoubleClockedSignalSourcesampleAndHold(BooleanSignalSource hold, double initialValue) Returns a new clocked signal source whose value at each clock tick is either the current value of this signal source (sample mode), or its own value at the previous clock tick (hold mode), depending on the current value of a given boolean signal source.default DoubleSignalSourceselectAffine(DoubleSignalSource onOne, DoubleSignalSource onZero) Deprecated.FIXMEdefault DoubleClockedSignalSourceseries()Returns a signal source whose value at each clock index is the sum of all values of this signal source at all clock indices up to the current one.default DoubleSignalSourcesqrt()Returns a new signal source whose value is the square root of the value of this signal source.default DoubleClockedSignalSourcestored()Returns a new signal source that stores snapshot values of this signal source driven by a clock.default DoubleSignalSourcesubtract(DoubleSignalSource other) Returns a new signal source whose value is the difference of the simultaneous values of this and another signal source.default BooleanSignalSourcezero()Returns a new signal source whose value istrueiff the value of this signal source is the number zero.default BooleanClockedSignalSourceReturns a signal source whose value at each clock index istrueif the current value of this signal source has changed sign compared to its value at the preceding clock index.default DoubleSignalSourcezipWith(DoubleBinaryOperator op, DoubleSignalSource other) Returns a signal source whose values are derived from the simultaneous values of this and another signal source by applying a binary function.Methods inherited from interface eu.bandm.sig.adlib2.compile.CompilableDataFlow
compileDataFlowTo, hasDataFlowIO
-
Method Details
-
getAsDouble
double getAsDouble()Returns the current value of this signal source.The value may be either computed on demand, or retrieved from storage.
Implementations of this method should have no side effect.
- Specified by:
getAsDoublein interfaceDoubleSupplier- Returns:
- the current value of this signal source
-
getValueClass
Returns the type of values produced by this entity.For signals of primitive value type, the result will be the corresponding pseudoclass.
This implementation returns the primitive pseudoclass
double.class.- Specified by:
getValueClassin interfaceCompilableDataFlow- Returns:
- the type of signal values that this entity produces
- See Also:
-
getConstantAsDouble
Returns the constant value of this signal source, if applicable.- Returns:
- an
Optionalcontaining the value of this signal source if it is constant, orOptional.empty()otherwise.
-
hasConstantAsDouble
default boolean hasConstantAsDouble()Checks whether this signal source has a constant value.- Returns:
trueiff the value of this signal source does not change over time
-
compileDataFlow
Returns a code generator for outputting the value of this entity.This implementation generates code to invoke
this.getAsDouble().- Specified by:
compileDataFlowin interfaceCompilableDataFlow
-
constant
Returns a signal source whose value is constant (never changes).- Parameters:
value- the value of the new signal source- Returns:
- a signal source that always has the given value
-
map
Returns a signal source whose values are derived from the values of this signal source by applying a unary function.The implementation yields a signal source that computes the derived value by applying the given function every time its
getAsDouble()method is invoked. If the computation is costly and the value reused often, it may be convenient to compute and store the value proactively driven by a clock.- Parameters:
op- the function to apply to each value- See Also:
-
zipWith
Returns a signal source whose values are derived from the simultaneous values of this and another signal source by applying a binary function.The implementation yields a signal source that computes the derived value by applying the given function every time its
getAsDouble()method is invoked. If the computation is costly and the value reused often, it may be convenient to compute the value proactively driven by a clock.- Parameters:
op- the function to apply to each pair of valuesother- the other signal source to consider- See Also:
-
guard
Returns a boolean signal source whose values are derived from the values of this signal source by applying a unary predicate.The implementation yields a signal source that computes the derived value by applying the given predicate every time its
getAsDouble()method is invoked. If the computation is costly and the value reused often, it may be convenient to compute the value proactively driven by a clock.- Parameters:
pred- the predicate to apply to each value- See Also:
-
relateWith
Returns a boolean signal source whose values are derived from the simultaneous values of this and another signal source by applying a binary predicate.The implementation yields a signal source that computes the derived value by applying the given predicate every time its
getAsDouble()method is invoked. If the computation is costly and the value reused often, it may be convenient to compute the value proactively driven by a clock.- Parameters:
pred- the predicate to apply to each valueother- the other signal source to consider- See Also:
-
clock
@Undocumented static DoubleClockedSignalSource clock(DoubleSignalSource output, Process... processes) -
invariant
-
stored
Returns a new signal source that stores snapshot values of this signal source driven by a clock.The
getAsDouble()method of the returned signal source is guaranteed to be extremely fast, both in interpreted and compiled mode. The computational effort of the underlying signal source is instead spent on theProcess.step()method of the returned signal source, to be invoked at each clock tick.If the underlying signal source is constant, the value is forwarded when the
Process.init()method of the returned signal source is invoked, where as its implementation ofProcess.step()does nothing.- Returns:
- a new signal source that takes value snapshots of this signal source.
-
delayed
Returns a new signal source that mirrors the values of this signal source delayed by one clock tick.- Parameters:
initialValue- the initial value to output for the first clock tick
-
delayed
Returns a new signal source that mirror the values of this signal source delayed by a given number of clock ticks.The length of the delay in clock ticks is specified implicitly by the number of initial values.
- Parameters:
initialValues- the initial values to output for the first clock ticks
-
delayedFeedback
static DoubleClockedSignalSource delayedFeedback(Function<? super DoubleClockedSignalSource, ? extends DoubleSignalSource> loop, double initialValue) Returns a new signal source that receives its own delayed output as input.The circular data flow is constructed by specifying a function that receives as its argument a delayed signal source that will be fed back from the source that it returns. The passed function is applied exactly once.
The output signal source is used both internally for the delayed feedback, and possibly externally by a consumer. Hence its value is stored implicitly in an intermediate variable in order to avoid duplicate computations.
- Parameters:
loop- the function that creates the output signal source, given its delayed feedbackinitialValue- the initial value of the delayed feedback
-
delayedFeedback
@SafeVarargs static DoubleClockedSignalSource delayedFeedback(Function<? super DoubleClockedSignalSource, ? extends DoubleSignalSource> loop, double... initialValues) -
probe
Returns a realtime event that, when fired, notifies the concerned observer of the current value of this signal source.- Parameters:
key- the key to associate the value of this signal source with- See Also:
-
choose
static DoubleSignalSource choose(BooleanSignalSource condition, DoubleSignalSource inTrue, DoubleSignalSource inFalse) Returns a new signal source whose value is that of either of two given type-compatible signal sources, depending on the current value of a condition signal source.At any point in time,
choose(condition, x, y).getAsInt() == (this.getAsDouble() ? x : y).getAsInt()holds.- Parameters:
condition- the condition signal sourceinTrue- the signal source to consider when the value of the condition signal source istrueinFalse- the signal source to consider when the value of the condition signal source isfalse
-
asInt
-
negate
Returns a new signal source whose value is the negative of the value of this signal source.For a signal source
that = this.negate(), at any point in time,that.getAsDouble() == -this.getAsDouble()holds. -
add
Returns a new signal source whose value is the sum of the simultaneous values of this and another signal source.At any point in time,
this.add(other).getAsDouble() == this.getAsDouble() + other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
multiply
Returns a new signal source whose value is the product of the simultaneous values of this and another signal source.At any point in time,
this.multiply(other).getAsDouble() == this.getAsDouble() * other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
subtract
Returns a new signal source whose value is the difference of the simultaneous values of this and another signal source.At any point in time,
this.subtract(other).getAsDouble() == this.getAsDouble() - other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
divide
Returns a new signal source whose value is the quotient of the simultaneous values of this and another signal source.At any point in time,
this.divide(other).getAsDouble() == this.getAsDouble() / other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
modulo
Returns a new signal source whose value is the division remainder of the simultaneous values of this and another signal source.At any point in time,
this.modulo(other).getAsDouble() == this.getAsDouble() % other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
abs
Returns a new signal source whose value is the absolute of the value of this signal source.At any point in time,
this.abs().getAsDouble() == Math.abs(this.getAsDouble())holds. -
min
Returns a new signal source whose value is the minimum of the simultaneous values of this and another signal source.At any point in time,
this.min(other).getAsDouble() == Math.min(this.getAsDouble(), other.getAsDouble())holds.- Parameters:
other- the other signal source to consider
-
max
Returns a new signal source whose value is the maximum of the simultaneous values of this and another signal source.At any point in time,
this.max(other).getAsDouble() == Math.max(this.getAsDouble(), other.getAsDouble())holds.- Parameters:
other- the other signal source to consider
-
positive
Returns a new signal source whose value istrueiff the value of this signal source is a positive number.At any point in time,
this.positive().getAsBoolean() == this.getAsDouble() > 0holds. -
negative
Returns a new signal source whose value istrueiff the value of this signal source is a negative number.At any point in time,
this.positive().getAsBoolean() == this.getAsDouble() < 0holds. -
nonpositive
Returns a new signal source whose value istrueiff the value of this signal source is a nonpositive number.At any point in time,
this.positive().getAsBoolean() == this.getAsDouble() <= 0holds. -
nonnegative
Returns a new signal source whose value istrueiff the value of this signal source is a nonnegative number.At any point in time,
this.positive().getAsBoolean() == this.getAsDouble() >= 0holds. -
zero
Returns a new signal source whose value istrueiff the value of this signal source is the number zero.At any point in time,
this.positive().getAsBoolean() == this.getAsDouble() == 0holds. -
nonzero
Returns a new signal source whose value istrueiff the value of this signal source is not the number zero.At any point in time,
this.positive().getAsBoolean() == this.getAsDouble() != 0holds. -
lessThan
Returns a new signal source whose value istrueiff the value of this signal source is less than the simultaneous value of another signal source.At any point in time,
this.lessThan(other).getAsBoolean() == this.getAsDouble() < other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
greaterThan
Returns a new signal source whose value istrueiff the value of this signal source is greater than the simultaneous value of another signal source.At any point in time,
this.lessThan(other).getAsBoolean() == this.getAsDouble() > other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
lessOrEqual
Returns a new signal source whose value istrueiff the value of this signal source is less than or equal to the simultaneous value of another signal source.At any point in time,
this.lessOrEqua;(other).getAsBoolean() == this.getAsDouble() <= other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
greaterOrEqual
Returns a new signal source whose value istrueiff the value of this signal source is greater than or equal to the simultaneous value of another signal source.At any point in time,
this.greaterOrEqual(other).getAsBoolean() == this.getAsDouble() >= other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
equal
Returns a new signal source whose value istrueiff the value of this signal source is equal to the simultaneous value of another signal source.At any point in time,
this.equal(other).getAsBoolean() == this.getAsDouble() == other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
nonEqual
Returns a new signal source whose value istrueiff the value of this signal source is not equal to the simultaneous value of another signal source.At any point in time,
this.nonEqual(other).getAsBoolean() == this.getAsDouble() != other.getAsDouble()holds.- Parameters:
other- the other signal source to consider
-
floor
-
ceil
-
defined
Returns a new signal source whose value istrueiff the value of this signal source is a valid number.At any point in time,
this.defined().getAsBoolean() == !Double.isNan(this.getAsDouble())holds. -
notANumber
Returns a new signal source whose value istrueiff the value of this signal source is not a valid number.At any point in time,
this.notANumber().getAsBoolean() == Double.isNan(this.getAsDouble())holds. -
sqrt
Returns a new signal source whose value is the square root of the value of this signal source.At any point in time,
this.sqrt().getAsDouble() == (double)Math.sqrt(this.getAsDouble())holds. -
series
Returns a signal source whose value at each clock index is the sum of all values of this signal source at all clock indices up to the current one.The sum is computed using Kahan's stable algorithm, which requires four additions per iteration.
-
glidingSum
Returns a signal source whose value at each clock index is the sum of values of this signal source at a fixed number of preceding clock indices, including to the current one.The sum is computed using Kahan's stable algorithm, which requires five additions per iteration.
- Parameters:
width- the number of clock cycles to sum over- Throws:
NegativeArraySizeException- ifwidth <= 0
-
glidingAverage
Returns a signal source whose value at each clock index is the average of values of this signal source at a fixed number of preceding clock indices, including to the current one.The average is computed using Kahan's stable algorithm, which requires five additions and one division per iteration.
- Parameters:
width- the number of clock cycles to average over- Throws:
NegativeArraySizeException- ifwidth <= 0
-
glidingVariance
Returns a signal source whose value at each clock index is the variance of values of this signal source at a fixed number of preceding clock indices, including to the current one.- Parameters:
width- the number of clock cycles to compute over- Throws:
NegativeArraySizeException- ifwidth <= 0
-
glidingStandardDeviation
Returns a signal source whose value at each clock index is the standard deviation of values of this signal source at a fixed number of preceding clock indices, including to the current one.- Parameters:
width- the number of clock cycles to compute over- Throws:
NegativeArraySizeException- ifwidth <= 0
-
zeroCrossing
Returns a signal source whose value at each clock index istrueif the current value of this signal source has changed sign compared to its value at the preceding clock index.Corner cases, namly initial values, positive and negative zero, and NaNs, are handled robustly; they are not counted as sign changes.
-
selectAffine
@Deprecated default DoubleSignalSource selectAffine(DoubleSignalSource onOne, DoubleSignalSource onZero) Deprecated.FIXMEReturns a new signal source whose value is the affine combination of the simultaneous values of two signal sources.At any point in time,
selectAffine(s, a, b).getAsDouble() == s.getAsDouble() * a.getAsDouble() + (1 - s.getAsDouble()) * b.getAsDouble()holds. -
choose
static <E extends Enum<E>> DoubleSignalSource choose(SignalSource<E> selector, EnumMap<E, ? extends DoubleSignalSource> cases) Returns a new signal source whose value is selected dynamically from a range of cases indexed byenumvalues.At any point in time,
choose(s, m).getAsDouble() == m.get(s.get()).getAsDouble()holds.The given map
casesis assumed to be immutable and to contain an entry for every possible value of theenumtypeE.- Type Parameters:
E- the type ofenumvalues- Parameters:
selector- the signal source that provides theenumvaluecases- a map ofenumvalues to signal sources to select from
-
choose
static <E extends Enum<E>> DoubleSignalSource choose(EnumSignalSource<E> selector, EnumMap<E, ? extends DoubleSignalSource> cases) Returns a new signal source whose value is selected dynamically from a range of cases indexed byenumvalues.At any point in time,
choose(s, m).getAsDouble() == m.get(E.values()[s.getAsInt()]).getAsDouble()holds.The given map
casesis assumed to be immutable and to contain an entry for every possible value of theenumtypeE.- Type Parameters:
E- the type ofenumvalues- Parameters:
selector- the signal source that provides the ordinal number of theenumvaluecases- a map ofenumvalues to signal sources to select from
-
choose
@SafeVarargs static <E extends Enum<E>> DoubleSignalSource choose(EnumSignalSource<E> selector, DoubleSignalSource... cases) Returns a new signal source whose value is selected dynamically from a range of cases indexed byenumvalues.At any point in time,
choose(s, a).getAsDouble() == m[s.getAsInt()].getAsDouble()holds.The given array
casesis assumed to be immutable and to contain an element for every possible value of theenumtypeE.- Type Parameters:
E- the type ofenumvalues- Parameters:
selector- the signal source that provides theenumvaluecases- an array signal sources to select from, in the definition order ofenumelements
-
sampleAndHold
Returns a new clocked signal source whose value at each clock tick is either the current value of this signal source (sample mode), or its own value at the previous clock tick (hold mode), depending on the current value of a given boolean signal source.- Parameters:
hold- a boolean signal source that, at each clock tick, selects hold mode if its value istrue, or sample mode if its value isfalseinitialValue- the initial value to use if in hold mode at the first clock tick
-
power
@Undocumented default DoubleClockedSignalSource power(BinaryOperator<DoubleSignalSource> op, long n) -
compileMainSignalSource
-
publishStoredValueVariable
-
fromArray
Returns a new signal source whose value is an element of a given array, whose index is determined by a given signal source. At execution time, the value of the index signal source must be a valid index in the array, or an exception occurs. (This implies that using an empty array as backing store results in a signal source that cannot be executed.)- Parameters:
data- the array to read fromindex- the signal source that determines the index
-
fromArrayCyclic
Returns a new signal source whose value is an element of a given array, whose index is determined by a given signal source. The value of the index signal source is normalized cyclically (modulo the array length) to a valid index.- Parameters:
data- the array to read fromindex- the signal source that determines the index
-
DEBUG
-
asFloat
-
asDouble
-