Package wellen
Class ToneEngine
java.lang.Object
wellen.ToneEngine
- Direct Known Subclasses:
ToneEngineDSP
,ToneEngineMIDI
,ToneEngineOSC
the underlying engine that is used by
Tone
to handle instruments.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
control_change
(int pCC, int pValue) static ToneEngine
create()
static ToneEngine
float[]
float[]
float[]
abstract Instrument
abstract Instrument
instrument
(int pInstrumentID) abstract ArrayList<? extends Instrument>
abstract boolean
abstract void
note_off()
turns off the last played note.abstract void
note_off
(int note) turn off a noteabstract void
note_on
(int note, int velocity) play a notefinal void
note_on
(int note, int velocity, float duration) play a noteabstract void
pitch_bend
(int pValue) abstract void
replace_instrument
(Instrument pInstrument) void
stop()
-
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
-
create
-
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 127velocity
- volume of note ranging from 0 to 127duration
- 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 127velocity
- 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
-
instrument
-
instruments
-
replace_instrument
-
get_buffer
public float[] get_buffer() -
get_buffer_left
public float[] get_buffer_left() -
get_buffer_right
public float[] get_buffer_right()
-