![]() |
Maestro - Midi Player Tool Kit for Unity Version 2.18.2
|
Runtime state for one MIDI channel in the synth.
A channel contains independent settings used to render events on that channel:
More...
Public Member Functions | |
| override string | ToString () |
| Builds a debug string that summarizes the channel state. Example output: | |
| int | Controller (MPTKController numController, int valueController=-1) |
Reads or writes a controller value.
. | |
Public Attributes | |
| int | LastPreset |
| Last preset used on this channel. Used when restoring after a forced preset. | |
| int | LastBank |
| Last bank used on this channel. Used when restoring after a forced bank. | |
| byte[] | key_pressure |
Properties | |
| int | Channel [get] |
| Zero-based channel number. Standard MIDI channels are 0 to 15; channel 9 is conventionally percussion. | |
| bool | Enable [get, set] |
| Enables (unmutes) or disables (mutes) this channel. All channels are unmuted when MIDI starts playing (MidiFilePlayer.MPTK_Play). To mute channels just before playback starts, use MidiFilePlayer.OnEventStartPlayMidi. | |
| int | NoteCount [get, set] |
| Gets or sets the number of NoteOn events played since MIDI start. You can also set it, for example to reset it to 0. | |
| float | Volume [get, set] |
| Gets or sets channel volume, from 0.0 to 1.0. | |
| int | PresetNum [get, set] |
| Gets or sets the current preset number for this channel. Value must be between 0 and 127 (with a full GM SoundFont). Each MIDI channel can play a different preset and bank. You can inspect available banks and presets from Maestro / SoundFont Setup (right panel), then click the eye icon buttons. | |
| int | BankNum [get, set] |
| Gets or sets the current bank number for this channel. Each MIDI channel can play a different preset and bank. You can inspect available banks and presets from Maestro / SoundFont Setup (right panel), then click the eye icon buttons. | |
| string | PresetName [get] |
| Gets the current preset name for this channel. Each MIDI channel can use a different preset. | |
| int | ForcedPreset [get, set] |
| Gets or sets a forced preset for this channel. When set to a value >= 0, the channel always uses this preset, even if a Program Change is received. Set to -1 to disable this behavior. | |
| int | ForcedBank [get, set] |
| Gets or sets a forced bank for this channel. When set to a value >= 0, the channel always uses this bank, even if a bank change message is received. Set to -1 to disable this behavior. | |
Runtime state for one MIDI channel in the synth.
A channel contains independent settings used to render events on that channel:
Channels are zero-based in MPTK (0 to 15). In General MIDI, channel 9 is typically used for percussion.
| override string MidiPlayerTK.MPTKChannel.ToString | ( | ) |
Builds a debug string that summarizes the channel state.
Example output:
| int MidiPlayerTK.MPTKChannel.Controller | ( | MPTKController | numController, |
| int | valueController = -1 ) |
Reads or writes a controller value.
.
| numController | Controller to read or write |
| valueController | Value to set. Default is -1 to read only (no write). |
| byte [] MidiPlayerTK.MPTKChannel.key_pressure |
MIDI polyphonic key pressure from [0;127]
|
getset |
Gets or sets channel volume, from 0.0 to 1.0.
|
getset |
Gets or sets the current preset number for this channel.
Value must be between 0 and 127 (with a full GM SoundFont). Each MIDI channel can play a different preset and bank.
You can inspect available banks and presets from Maestro / SoundFont Setup (right panel), then click the eye icon buttons.
|
getset |
Gets or sets the current bank number for this channel.
Each MIDI channel can play a different preset and bank.
You can inspect available banks and presets from Maestro / SoundFont Setup (right panel), then click the eye icon buttons.
|
get |
Gets the current preset name for this channel.
Each MIDI channel can use a different preset.
|
getset |
Gets or sets a forced preset for this channel.
When set to a value >= 0, the channel always uses this preset, even if a Program Change is received. Set to -1 to disable this behavior.
|
getset |
Gets or sets a forced bank for this channel.
When set to a value >= 0, the channel always uses this bank, even if a bank change message is received. Set to -1 to disable this behavior.