public class MidiCalculator
extends java.lang.Object
Note: "Midi" is not "MIDI" to be consistent with the naming convention of existing Java classes.
Constructor and Description |
---|
MidiCalculator() |
Modifier and Type | Method and Description |
---|---|
static int |
numberFor(char pitch,
boolean sharp,
int octave)
Calculate the MIDI number.
|
public static int numberFor(char pitch, boolean sharp, int octave)
pitch
- The pitch ('A','B','C','D','E','F', 'G' or 'R')sharp
- true for a sharp and false for a naturaloctave
- The octave (relative to middle C)