Class ChannelRerouter

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

public class ChannelRerouter extends JJazzMidiDevice
This MidiDevice can reroute MidiMessages from one channel to another. Rerouting are added via the addRerouting().
  • Constructor Details

    • ChannelRerouter

      public ChannelRerouter()
      By default does not reroute any message.
  • Method Details

    • addRerouting

      public void addRerouting(int channelFrom, int channelTo)
    • clearReroutings

      public void clearReroutings()
    • getRerouting

      public int getRerouting(int fromChannel)
      Parameters:
      fromChannel -
      Returns:
      The new channel to be used, or -1 if no rerouting registered.
    • 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