Package org.jjazz.midi.api.device
Class ChannelRerouter
java.lang.Object
org.jjazz.midi.api.device.JJazzMidiDevice
org.jjazz.midi.api.device.ChannelRerouter
- All Implemented Interfaces:
AutoCloseable
,MidiDevice
This MidiDevice can reroute MidiMessages from one channel to another. Rerouting are added via the addRerouting().
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.sound.midi.MidiDevice
MidiDevice.Info
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRerouting
(int channelFrom, int channelTo) void
Must be overridden by subclasses.int
getRerouting
(int fromChannel) Methods inherited from class org.jjazz.midi.api.device.JJazzMidiDevice
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getMicrosecondPosition, getReceivers, getTransmitter, getTransmitters, isOpen, open
-
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
Description copied from class:JJazzMidiDevice
Must be overridden by subclasses.- Specified by:
getReceiver
in interfaceMidiDevice
- Overrides:
getReceiver
in classJJazzMidiDevice
-