|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Instrument
The Instrument interface is expected by AudioOutput.playNote. You can create your own instruments by implementing this interface in one of your classes. Typically, you will create a class that constructs a UGen chain: an Oscil patched to a filter patched to an ADSR. When noteOn is called you will patch the end of your chain to the AudioOutput you are using and when noteOff is called you will unpatch.
Method Summary | |
---|---|
void |
noteOff()
Stop playing a note. |
void |
noteOn(float duration)
Start playing a note. |
Method Detail |
---|
void noteOn(float duration)
duration
- how long the note should last (i.e. noteOff will be called after this many seconds)void noteOff()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |