com.softsynth.jmsl
Class NoteInterpreter

java.lang.Object
  extended by com.softsynth.jmsl.Interpreter
      extended by 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

Constructor Summary
NoteInterpreter()
           
NoteInterpreter(Translator key)
          Create an interpreter with a translator for converting note indices to pitches in a key.
 
Method Summary
 Translator getKey()
           
 double interpret(double playTime, double timeStretch, double[] dar, Instrument ins)
          Midi note on.
 void setKey(Translator key)
           
 
Methods inherited from class com.softsynth.jmsl.Interpreter
getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoteInterpreter

public NoteInterpreter()

NoteInterpreter

public NoteInterpreter(Translator key)
Create an interpreter with a translator for converting note indices to pitches in a key.

Method Detail

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