Class MidiParserListenerAdapter

java.lang.Object
org.jjazz.midi.api.parser.MidiParserListenerAdapter
All Implemented Interfaces:
MidiParserListener

public class MidiParserListenerAdapter extends Object implements MidiParserListener
  • Constructor Details

    • MidiParserListenerAdapter

      public MidiParserListenerAdapter()
  • Method Details

    • beforeParsingStarts

      public void beforeParsingStarts()
      Description copied from interface: MidiParserListener
      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.
      Specified by:
      beforeParsingStarts in interface MidiParserListener
    • afterParsingFinished

      public void afterParsingFinished()
      Description copied from interface: MidiParserListener
      Called when the parser has parsed its last item. Provides listeners with a chance to clean up.
      Specified by:
      afterParsingFinished in interface MidiParserListener
    • onChannelChanged

      public void onChannelChanged(byte channel)
      Description copied from interface: MidiParserListener
      Called when the parser encounters a new channel. known as a Voice). Tracks correspond to MIDI tracks/channels.
      Specified by:
      onChannelChanged in interface MidiParserListener
      Parameters:
      channel - the new track event that has been parsed
    • onInstrumentParsed

      public void onInstrumentParsed(byte instrument, float positionInBeats)
      Description copied from interface: MidiParserListener
      Called when the parser encounters a new instrument selection.
      Specified by:
      onInstrumentParsed in interface MidiParserListener
      Parameters:
      instrument - the MIDI instrument (program change) value that has been parsed
    • onTempoChanged

      public void onTempoChanged(int tempoBPM, float positionInBeats)
      Description copied from interface: MidiParserListener
      Called when the parser encounters a new tempo selection.
      Specified by:
      onTempoChanged in interface MidiParserListener
      Parameters:
      tempoBPM - The new tempo value
    • onTimeSignatureParsed

      public void onTimeSignatureParsed(byte numerator, byte powerOfTwo, float positionInBeats)
      Description copied from interface: MidiParserListener
      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)
      Specified by:
      onTimeSignatureParsed in interface MidiParserListener
    • onPitchWheelParsed

      public void onPitchWheelParsed(byte lsb, byte msb, float positionInBeats)
      Specified by:
      onPitchWheelParsed in interface MidiParserListener
    • onChannelPressureParsed

      public void onChannelPressureParsed(byte pressure, float positionInBeats)
      Specified by:
      onChannelPressureParsed in interface MidiParserListener
    • onPolyphonicPressureParsed

      public void onPolyphonicPressureParsed(byte key, byte pressure, float positionInBeats)
      Specified by:
      onPolyphonicPressureParsed in interface MidiParserListener
    • onSystemExclusiveParsed

      public void onSystemExclusiveParsed(float positionInBeats, byte... bytes)
      Specified by:
      onSystemExclusiveParsed in interface MidiParserListener
    • onControllerEventParsed

      public void onControllerEventParsed(byte controller, byte value, float positionInBeats)
      Specified by:
      onControllerEventParsed in interface MidiParserListener
    • onLyricParsed

      public void onLyricParsed(String lyric, float positionInBeats)
      Specified by:
      onLyricParsed in interface MidiParserListener
    • onTrackNameParsed

      public void onTrackNameParsed(String name, float positionInBeats)
      Specified by:
      onTrackNameParsed in interface MidiParserListener
    • onTextParsed

      public void onTextParsed(String name, float positionInBeats)
      Specified by:
      onTextParsed in interface MidiParserListener
    • onMarkerParsed

      public void onMarkerParsed(String marker, float positionInBeats)
      Specified by:
      onMarkerParsed in interface MidiParserListener
    • onNoteParsed

      public void onNoteParsed(Note note, float positionInBeats)
      Specified by:
      onNoteParsed in interface MidiParserListener
    • onMetaEndEvent

      public void onMetaEndEvent(float positionInBeats)
      Description copied from interface: MidiParserListener
      Called when the parser encounters the END META Event.
      Specified by:
      onMetaEndEvent in interface MidiParserListener