public class TunePlayer extends Object
Constructor and Description |
---|
TunePlayer() |
TunePlayer(int sampleRate) |
Modifier and Type | Method and Description |
---|---|
void |
closeLine(SourceDataLine line) |
void |
downOctave() |
int |
getMillis()
Gets the current note length in milliseconds, by the current tempo.
|
int |
getNoteLength() |
int |
getOctave() |
int |
getSampleRate() |
int |
getTempo() |
int |
getTone(int step,
char mod)
Gets the value of the given tone for the current octave.
|
SourceDataLine |
openLine() |
boolean |
play(String commandString) |
void |
setNoteLength(int noteLength) |
void |
setOctave(int octave) |
void |
setTempo(int tempo) |
int |
toMillis(int noteLen)
Converts the given note length to milliseconds, by the current tempo.
|
void |
upOctave() |
public int getSampleRate()
public int getNoteLength()
public int getTempo()
public int getOctave()
public int getTone(int step, char mod)
public int getMillis()
public int toMillis(int noteLen)
public void setNoteLength(int noteLength)
public void setTempo(int tempo)
public void setOctave(int octave)
public void downOctave()
public void upOctave()
public SourceDataLine openLine() throws LineUnavailableException
LineUnavailableException
public void closeLine(SourceDataLine line)
public boolean play(String commandString)
Copyright © 2015–2022 SciJava. All rights reserved.