Package com.softsynth.jmsl.jsyn
Class SynthNoteInstrument
java.lang.Object
com.softsynth.jmsl.InstrumentAdapter
com.softsynth.jmsl.jsyn.SynthNoteInstrument
- All Implemented Interfaces:
Instrument
,Namable
,NoteOnOff
,OutputProvider
,Transposable
public class SynthNoteInstrument extends InstrumentAdapter implements NoteOnOff
Deprecated.
use the pure Java JSyn2 package instead
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.
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.
- Author:
- Phil Burk and Nick Didkovsky
- See Also:
NoteInterpreter
-
Constructor Summary
Constructors Constructor Description SynthNoteInstrument()
Deprecated.SynthNoteInstrument(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
Deprecated.Use no-args constructor, then setAllocator() -
Method Summary
Modifier and Type Method Description int
getNumOutputs()
Deprecated.java.lang.Object
getOutput()
Deprecated.Implement JSynInstrument interfacejava.lang.Object
getOutput(int part)
Deprecated.same as getOutput(), only 1 partTuning
getTuning()
Deprecated.static void
main(java.lang.String[] args)
Deprecated.Build an instrument and a MusicShape and play it polyphonically with a JSyn SynthNote.double
noteOnFor(double playTime, double holdTime, double pitch, double velocity)
Deprecated.Play a note for a specified duration.void
print()
Deprecated.void
setAllocator(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)
Deprecated.void
setTuning(Tuning tuning)
Deprecated.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
-
Constructor Details
-
SynthNoteInstrument
public SynthNoteInstrument()Deprecated. -
SynthNoteInstrument
public SynthNoteInstrument(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)Deprecated.Use no-args constructor, then setAllocator()
-
-
Method Details
-
setAllocator
public void setAllocator(com.softsynth.jsyn.util.BussedVoiceAllocator allocator)Deprecated. -
setTuning
Deprecated. -
getTuning
Deprecated. -
getOutput
public java.lang.Object getOutput()Deprecated.Implement JSynInstrument interface- Specified by:
getOutput
in interfaceOutputProvider
- Overrides:
getOutput
in classInstrumentAdapter
- Returns:
- null
-
getOutput
public java.lang.Object getOutput(int part)Deprecated.same as getOutput(), only 1 part- Specified by:
getOutput
in interfaceOutputProvider
- Overrides:
getOutput
in classInstrumentAdapter
- Returns:
- null
-
getNumOutputs
public int getNumOutputs()Deprecated.- Specified by:
getNumOutputs
in interfaceOutputProvider
- Overrides:
getNumOutputs
in classInstrumentAdapter
- Returns:
- 0
-
noteOnFor
public double noteOnFor(double playTime, double holdTime, double pitch, double velocity)Deprecated.Play a note for a specified duration. Use MIDI style pitch and velocity.- Specified by:
noteOnFor
in interfaceNoteOnOff
- Overrides:
noteOnFor
in classInstrumentAdapter
-
print
public void print()Deprecated. -
main
public static void main(java.lang.String[] args)Deprecated.Build an instrument and a MusicShape and play it polyphonically with a JSyn SynthNote. Use equal tempered 10 tone tuning. MusicShape's repeat() method halves the timestretch every repeat
-