Package wellen

Class ToneEngine

java.lang.Object
wellen.ToneEngine
Direct Known Subclasses:
ToneEngineDSP, ToneEngineMIDI, ToneEngineOSC

public abstract class ToneEngine extends Object
the underlying engine that is used by Tone to handle instruments.
  • Field Details

    • INSTRUMENT_EMPTY

      public static final int INSTRUMENT_EMPTY
      See Also:
    • INSTRUMENT_WITH_OSCILLATOR

      public static final int INSTRUMENT_WITH_OSCILLATOR
      See Also:
    • INSTRUMENT_WITH_OSCILLATOR_ADSR

      public static final int INSTRUMENT_WITH_OSCILLATOR_ADSR
      See Also:
    • INSTRUMENT_WITH_OSCILLATOR_ADSR_FILTER_LFO

      public static final int INSTRUMENT_WITH_OSCILLATOR_ADSR_FILTER_LFO
      See Also:
  • Method Details

    • create

      public static ToneEngine create()
    • create

      public static ToneEngine create(String... pName)
    • stop

      public void stop()
    • note_on

      public final void note_on(int note, int velocity, float duration)
      play a note
      Parameters:
      note - pitch of note ranging from 0 to 127
      velocity - volume of note ranging from 0 to 127
      duration - duration in seconds before the note is turned off again
    • note_on

      public abstract void note_on(int note, int velocity)
      play a note
      Parameters:
      note - pitch of note ranging from 0 to 127
      velocity - volume of note ranging from 0 to 127
    • note_off

      public abstract void note_off(int note)
      turn off a note
      Parameters:
      note - pitch of note to turn off
    • note_off

      public abstract void note_off()
      turns off the last played note.
    • control_change

      public abstract void control_change(int pCC, int pValue)
    • pitch_bend

      public abstract void pitch_bend(int pValue)
    • is_playing

      public abstract boolean is_playing()
    • instrument

      public abstract Instrument instrument(int pInstrumentID)
    • instrument

      public abstract Instrument instrument()
    • instruments

      public abstract ArrayList<? extends Instrument> instruments()
    • replace_instrument

      public abstract void replace_instrument(Instrument pInstrument)
    • get_buffer

      public float[] get_buffer()
    • get_buffer_left

      public float[] get_buffer_left()
    • get_buffer_right

      public float[] get_buffer_right()