Returns the controller name (ie, "Volume H") for the specified controller number.
When MIDIGetEvent() matches a "Controller" type of event, it sets MIDIEvent.!Data1 to the controller number. MIDICtlName() can be used to retrieve the matching name.
Synopsis
name = MIDICtlName(number)
Args
number is the controller number for which the name is to be returned. If omitted, then the currently selected event's controller number is used.
Returns
The controller name, or an empty string if an error.
Notes
The defined controller numbers and their names are as follows:
0 BankSwH (Bank Select -- coarse) 1 Mod H (MOD wheel -- coarse) 2 Breath H (Breath controller -- coarse) 4 FootPd H (Foot Pedal -- coarse) 5 P Time H (Portamento Time -- coarse) 6 Data H (Data Entry -- coarse) 7 Vol H (Volume -- coarse) 8 Balanc H (Balance -- coarse) 10 Pan H (Pan position -- coarse) 11 Expres H (Expression -- coarse) 12 Effc 1 H (Effect Control 1 -- coarse) 13 Effc 2 H (Effect Control 2 -- coarse) 16 Generl 1 (General Purpose Slider 1) 17 Generl 2 18 Generl 3 19 Generl 4 32 BankSwL (Bank Select -- fine) 33 Mod L (Modulation Wheel -- fine) 34 Breath L 36 FootPd L 37 P Time L 38 Data L 39 Vol L 40 Balanc L 42 Pan L 43 Expres L 44 Effc 1 L 45 Effc 2 L (Effect Control 2 -- fine) 64 Hold Ped 65 Porta On (Portamento On/Off) 66 Sustenut (Sustenuto pedal On/Off) 67 Soft Ped 68 LegatoPd (Legato pedal On/Off) 69 Hold2Ped 70 Snd Vari (Sound Variation) 71 Timbre (Sound Timbre) 72 Rel Time (Sound Release Time) 73 Atk Time (Sound Attack Time) 74 Brightns (Sound Brightness) 75 SndCtl 6 (Generic sound control) 76 SndCtl 7 77 SndCtl 8 78 SndCtl 9 79 SndCtl 10 80 Generl 5 (General Purpose Button 5 On/Off) 81 Generl 6 82 Generl 7 83 Generl 8 91 Effects (Effects Volume) 92 Tremulo (Tremulo Volume) 93 Chorus (Chorus Volume) 94 Celeste (Celeste Volume) 95 Phaser (Phaser Volume) 96 Data + (Data button increment) 97 Data - (Data button decrement) 98 NRPN H (Non-registered parameter - fine) 99 NRPN H (Non-registered parameter - coarse) 100 RPN H (Registered parameter - fine) 101 RPN H (Registered parameter - coarse) 120 Sound Off (All Sounds Off) 121 ContlOff (All Controllers Off) 122 LocalKey (Local keyboard On/Off) 123 NotesOff (All Notes Off) 124 Omni Off (Omni Mode Off) 125 Omni On (Omni Mode On) 126 Mono On (Mono Mode On) 127 Poly On (Poly Mode On)If you set the MidiErr variable to raise a condition, and you omit number, then that condition is raised if there is no currently selected event.
Examples
/* Get the name corresponding to a controller number of 0 */ name = MIDICtlName(0) IF name \== "" THEN SAY 'controller name =' name /* Query the current event's controller name */ name = MIDICtlName() IF name \== "" THEN SAY 'controller name =' name /* Display all defined controller names */ DO i = 0 TO 127 name = MIDICtlName(i) IF name \== "" THEN SAY name END