Interface MidiParserListener

All Known Implementing Classes:
MidiParserListenerAdapter

public interface MidiParserListener
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the parser has parsed its last item.
    void
    Called when the parser first starts up, but before it starts parsing anything.
    void
    onChannelChanged(byte channel)
    Called when the parser encounters a new channel. known as a Voice).
    void
    onChannelPressureParsed(byte pressure, float positionInBeats)
     
    void
    onControllerEventParsed(byte controller, byte value, float positionInBeats)
     
    void
    onInstrumentParsed(byte progChange, float positionInBeats)
    Called when the parser encounters a new instrument selection.
    void
    onLyricParsed(String lyric, float positionInBeats)
     
    void
    onMarkerParsed(String marker, float positionInBeats)
     
    void
    onMetaEndEvent(float positionInBeats)
    Called when the parser encounters the END META Event.
    void
    onNoteParsed(Note note, float positionInBeats)
     
    void
    onPitchWheelParsed(byte lsb, byte msb, float positionInBeats)
     
    void
    onPolyphonicPressureParsed(byte key, byte pressure, float positionInBeats)
     
    void
    onSystemExclusiveParsed(float positionInBeats, byte... bytes)
     
    void
    onTempoChanged(int tempoBPM, float positionInBeats)
    Called when the parser encounters a new tempo selection.
    void
    onTextParsed(String text, float positionInBeats)
     
    void
    onTimeSignatureParsed(byte numerator, byte powerOfTwo, float positionInBeats)
    The first parameter is the number of beats per measure; The second parameter is the power by which 2 must be raised to create the note that represents one beat.
    void
    onTrackNameParsed(String name, float positionInBeats)
     
  • Method Details

    • beforeParsingStarts

      void beforeParsingStarts()
      Called when the parser first starts up, but before it starts parsing anything. Provides listeners with a chance to initialize variables and get ready for the parser events.
    • afterParsingFinished

      void afterParsingFinished()
      Called when the parser has parsed its last item. Provides listeners with a chance to clean up.
    • onMetaEndEvent

      void onMetaEndEvent(float positionInBeats)
      Called when the parser encounters the END META Event.
      Parameters:
      positionInBeats -
    • onChannelChanged

      void onChannelChanged(byte channel)
      Called when the parser encounters a new channel. known as a Voice). Tracks correspond to MIDI tracks/channels.
      Parameters:
      channel - the new track event that has been parsed
    • onInstrumentParsed

      void onInstrumentParsed(byte progChange, float positionInBeats)
      Called when the parser encounters a new instrument selection.
      Parameters:
      progChange - the MIDI instrument (program change) value that has been parsed
    • onTempoChanged

      void onTempoChanged(int tempoBPM, float positionInBeats)
      Called when the parser encounters a new tempo selection.
      Parameters:
      tempoBPM - The new tempo value
    • onTimeSignatureParsed

      void onTimeSignatureParsed(byte numerator, byte powerOfTwo, float positionInBeats)
      The first parameter is the number of beats per measure; The second parameter is the power by which 2 must be raised to create the note that represents one beat. Example 1: For a 5/8 time signature, expect 5,3 (since 2^3 = 8) Example 2: For a 4/4 time signature, expect 4,2 (since 2^2 = 4)
    • onPitchWheelParsed

      void onPitchWheelParsed(byte lsb, byte msb, float positionInBeats)
    • onChannelPressureParsed

      void onChannelPressureParsed(byte pressure, float positionInBeats)
    • onPolyphonicPressureParsed

      void onPolyphonicPressureParsed(byte key, byte pressure, float positionInBeats)
    • onSystemExclusiveParsed

      void onSystemExclusiveParsed(float positionInBeats, byte... bytes)
    • onControllerEventParsed

      void onControllerEventParsed(byte controller, byte value, float positionInBeats)
    • onLyricParsed

      void onLyricParsed(String lyric, float positionInBeats)
    • onTrackNameParsed

      void onTrackNameParsed(String name, float positionInBeats)
    • onTextParsed

      void onTextParsed(String text, float positionInBeats)
    • onMarkerParsed

      void onMarkerParsed(String marker, float positionInBeats)
    • onNoteParsed

      void onNoteParsed(Note note, float positionInBeats)