com.softsynth.jmsl.score.midi
Class MidiScoreInstrument
java.lang.Object
com.softsynth.jmsl.InstrumentAdapter
com.softsynth.jmsl.midi.MidiInstrument
com.softsynth.jmsl.score.midi.MidiScoreInstrument
- All Implemented Interfaces:
- Instrument, Namable, NoteOnOff, OutputProvider, Transposable, AttributeBuildable
public class MidiScoreInstrument
- extends MidiInstrument
- implements AttributeBuildable
Midi Instrument which is compatible with amplitude 0..1.
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky, all rights reserved
Field Summary |
static double |
midiDelay
This delay is used to synchronize with JSyn latency |
Method Summary |
void |
buildFromAttributes()
AttributeBuildable interface, used by SimpleXMLLoader. |
static void |
main(java.lang.String[] args)
|
static void |
openMidiDelayControlFrame()
|
double |
play(double playTime,
double timeStretch,
double[] dar)
input velocity is 0..1, which is then scaled to 0..127 and sent to Midi. |
Methods inherited from class com.softsynth.jmsl.midi.MidiInstrument |
close, getChannel, getMusicDevice, getNumOutputs, getOutput, getOutput, getProgram, noteOff, noteOn, off, on, open, print, setChannel, setProgram |
Methods inherited from class com.softsynth.jmsl.InstrumentAdapter |
getDimensionNameSpace, getInterpreter, getMixerClassName, getName, getTransposition, noteOnFor, setDimensionNameSpace, setInterpreter, setMixerClassName, setMusicDevice, setName, setTransposition, toString, update |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
midiDelay
public static double midiDelay
- This delay is used to synchronize with JSyn latency
MidiScoreInstrument
public MidiScoreInstrument()
MidiScoreInstrument
public MidiScoreInstrument(int channel)
play
public double play(double playTime,
double timeStretch,
double[] dar)
- input velocity is 0..1, which is then scaled to 0..127 and sent to Midi.
Also observes midiDelay for synching with JSyn audio latency
- Specified by:
play
in interface Instrument
- Overrides:
play
in class InstrumentAdapter
buildFromAttributes
public void buildFromAttributes()
- AttributeBuildable interface, used by SimpleXMLLoader. Calls
programChange() on getProgram() on getChannel(), if program != -1.
- Specified by:
buildFromAttributes
in interface AttributeBuildable
openMidiDelayControlFrame
public static void openMidiDelayControlFrame()
main
public static void main(java.lang.String[] args)