com.softsynth.jmsl
Class NoteInterpreter
java.lang.Object
com.softsynth.jmsl.Interpreter
com.softsynth.jmsl.NoteInterpreter
public class NoteInterpreter
- extends Interpreter
NoteInterpreter.java
Interprets shape data as MIDI style notes.
Pitch values may be treated as indices into a key using an optional Translator
- Author:
- Phil Burk and Nick Didkovsky
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoteInterpreter
public NoteInterpreter()
NoteInterpreter
public NoteInterpreter(Translator key)
- Create an interpreter with a translator for converting note indices to pitches in a key.
setKey
public void setKey(Translator key)
getKey
public Translator getKey()
interpret
public double interpret(double playTime,
double timeStretch,
double[] dar,
Instrument ins)
- Midi note on.
Pulls Midi style data from shape data and plays it on an Instrument
Assumes shape dimensions are:
dim 0 is duration
dim 1 is note (may be translated into a key)
dim 2 is velocity
dim 3 is hold time
- Overrides:
interpret
in class Interpreter