public abstract class RTLine extends java.lang.Object implements AudioChainListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
clear
if clear is true the threads wait call will be skipped
|
protected Instrument[] |
inst
The instrument associated with this real time line
|
Constructor and Description |
---|
RTLine(Instrument[] inst)
The RTLine constructor is primarily responsible for initialising its
associated instrument and the instruments audio chain.
|
Modifier and Type | Method and Description |
---|---|
void |
controlChange(float[] buffer,
int returned,
boolean finished)
controlChange is called by RTLine's instrument everytime it completes
filling its current buffer.
|
void |
externalAction(java.lang.Object obj,
int actionNumber)
External action is called by RTMixer whenever an external event is sent
to trigger a real time audio event.
|
int |
getChannels()
Return the current number of channels, based on the channels of the instruments.
|
Instrument[] |
getInstrument()
Returns the instrument associated with this RTLine
|
abstract Note |
getNextNote()
Override this method to set the next method to be called.
|
int |
getNumLines()
Return the number of lines (note polyphony for this RTLine
|
int |
getSampleRate()
Return the current samplerate, based on the sample rate of the instruments.
|
void |
instNote(Instrument inst,
long samplesProcessed)
This method is called from Instrument and in return calls that
instrument's renderNote method.
|
void |
pause() |
void |
setBufferSize(int buf)
Specify the buffer size for each instrument.
|
void |
setTempo(double tempo)
sets the tempo of this RTLine
|
void |
start(RTMixer rta)
start this RTLine's instrument call for the setting of the first note
|
void |
stop() |
void |
unPause() |
protected Instrument[] inst
protected boolean clear
public RTLine(Instrument[] inst)
public Instrument[] getInstrument()
public int getNumLines()
public void setTempo(double tempo)
public void setBufferSize(int buf)
public int getSampleRate()
public int getChannels()
public void externalAction(java.lang.Object obj, int actionNumber)
obj
- and undetermined Object which will need to be cast locally to
whatever type is expected.actionNumber
- is an serial index value for the source of the
event.public void controlChange(float[] buffer, int returned, boolean finished)
controlChange
in interface AudioChainListener
buffer
- a buffer of samples passed from an instrumentreturned
- the number of samples in the bufferfinished
- this boolean indicates whether the instrument has
finished processing its current note.public void instNote(Instrument inst, long samplesProcessed)
public void start(RTMixer rta)
public void pause()
public void unPause()
public void stop()
public abstract Note getNextNote()