Description of a MIDI Channel associated to the MIDI synth.
They serve to distinguish between instruments and provide independent control over each one.
By transmitting MIDI messages on their respective channels, you can alter the instrument, volume, pitch, and other parameters.
Within the Maestro Midi Player Toolkit, MIDI channels are designated numerically from 0 to 15. Notably, channel 9 is set aside specifically for drum sounds.
More...
Public Member Functions | |
int | Controller (MPTKController numController, int valueController=-1) |
override string | ToString () |
Public Attributes | |
byte[] | key_pressure |
int | LastBank |
int | LastPreset |
Properties | |
int | BankNum [get, set] |
int | Channel [get] |
bool | Enable [get, set] |
int | ForcedBank [get, set] |
int | ForcedPreset [get, set] |
int | NoteCount [get, set] |
string | PresetName [get] |
int | PresetNum [get, set] |
float | Volume [get, set] |
Description of a MIDI Channel associated to the MIDI synth.
They serve to distinguish between instruments and provide independent control over each one.
By transmitting MIDI messages on their respective channels, you can alter the instrument, volume, pitch, and other parameters.
Within the Maestro Midi Player Toolkit, MIDI channels are designated numerically from 0 to 15. Notably, channel 9 is set aside specifically for drum sounds.
int MidiPlayerTK.MPTKChannel.Controller | ( | MPTKController | numController, |
int | valueController = -1 |
||
) |
Read or write the value of the controller.
numController | Controller to read or write |
valueController | Value to set, default is -1 for only reading the controller value (no write) |
override string MidiPlayerTK.MPTKChannel.ToString | ( | ) |
Build an information string about the channel. It's also a good pretext to display an example of Channel API.
Exemple of return
channel | index channel |
byte [] MidiPlayerTK.MPTKChannel.key_pressure |
MIDI polyphonic key pressure from [0;127]
int MidiPlayerTK.MPTKChannel.LastBank |
Last bank used for this channel, useful when a forced preset has been set.
int MidiPlayerTK.MPTKChannel.LastPreset |
Last preset used for this channel, useful when a forced preset has been set.
|
getset |
Get or Set the current bank number associated to the channel.
Each MIDI channel can play a different preset and bank.
You can find bank and preset number with the menu Maestro / SoundFont Setup in Right Panel,
click on buttons with an eye icon to get all the presets for each bank.
|
get |
Channel number between 0 and 15, channel 9 is set aside specifically for drum sounds.
|
getset |
Properties to enable (unmute) or disable (mute) a channel or get status. All channels are unmuted when MIDI start playing (MidiFilePlayer::MPTK_Play).
By the way, to mute channels just before the playing, use the MidiFilePlayer::OnEventStartPlayMidi.
Look to the demo: Assets\MidiPlayer\Demo\FreeMVP\MidiLoop.cs
|
getset |
Get or Set forced bank on the channel from 0 to 65635. MIDI will allways using this bank even if a bank change message is received.
Set to -1 to disable this behavior.
|
getset |
Get or Set forced preset on the channel. MIDI will allways playing with this preset even if a MIDI Preset Change message is received.
Set to -1 to disable this behavior.
channel |
|
getset |
Get or Set the count of notes (NoteOn) played since the start of the MIDI. Set could be usefull to reset the value to 0.
|
get |
Get the current preset name for the channel.
Each MIDI channel can play a different preset.
channel | MIDI channel must be between 0 and 15 |
|
getset |
Get or Set current preset number associated to the channel. Value must be between 0 and 127 (if you have a full GM SoundFont).
Each MIDI channel can play a different preset and bank.
You can find bank and preset number with the menu Maestro / SoundFont Setup in Right Panel,
click on buttons with an eye icon to get all the presets for each bank.
|
getset |
Get or Set the volume for a channel as a percentage between 0 and 1.