Class Channel

All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Channel
extends MidiNumber

Channel is in the range 0..15 -- User depictions are always 1-16.

Channels are special, as a multi-timbral synthesizer can assign a different Instrument to each channel. Normally, Channels only apply to the 7 voice messages ( NoteOff, NoteOn, KeyAfterTouch, ControlChange, PatchChange, ChannelAfterTouch PitchWheelChange ), but in a Standard Midi File, Meta-Events can also be assigned a {@link EventType#kChannelPrefix Channel.

A Channel is usually thought of as a Part, but some synthesizers can layer many parts into one Layer which is controlled by the note messages of one Channel.

We may want to include the MIDI Port number here and have up to 4096 Channels.

Richard C. Penner II
See Also:
Serialized Form

Fields inherited from class com.dixshtix.midi.MidiNumber
Fields inherited from class java.lang.Number
Constructor Summary
Channel(int num)
Method Summary
 java.lang.String toString()
          Converts Channel class to a clear English message.
Methods inherited from class com.dixshtix.midi.MidiNumber
byteValue, doubleValue, equals, floatValue, hashCode, intValue, longValue, shortValue
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait

Constructor Detail


public Channel(int num)
num - An integer always in the range 0..15.
Method Detail


public java.lang.String toString()
Converts Channel class to a clear English message.

NOTE: Although the MIDI Status byte counts the 16 MIDI channels as numbers 0x0 to 0xF (ie, 15), all MIDI gear (including computer software) displays a channel number to the musician as 1 to 16. So, a Status byte sent on MIDI channel 0 is considered to be on "channel 1" as far as the musician is concerned. This discrepancy between the status byte's channel number, and what channel the musician "believes" that a MIDI message is on, is accepted because most humans start counting things from 1, rather than 0.

toString in class MidiNumber
The English String corresponding to Channel[1]..[16]