public class MinecraftDefinitions
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MC_HIGHEST_KEY |
static int |
MC_KEYS |
static int |
MC_LOWEST_KEY |
| Constructor and Description |
|---|
MinecraftDefinitions() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clampNoteKey(Note note)
Clamps the key of the note to fall within minecraft octave range.
|
static void |
instrumentShiftNote(Note note)
"Transposes" the key of the note by shifting the instrument to a higher or lower sounding one.
|
static boolean |
isOutsideOctaveRange(int nbsKey) |
static float |
mcKeyToMcPitch(int mcKey) |
static int |
mcKeyToNbsKey(int mcKey)
Converts a key from the minecraft system to the NBS system
|
static int |
mcPitchToMcKey(float mcPitch) |
static int |
nbsKeyToMcKey(int nbsKey)
Converts a key from the NBS system to the minecraft system
|
static float |
nbsPitchToMcPitch(int nbsPitch) |
static void |
transposeNoteKey(Note note)
Transposes the key of the note to fall within minecraft octave range.
|
static void |
transposeNoteKey(Note note,
int transposeAmount)
Transposes the key of the note to fall within minecraft octave range.
|
public static final int MC_LOWEST_KEY
public static final int MC_HIGHEST_KEY
public static final int MC_KEYS
public static float mcKeyToMcPitch(int mcKey)
mcKey - The key of the note in the minecraft id systempublic static int mcPitchToMcKey(float mcPitch)
mcPitch - The pitch of the note (Between 0 and 2)public static float nbsPitchToMcPitch(int nbsPitch)
nbsPitch - The pitch of the note (Between 0 and 2400)public static int nbsKeyToMcKey(int nbsKey)
nbsKey - The key of the note in the NBS systempublic static int mcKeyToNbsKey(int mcKey)
mcKey - The key of the note in the minecraft id systempublic static boolean isOutsideOctaveRange(int nbsKey)
nbsKey - The key of the note in the NBS systempublic static void clampNoteKey(Note note)
note - The note to clamppublic static void transposeNoteKey(Note note)
note - The note to transposepublic static void transposeNoteKey(Note note, int transposeAmount)
note - The note to transposetransposeAmount - The amount of keys to transpose bypublic static void instrumentShiftNote(Note note)
note - The note to transpose