Class MUS.NotePlayEvent

java.lang.Object
net.mtrop.doom.sound.MUS.Event
net.mtrop.doom.sound.MUS.NotePlayEvent
Enclosing class:
MUS

public static class MUS.NotePlayEvent extends MUS.Event
Note play event.
  • Field Details

    • VOLUME_NO_CHANGE

      public static final int VOLUME_NO_CHANGE
      See Also:
    • volume

      protected int volume
      The volume that the note will be played.
    • note

      protected int note
      The 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 - if volume is not between 0 and 127 nor VOLUME_NO_CHANGE.
    • toBytes

      public byte[] toBytes()
      Specified by:
      toBytes in class MUS.Event
      Returns:
      this event to a serialized byte form.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 - if note is not between 0 and 127.