public class Note
extends java.lang.Object
| Constructor and Description |
|---|
Note() |
| Modifier and Type | Method and Description |
|---|---|
Note |
copy() |
boolean |
equals(java.lang.Object o) |
float |
getFractionalKeyPart() |
int |
getGroupId() |
Instrument |
getInstrument() |
int |
getMcKey()
Calling this has the same effect as calling
getMidiKey(). |
float |
getMidiKey() |
int |
getNbsKey()
Calling this has the same effect as calling
getMidiKey(). |
float |
getPanning() |
float |
getPitch()
Calling this has the same effect as calling
getMidiKey(). |
float |
getVolume() |
int |
hashCode() |
boolean |
isOutsideMinecraftOctaveRange() |
Note |
setGroupId(int groupId) |
Note |
setInstrument(Instrument instrument) |
Note |
setMcKey(int mcKey)
Calling this has the same effect as calling
setMidiKey(float). |
Note |
setMidiKey(float midiKey) |
Note |
setNbsKey(float nbsKey)
Calling this has the same effect as calling
setMidiKey(float). |
Note |
setPanning(float panning) |
Note |
setPitch(float pitch)
Calling this has the same effect as calling
setMidiKey(float). |
Note |
setVolume(float volume) |
public int getGroupId()
public Note setGroupId(int groupId)
groupId - The group ID of the note. Groups are used in events to determine which notes are affected by an event. -1 means that the note is not in any group.public Instrument getInstrument()
MinecraftInstrument.public Note setInstrument(Instrument instrument)
instrument - The instrument of the note. Default Minecraft instruments are stored in MinecraftInstrument.public float getMidiKey()
public Note setMidiKey(float midiKey)
midiKey - The MIDI key of the note (21 = A0, 108 = C8). Fractional part is the fine-pitch.public int getMcKey()
getMidiKey().public Note setMcKey(int mcKey)
setMidiKey(float).mcKey - The key of the note in the Minecraft Note Block range (0-24). The center key (F#4) is 12.public int getNbsKey()
getMidiKey().public Note setNbsKey(float nbsKey)
setMidiKey(float).nbsKey - The key of the note in the Minecraft Note Block Studio range (0-87). The center key (F#4) is 45.public float getFractionalKeyPart()
public float getPitch()
getMidiKey().public Note setPitch(float pitch)
setMidiKey(float).pitch - The pitch of the note to use when playing the sample. (1.0F = normal speed, 2.0F = double speed, 0.5F = half speed). The center key (F#4) is 1.0F.public float getVolume()
public Note setVolume(float volume)
volume - The volume of the note. (0.0F = 0%, 1.0F = 100%)public float getPanning()
public Note setPanning(float panning)
panning - The panning of the note. (-1.0F = 100% left, 0.0F = 0% center, 1.0F = 100% right)public boolean isOutsideMinecraftOctaveRange()
public Note copy()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object