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
  • Constructor Summary

    Constructors
    Constructor Description
    NoteInterpreter()  
    NoteInterpreter​(Translator key)
    Create an interpreter with a translator for converting note indices to pitches in a key.
  • Method Summary

    Modifier and Type Method Description
    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 Details

    • NoteInterpreter

      public NoteInterpreter()
    • NoteInterpreter

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

    • 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