Package org.jjazz.midi.api.device
Class MidiChannelDispatcher
java.lang.Object
org.jjazz.midi.api.device.JJazzMidiDevice
org.jjazz.midi.api.device.MidiChannelDispatcher
- All Implemented Interfaces:
AutoCloseable
,MidiDevice
This MidiDevice dispatches incoming MidiMessages on different transmitters depending on the midi channel of the message.
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.sound.midi.MidiDevice
MidiDevice.Info
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMust be overridden by subclasses.Return a transmitter for channel 0.getTransmitter
(int channel) Return a transmitter for a specific channel only.getTransmitters
(int channel) Methods inherited from class org.jjazz.midi.api.device.JJazzMidiDevice
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getMicrosecondPosition, getReceivers, getTransmitters, isOpen, open
-
Constructor Details
-
MidiChannelDispatcher
public MidiChannelDispatcher()
-
-
Method Details
-
getTransmitter
Return a transmitter for channel 0.- Specified by:
getTransmitter
in interfaceMidiDevice
- Overrides:
getTransmitter
in classJJazzMidiDevice
- Returns:
-
getTransmitter
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
-
getReceiver
Description copied from class:JJazzMidiDevice
Must be overridden by subclasses.- Specified by:
getReceiver
in interfaceMidiDevice
- Overrides:
getReceiver
in classJJazzMidiDevice
-