Package eu.bandm.sig.adlib2.lib
Class FloatEnvelope
java.lang.Object
eu.bandm.sig.adlib2.AbstractProcess
eu.bandm.sig.adlib2.FloatStoredSignalSource
eu.bandm.sig.adlib2.lib.FloatEnvelope
- All Implemented Interfaces:
AbstractClockedSignalSource,AbstractSignalSource,Component,FloatClockedSignalSource,FloatSignalSource,AbstractEnvelope,Process,FloatSupplier
Parameter function: piecewise defined (control-rate) function, for
forming acoustic note events.
Duration are given in seconds.
\ \
\ \
\ \
\....limit \
|dura_seg|
|..... dura_env..|
change to next segment determined by ...
out<=/>=fin or dt
increment value determined by ...
==0 or !=0
=inc =inc OR = fin/dt
dt_inc fin_inc
dtSeg_inc dt inc duration of this segment, inc given verbatim
dtSeg_fin dt fin duration of this segment, inc calculated
as fin-out / dt
dtEnv_inc dt inc ends at time point of envelope,
inc given verbatim
dtEnv_fin dt fin ends at time point of envelope,
inc calculated as fin-out/dt
inc_fin inc fin inc and fin given verbatim
dtSeg_inc dt =0 hold current value
dtEnv_inc dt =0 hold current value
dtSeg_fin =0 fin jump to out=v, start next segment immediately
end,fermata --- --- array at this index does not change "out" value
-
Nested Class Summary
Nested classes/interfaces inherited from interface eu.bandm.sig.adlib2.lib.AbstractEnvelope
AbstractEnvelope.ModeNested classes/interfaces inherited from interface eu.bandm.sig.adlib2.FloatClockedSignalSource
FloatClockedSignalSource.AbstractRandomNested classes/interfaces inherited from interface eu.bandm.sig.adlib2.Process
Process.Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractEnvelope.Mode[]protected float[]protected intprotected float[]protected floatprotected floatprotected intprotected floatprotected boolean(package private) AbstractEnvelope.Modeprotected floatThe time after the last reset = "start of note".protected floatTaken from the period duration of a ConstantRealtimeContext, thus in seconds.protected floatThe rest duration for the current segmentprotected intFields inherited from class eu.bandm.sig.adlib2.FloatStoredSignalSource
outFields inherited from interface eu.bandm.sig.adlib2.AbstractClockedSignalSource
STREAM_CHARACTERISTICS, STREAM_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionFloatEnvelope(int segments) FloatEnvelope(ConstantRealtimeContext ct, int segments) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSegment(float dt_inc, float fin_inc, AbstractEnvelope.Mode ctr) protected voiddoStep()protected voiddump(PrintStream ps) voidendFerm()getRestarter(BooleanSignalSource reset) voidinit()Initializes the state of this process.protected voidEnter the next segment, prepare all registers for the next invocation of "step()."voidrestart()setInitValue(float initValue) setLoopMode(boolean loopMode) voidsetRealtimeContext(RealtimeContext context) Sets the realtime context of this process.voidsetValues(float[] dt_inc, float[] fin_inc, AbstractEnvelope.Mode[] ctr) voidstep()Signals a time event, executing a transition step for this process to the next observable state.Methods inherited from class eu.bandm.sig.adlib2.FloatStoredSignalSource
getAsFloatMethods inherited from class eu.bandm.sig.adlib2.AbstractProcess
getRealtimeContext, hasFixedConstantRealtimeContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.sig.adlib2.FloatClockedSignalSource
after, drain, drain, duringMethods inherited from interface eu.bandm.sig.adlib2.FloatSignalSource
abs, add, asDouble, asFloat, asInt, ceil, clockedAfter, defined, delayed, delayed, divide, equal, floor, getConstantAsFloat, getValueClass, glidingAverage, glidingStandardDeviation, glidingSum, glidingVariance, greaterOrEqual, greaterThan, guard, hasConstantAsFloat, invariant, lessOrEqual, lessThan, map, max, min, modulo, multiply, negate, negative, nonEqual, nonnegative, nonpositive, nonzero, notANumber, positive, power, probe, relateWith, sampleAndHold, selectAffine, series, sqrt, stored, subtract, zero, zeroCrossing, zipWithMethods inherited from interface eu.bandm.sig.adlib2.Process
afterEvery, andThen, conditional, every, every, getProcess
-
Field Details
-
samplingPeriode
protected float samplingPeriodeTaken from the period duration of a ConstantRealtimeContext, thus in seconds. -
dt_inc
protected float[] dt_inc -
fin_inc
protected float[] fin_inc -
ctr
-
initValue
protected float initValue -
endFerms
protected int endFerms -
loopMode
protected boolean loopMode -
increment
protected float increment -
finalValue
protected float finalValue -
now
protected float nowThe time after the last reset = "start of note". -
timer
protected float timerThe rest duration for the current segment -
index
protected int index -
mode
-
writeIndex
protected int writeIndex
-
-
Constructor Details
-
FloatEnvelope
-
FloatEnvelope
-
FloatEnvelope
public FloatEnvelope() -
FloatEnvelope
public FloatEnvelope(int segments)
-
-
Method Details
-
endFerm
public void endFerm() -
setLoopMode
-
setInitValue
-
setRealtimeContext
Description copied from class:AbstractProcessSets the realtime context of this process.If the realtime context has been fixed at creation time, this implementation will not allow it to be set to a different reference.
- Specified by:
setRealtimeContextin interfaceProcess- Overrides:
setRealtimeContextin classAbstractProcess- Parameters:
context- the new realtime context of this process, ornullif not specified
-
addSegment
-
setValues
-
step
public void step()Description copied from interface:ProcessSignals a time event, executing a transition step for this process to the next observable state.The state of the process after successful completion of this method should be the n-th observable state, if
Process.step()has been invoked n times since the last initialization viaProcess.init(). The behavior of this method is unspecified ifProcess.init()has not been invoked before.FIXME:
Process.setRealtimeContext(eu.bandm.sig.adlib2.RealtimeContext)If this method completes abruptly by throwing an error or unchecked exception, the process state should be considered invalid.
-
doStep
protected void doStep() -
nextSegment
protected void nextSegment()Enter the next segment, prepare all registers for the next invocation of "step()."mode dt_inc fin_inc dt<>_fin timer finalValue dtSeg_fin 0 finalValue dt<>_inc timer increment inc_fin increment finalValue -
restart
public void restart() -
init
public void init()Description copied from interface:ProcessInitializes the state of this process. The state is initialized such that the first subsequent call toProcess.step()transitions to the first specified observable state.The default implementation does nothing.
-
getRestarter
-
dump
-