DirectX SDK

Channels

A channel is a destination for a message that is specific to one part in the performance. For example, a channel might receive a note-on message that causes the instrument on that channel to make a sound, or a program-change message that assigns a different instrument to that part. (See MIDI Channel Messages.)

Under the MIDI 1.0 standard, there are 16 MIDI channels, meaning that no more than 16 instruments can be playing at one time. To support this standard but at the same time make more channels available to applications, DirectMusic creates channel groups. Up to 65,536 channel groups can exist at one time, each containing 16 channels, for a total of over one million channels. A particular port can be assigned any number of channel groups, up to its capability to support them. Legacy MIDI hardware ports have only a single channel group.

System-exclusive messages address all 16 channels within a channel group, but not other channel groups.

Every instrument in a DirectMusic performance has a unique performance channel, or PChannel. The PChannel represents a particular MIDI channel in a particular group on a particular port. When a band is selected by a performance, each instrument in that band is mapped to a PChannel.

[C++]

The number of notes that can be played simultaneously is limited by the number of voices available on the port. (This number can be determined from the dwMaxVoices member of the DMUS_PORTCAPS structure.)

[Visual Basic]

The number of notes that can be played simultaneously is limited by the number of voices available on the port. (This number can be determined from the lMaxVoices member of the DMUS_PORTCAPS type.)

A voice is a set of resources dedicated to the synthesis of a single note being played on a channel. If there are more notes playing than there are available voices, one or more notes must be suppressed by the synthesizer. The choice is determined by the priority of the voice currently playing the note, which is based in turn on the priority of the channel. By default, channels are ranked according to their index value, except that channel 10, the MIDI percussion channel, is ranked highest.

[C++]

Applications and synthesizers can set their own channel priorities. For more information, see the Remarks for IDirectMusicPort::GetChannelPriority. See also DMUS_CHANNEL_PRIORITY_PMSG.