public class DefaultNotePlayer extends java.lang.Object implements NotePlayer
Constructor and Description |
---|
DefaultNotePlayer(Synthesizer synth,
VoiceAllocator allocator) |
Modifier and Type | Method and Description |
---|---|
void |
noteOff(byte noteNumber,
double frequency,
double amplitude,
double time) |
void |
noteOn(byte noteNumber,
double frequency,
double amplitude,
double time) |
void |
noteOnFor(double frequency,
double time,
double duration) |
void |
noteOnFor(double frequency,
double amplitude,
double time,
double duration) |
void |
waitUntil(double time) |
public DefaultNotePlayer(Synthesizer synth, VoiceAllocator allocator)
public void noteOnFor(double frequency, double time, double duration)
public void waitUntil(double time) throws java.lang.InterruptedException
waitUntil
in interface NotePlayer
java.lang.InterruptedException
public void noteOn(byte noteNumber, double frequency, double amplitude, double time)
noteOn
in interface NotePlayer
public void noteOff(byte noteNumber, double frequency, double amplitude, double time)
noteOff
in interface NotePlayer
public void noteOnFor(double frequency, double amplitude, double time, double duration)
noteOnFor
in interface NotePlayer