|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.softsynth.jmsl.InstrumentAdapter
com.softsynth.jmsl.jsyn.FreqSynthNoteInstrument
com.softsynth.jmsl.jsyn.TunedSynthNoteInstrument
public class TunedSynthNoteInstrument
A JMSL Instrument that plays a JSyn SynthNote.
Only difference between this and superclass FreqSynthNoteInstrument is that dimension 1 of this is pitch, not frequency
Optional constructor passes in a BussedVoiceAllocator to make this polyphonic.
double[] passed to play must contain duration, pitch, amplitude, hold
duration and hold (sustain) is in seconds. pitch can be fractional (ie 60.5 is a qtr tone higher than middle c), amplitude is 0..1
Tuning provides frequency from pitchIndex. update() can be used to change the amplitde of a sustain synthnote.
on() and off() are implemented here, giving the user a finer grain of control over the instrument
| Field Summary |
|---|
| Fields inherited from class com.softsynth.jmsl.jsyn.FreqSynthNoteInstrument |
|---|
insNum |
| Constructor Summary | |
|---|---|
TunedSynthNoteInstrument()
Constructor sets MusicDevice to JSynMusicDevice |
|
TunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator)
polyphonic constructor |
|
TunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator,
Tuning tuning)
polyphonic constructor |
|
TunedSynthNoteInstrument(com.softsynth.jsyn.SynthNote synthNote,
Tuning tuning)
monophonic constructor |
|
| Method Summary | |
|---|---|
Tuning |
getTuning()
|
static void |
main(java.lang.String[] args)
Create a polyphonic, stereo instrument, and play a MusicShape with it. |
java.lang.Object |
on(double playTime,
double timeStretch,
double[] dar)
Allocate a SynthNote and call SynthNote.noteOn() |
void |
setTuning(Tuning t)
defaults to 12TET but you change that here |
double |
update(double playTime,
double timeStretch,
double[] dar)
Update amplitude and frequency using (by default) dimension 1 as lookup to retrieve allocated synthnote. |
| Methods inherited from class com.softsynth.jmsl.jsyn.FreqSynthNoteInstrument |
|---|
close, getAllocator, getMaxVoices, getName, getNumOutputs, getOutput, getOutput, getPolyphonic, getUpdateDimension, off, off, open, play, setAllocator, setMaxVoices, setName, setSynthNote, setUpdateDimension |
| Methods inherited from class com.softsynth.jmsl.InstrumentAdapter |
|---|
getDimensionNameSpace, getInterpreter, getMixerClassName, getMusicDevice, getTransposition, noteOff, noteOn, noteOnFor, setDimensionNameSpace, setInterpreter, setMixerClassName, setMusicDevice, setTransposition, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TunedSynthNoteInstrument()
public TunedSynthNoteInstrument(com.softsynth.jsyn.SynthNote synthNote,
Tuning tuning)
throws com.softsynth.jsyn.SynthException
com.softsynth.jsyn.SynthException
public TunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator,
Tuning tuning)
throws com.softsynth.jsyn.SynthException
com.softsynth.jsyn.SynthException
public TunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator)
throws com.softsynth.jsyn.SynthException
com.softsynth.jsyn.SynthException| Method Detail |
|---|
public void setTuning(Tuning t)
public Tuning getTuning()
public java.lang.Object on(double playTime,
double timeStretch,
double[] dar)
double pitch = dar[1]; double amp = dar[2]; // 0..1
on in interface Instrumenton in class FreqSynthNoteInstrumentInstrument.on(double, double, double[])
public double update(double playTime,
double timeStretch,
double[] dar)
update in interface Instrumentupdate in class FreqSynthNoteInstrumentpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||