Package net.mtrop.doom.sound
Class MUS.NotePlayEvent
java.lang.Object
net.mtrop.doom.sound.MUS.Event
net.mtrop.doom.sound.MUS.NotePlayEvent
- Enclosing class:
- MUS
Note play event.
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
The event's note.protected int
The volume that the note will be played.static final int
Fields inherited from class net.mtrop.doom.sound.MUS.Event
channel, restTics, type, TYPE_CHANGE_CONTROLLER, TYPE_PITCH, TYPE_PLAY, TYPE_RELEASE, TYPE_SCORE_END, TYPE_SYSTEM
-
Method Summary
Methods inherited from class net.mtrop.doom.sound.MUS.Event
getChannel, getRestTics, getType, isLast, setChannel, setRestTics
-
Field Details
-
VOLUME_NO_CHANGE
public static final int VOLUME_NO_CHANGE- See Also:
-
volume
protected int volumeThe volume that the note will be played. -
note
protected int noteThe event's note.
-
-
Method Details
-
getVolume
public int getVolume()- Returns:
- this event's volume.
-
setVolume
public void setVolume(int volume) Sets this event's volume, or no change.- Parameters:
volume
- the new volume value.- Throws:
IllegalArgumentException
- ifvolume
is not between 0 and 127 nor VOLUME_NO_CHANGE.
-
toBytes
public byte[] toBytes() -
toString
-
getNote
public int getNote()- Returns:
- this event's note.
-
setNote
public void setNote(int note) Sets this event's note.- Parameters:
note
- the new note.- Throws:
IllegalArgumentException
- ifnote
is not between 0 and 127.
-