public class GrainFarm extends UnitGenerator implements UnitSource
synth.add( sampleGrainFarm = new GrainFarm() );
grainFarm.allocate( NUM_GRAINS );
Grain
,
GrainSourceSine
,
RaisedCosineEnvelope
Modifier and Type | Field and Description |
---|---|
UnitInputPort |
amplitude |
UnitInputPort |
amplitudeRange |
UnitInputPort |
density |
UnitInputPort |
duration |
UnitInputPort |
durationRange |
UnitOutputPort |
output |
UnitInputPort |
rate
A scaler for playback rate.
|
UnitInputPort |
rateRange |
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 |
---|
GrainFarm() |
Modifier and Type | Method and Description |
---|---|
void |
allocate(int numGrains) |
void |
generate(int start,
int limit)
Perform essential synthesis function.
|
UnitOutputPort |
getOutput() |
void |
setGrainArray(Grain[] grains) |
void |
setupGrain(Grain grain,
int i) |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUnitGenerator
public UnitInputPort rate
public UnitInputPort rateRange
public UnitInputPort amplitude
public UnitInputPort amplitudeRange
public UnitInputPort density
public UnitInputPort duration
public UnitInputPort durationRange
public UnitOutputPort output
public void setGrainArray(Grain[] grains)
public void setupGrain(Grain grain, int i)
public void allocate(int numGrains)
public UnitOutputPort getOutput()
getOutput
in interface UnitSource
public void generate(int start, int limit)
UnitGenerator
generate
in class UnitGenerator
start
- offset into port bufferslimit
- limit offset into port buffers for loop