|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.InstrumentAdapter com.softsynth.jmsl.jsyn.SynthNoteInstrument
public class SynthNoteInstrument
A polyphonic Instrument that plays notes with a JSyn SynthNote. Uses Midi
style velocity 0..127
SynthNoteInstrument defines noteOnFor which sustains a note event over time.
update() for SynthNoteInstrument does nothing. The default Interpreter for a
SynthNoteInstrument is a NoteInterpreter. You might consider using
TunedSynthNoteInstrument or JSynInsFromClassName instead which does not
require that you build the allocator, and supports outputs with more than one
part (stereo instruments for example), or use the more powerful
SynthNoteAllPortsInstrument which gives timbral control over all input ports.
NoteInterpreter
Constructor Summary | |
---|---|
SynthNoteInstrument()
|
|
SynthNoteInstrument(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
Deprecated. Use no-args contrcutor, then setAllocator() |
Method Summary | |
---|---|
int |
getNumOutputs()
|
java.lang.Object |
getOutput()
Implement JSynInstrument interface |
java.lang.Object |
getOutput(int part)
same as getOutput(), only 1 part |
Tuning |
getTuning()
|
static void |
main(java.lang.String[] args)
Build an instrument and a MusicShape and play it polyphonically with a JSyn SynthNote. |
double |
noteOnFor(double playTime,
double holdTime,
double pitch,
double velocity)
Play a note for a specified duration. |
void |
print()
|
void |
setAllocator(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
|
void |
setTuning(Tuning tuning)
|
Methods inherited from class com.softsynth.jmsl.InstrumentAdapter |
---|
close, getDimensionNameSpace, getInterpreter, getMixerClassName, getMusicDevice, getName, getTransposition, noteOff, noteOn, off, on, open, play, setDimensionNameSpace, setInterpreter, setMixerClassName, setMusicDevice, setName, setTransposition, toString, update |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.softsynth.jmsl.NoteOnOff |
---|
noteOff, noteOn |
Constructor Detail |
---|
public SynthNoteInstrument()
public SynthNoteInstrument(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
Method Detail |
---|
public void setAllocator(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
public void setTuning(Tuning tuning)
public Tuning getTuning()
public java.lang.Object getOutput()
getOutput
in interface OutputProvider
getOutput
in class InstrumentAdapter
public java.lang.Object getOutput(int part)
getOutput
in interface OutputProvider
getOutput
in class InstrumentAdapter
public int getNumOutputs()
getNumOutputs
in interface OutputProvider
getNumOutputs
in class InstrumentAdapter
public double noteOnFor(double playTime, double holdTime, double pitch, double velocity)
noteOnFor
in interface NoteOnOff
noteOnFor
in class InstrumentAdapter
public void print()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |