public class MidiHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
NOTES |
| Constructor and Description |
|---|
MidiHelper() |
| Modifier and Type | Method and Description |
|---|---|
static int |
computeMidiCodeFromNoteAndOctave(int midiNote,
int octave) |
static int |
extractNoteFromMidiCode(int code)
retourne le no de la note, du code midi passé en paramètre
|
static java.lang.String |
getLocalizedMidiNote(int note)
Get a localized midi note text, without octave
|
static java.lang.String |
getMidiNote(int note)
get a text associated to the midi code, without octave
|
static int |
getOctave(int code)
compute the octave of a midi code
|
static double |
hertz(int midicode)
Convert midi code to hertz
|
static boolean |
isDiese(int midicode)
return a boolean to indicate if the midicode is a diese
|
static java.lang.String |
localizedMidiLibelle(int code)
Get the text associated to the midi code
|
static void |
main(java.lang.String[] args)
test function
|
static int |
midiCode(java.lang.String s)
Read a coded midi code texte, and translate it to midi code
|
static java.lang.String |
midiLibelle(int code)
This function convert a midi code to text, with octave
|
public static int midiCode(java.lang.String s)
throws java.security.InvalidParameterException
s - the midi code texte (D3, D#3 for example)ScaleException - Exception is raised if the text is not properly formattedjava.security.InvalidParameterExceptionpublic static java.lang.String midiLibelle(int code)
code - public static int extractNoteFromMidiCode(int code)
code - le code midipublic static int computeMidiCodeFromNoteAndOctave(int midiNote,
int octave)
public static java.lang.String localizedMidiLibelle(int code)
code - public static java.lang.String getLocalizedMidiNote(int note)
note - public static java.lang.String getMidiNote(int note)
note - public static int getOctave(int code)
code - in (0-12) rangepublic static double hertz(int midicode)
midicode - public static boolean isDiese(int midicode)
midicode - public static void main(java.lang.String[] args)
throws java.lang.Exception
args - java.lang.Exception