Package com.softsynth.jmsl.jsyn
Class TunedSynthNoteInstrument
java.lang.Object
com.softsynth.jmsl.InstrumentAdapter
com.softsynth.jmsl.jsyn.FreqSynthNoteInstrument
com.softsynth.jmsl.jsyn.TunedSynthNoteInstrument
- All Implemented Interfaces:
Instrument
,Namable
,OutputProvider
,Transposable
,UpdatableInstrument
,Tunable
- Direct Known Subclasses:
Brass
,JSynInsFromClassName
,RingMod
,SuperNoiseSwoop
public class TunedSynthNoteInstrument extends FreqSynthNoteInstrument implements Tunable
Deprecated.
use the pure Java JSyn2 package instead
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
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
- Author:
- Nick Didkovsky, Nick.Didkovsky@mail.rockefeller.edu (C) 2000 Nick Didkovsky, all rights reserved.
-
Field Summary
Fields inherited from class com.softsynth.jmsl.jsyn.FreqSynthNoteInstrument
insNum
-
Constructor Summary
Constructors Constructor Description TunedSynthNoteInstrument()
Deprecated.Constructor sets MusicDevice to JSynMusicDeviceTunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator)
Deprecated.polyphonic constructorTunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator, Tuning tuning)
Deprecated.polyphonic constructorTunedSynthNoteInstrument(com.softsynth.jsyn.SynthNote synthNote, Tuning tuning)
Deprecated.monophonic constructor -
Method Summary
Modifier and Type Method Description Tuning
getTuning()
Deprecated.static void
main(java.lang.String[] args)
Deprecated.Create a polyphonic, stereo instrument, and play a MusicShape with it.java.lang.Object
on(double playTime, double timeStretch, double[] dar)
Deprecated.Allocate a SynthNote and call SynthNote.noteOn()void
setTuning(Tuning t)
Deprecated.defaults to 12TET but you change that heredouble
update(double playTime, double timeStretch, double[] dar)
Deprecated.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 Details
-
TunedSynthNoteInstrument
public TunedSynthNoteInstrument()Deprecated.Constructor sets MusicDevice to JSynMusicDevice -
TunedSynthNoteInstrument
public TunedSynthNoteInstrument(com.softsynth.jsyn.SynthNote synthNote, Tuning tuning) throws com.softsynth.jsyn.SynthExceptionDeprecated.monophonic constructor- Throws:
com.softsynth.jsyn.SynthException
-
TunedSynthNoteInstrument
public TunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator, Tuning tuning) throws com.softsynth.jsyn.SynthExceptionDeprecated.polyphonic constructor- Throws:
com.softsynth.jsyn.SynthException
-
TunedSynthNoteInstrument
public TunedSynthNoteInstrument(BussedVoiceAllocatorMultiOut allocator) throws com.softsynth.jsyn.SynthExceptionDeprecated.polyphonic constructor- Throws:
com.softsynth.jsyn.SynthException
-
-
Method Details
-
setTuning
Deprecated.defaults to 12TET but you change that here -
getTuning
Deprecated. -
on
public java.lang.Object on(double playTime, double timeStretch, double[] dar)Deprecated.Allocate a SynthNote and call SynthNote.noteOn()double pitch = dar[1]; double amp = dar[2]; // 0..1
- Specified by:
on
in interfaceInstrument
- Overrides:
on
in classFreqSynthNoteInstrument
- Returns:
- allocated Synthnote. play() refers to this returned object directly and calls synthNoteOff()
- See Also:
Instrument.on(double, double, double[])
-
update
public double update(double playTime, double timeStretch, double[] dar)Deprecated.Update amplitude and frequency using (by default) dimension 1 as lookup to retrieve allocated synthnote. You may change this with setUpdateDimension()- Specified by:
update
in interfaceInstrument
- Overrides:
update
in classFreqSynthNoteInstrument
-
main
public static void main(java.lang.String[] args)Deprecated.Create a polyphonic, stereo instrument, and play a MusicShape with it. Uses 13tet tuning with fractional pitches
-