public class ParabolicEnvelope extends UnitGenerator
Generate a short parabolic envelope that could be used for granular synthesis. The output starts at zero, peaks at the value of amplitude then returns to zero. This unit has two states, IDLE and RUNNING. If a trigger is received when IDLE, the envelope is started and another trigger is sent out the triggerOutput port. This triggerOutput can be used to latch values for the synthesis of a grain. If a trigger is received when RUNNING, then it is ignored and passed out the triggerPass port. The triggerPass can be connected to the triggerInput of another ParabolicEnvelope. Thus you can implement a simple grain allocation scheme by daisy chaining the triggers of ParabolicEnvelopes.
The envelope is generated by a double integrator method so it uses relatively little CPU time.
EnvelopeDAHDSR
Modifier and Type | Field and Description |
---|---|
UnitInputPort |
amplitude |
UnitInputPort |
frequency
Fastest repeat rate of envelope if it were continually retriggered in Hertz.
|
UnitOutputPort |
output |
UnitInputPort |
triggerInput
True value triggers envelope when in resting state.
|
UnitOutputPort |
triggerOutput
Trigger output when envelope started.
|
UnitOutputPort |
triggerPass
Input trigger passed out if ignored for daisy chaining.
|
FALSE, PORT_NAME_AMPLITUDE, PORT_NAME_CUTOFF, PORT_NAME_FREQUENCY, PORT_NAME_FREQUENCY_SCALER, PORT_NAME_INPUT, PORT_NAME_OUTPUT, PORT_NAME_PAN, PORT_NAME_PHASE, PORT_NAME_PRESSURE, PORT_NAME_TIMBRE, PORT_NAME_TIME, synthesisEngine, TRUE, VERY_SMALL_FLOAT
Constructor and Description |
---|
ParabolicEnvelope() |
Modifier and Type | Method and Description |
---|---|
void |
generate(int start,
int limit)
Perform essential synthesis function.
|
addPort, addPort, autoStop, convertHalfLifeToMultiplier, convertTimeToRate, flattenOutputs, generate, getCircuit, getFramePeriod, getFrameRate, getId, getPortByName, getPorts, getSynthesisEngine, getSynthesizer, getTopUnit, getUnitGenerator, incrementWrapPhase, isEnabled, isStartRequired, printConnections, printConnections, printConnections, pullData, setCircuit, setEnabled, setFrameRate, setPort, setSynthesisEngine, start, start, start, stop, stop, stop
public UnitInputPort frequency
public UnitInputPort triggerInput
public UnitInputPort amplitude
public UnitOutputPort triggerOutput
public UnitOutputPort triggerPass
public UnitOutputPort output
public void generate(int start, int limit)
UnitGenerator
generate
in class UnitGenerator
start
- offset into port bufferslimit
- limit offset into port buffers for loop