Class MidiChannelDispatcher

java.lang.Object
org.jjazz.midi.api.device.JJazzMidiDevice
org.jjazz.midi.api.device.MidiChannelDispatcher
All Implemented Interfaces:
AutoCloseable, MidiDevice

public class MidiChannelDispatcher extends JJazzMidiDevice
This MidiDevice dispatches incoming MidiMessages on different transmitters depending on the midi channel of the message.
  • Constructor Details

    • MidiChannelDispatcher

      public MidiChannelDispatcher()
  • Method Details

    • getTransmitter

      public Transmitter getTransmitter()
      Return a transmitter for channel 0.
      Specified by:
      getTransmitter in interface MidiDevice
      Overrides:
      getTransmitter in class JJazzMidiDevice
      Returns:
    • getTransmitter

      public Transmitter getTransmitter(int channel)
      Return a transmitter for a specific channel only.
      Parameters:
      channel - The channel associated to this transmitter. 0 <= channel <= 16. Channel 16 is used to transmit MidiMessages not bound to a channel (SysExMessage, MetaMessage...).
      Returns:
    • getTransmitters

      public List<Transmitter> getTransmitters(int channel)
    • getReceiver

      public Receiver getReceiver()
      Description copied from class: JJazzMidiDevice
      Must be overridden by subclasses.
      Specified by:
      getReceiver in interface MidiDevice
      Overrides:
      getReceiver in class JJazzMidiDevice