RAUL 0.8.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

midi_names.h

    00001 /* Names of standard MIDI events and controllers.
    00002  * Copyright (C) 2007-2009 David Robillard <http://drobilla.net>
    00003  *
    00004  * This library is free software; you can redistribute it and/or modify
    00005  * it under the terms of the GNU Lesser General Public License as
    00006  * published by the Free Software Foundation; either version 2.1 of
    00007  * the License, or (at your option) any later version.
    00008  *
    00009  * This program is distributed in the hope that it will be useful,
    00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    00012  * GNU Lesser General Public License for more details.
    00013  *
    00014  * You should have received a copy of the GNU Lesser General Public
    00015  * License along with this library; if not, write to the Free Software
    00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    00017  *
    00018  */
    00019
    00020 #ifndef RAUL_MIDI_NAMES_H
    00021 #define RAUL_MIDI_NAMES_H
    00022
    00023 #include "raul/midi_events.h"
    00024
    00025 #ifdef __cplusplus
    00026 namespace Raul {
    00027 extern "C" {
    00028 #endif
    00029
    00030
    00035 inline static const char* midi_name(uint8_t status)
    00036 {
    00037     switch (status) {
    00038
    00039     case MIDI_CMD_NOTE_OFF:
    00040         return "Note Off"; break;
    00041     case MIDI_CMD_NOTE_ON:
    00042         return "Note On"; break;
    00043     case MIDI_CMD_NOTE_PRESSURE:
    00044         return "Key Pressure"; break;
    00045     case MIDI_CMD_CONTROL:
    00046         return "Control Change"; break;
    00047     case MIDI_CMD_PGM_CHANGE:
    00048         return "Program Change"; break;
    00049     case MIDI_CMD_CHANNEL_PRESSURE:
    00050         return "Channel Pressure"; break;
    00051     case MIDI_CMD_BENDER:
    00052         return "Pitch Bender"; break;
    00053
    00054     case MIDI_CMD_COMMON_SYSEX:
    00055         return "Sysex (System Exclusive) Begin"; break;
    00056     case MIDI_CMD_COMMON_MTC_QUARTER:
    00057         return "MTC Quarter Frame"; break;
    00058     case MIDI_CMD_COMMON_SONG_POS:
    00059         return "Song Position"; break;
    00060     case MIDI_CMD_COMMON_SONG_SELECT:
    00061         return "Song Select"; break;
    00062     case MIDI_CMD_COMMON_TUNE_REQUEST:
    00063         return "Tune Request"; break;
    00064     case MIDI_CMD_COMMON_SYSEX_END:
    00065         return "End of Sysex"; break;
    00066     case MIDI_CMD_COMMON_CLOCK:
    00067         return "Clock"; break;
    00068     case MIDI_CMD_COMMON_TICK:
    00069         return "Tick"; break;
    00070     case MIDI_CMD_COMMON_START:
    00071         return "Start"; break;
    00072     case MIDI_CMD_COMMON_CONTINUE:
    00073         return "Continue"; break;
    00074     case MIDI_CMD_COMMON_STOP:
    00075         return "Stop"; break;
    00076     case MIDI_CMD_COMMON_SENSING:
    00077         return "Active Sensing"; break;
    00078     case MIDI_CMD_COMMON_RESET:
    00079         return "Reset"; break;
    00080
    00081     case MIDI_CTL_MSB_BANK:
    00082         return "Bank Select (Coarse)"; break;
    00083     case MIDI_CTL_MSB_MODWHEEL:
    00084         return "Modulation (Coarse)"; break;
    00085     case MIDI_CTL_MSB_BREATH:
    00086         return "Breath (Coarse)"; break;
    00087     case MIDI_CTL_MSB_FOOT:
    00088         return "Foot (Coarse)"; break;
    00089     case MIDI_CTL_MSB_PORTAMENTO_TIME:
    00090         return "Portamento Time (Coarse)"; break;
    00091     case MIDI_CTL_MSB_DATA_ENTRY:
    00092         return "Data Entry (Coarse)"; break;
    00093     case MIDI_CTL_MSB_MAIN_VOLUME:
    00094         return "Main Volume (Coarse)"; break;
    00095     case MIDI_CTL_MSB_BALANCE:
    00096         return "Balance (Coarse)"; break;
    00097     case MIDI_CTL_MSB_PAN:
    00098         return "Pan (Coarse)"; break;
    00099     case MIDI_CTL_MSB_EXPRESSION:
    00100         return "Expression (Coarse)"; break;
    00101     case MIDI_CTL_MSB_EFFECT1:
    00102         return "Effect 1 (Coarse)"; break;
    00103     case MIDI_CTL_MSB_EFFECT2:
    00104         return "Effect 2 (Coarse)"; break;
    00105     case MIDI_CTL_MSB_GENERAL_PURPOSE1:
    00106         return "General Purpose 1 (Coarse)"; break;
    00107     case MIDI_CTL_MSB_GENERAL_PURPOSE2:
    00108         return "General Purpose 2 (Coarse)"; break;
    00109     case MIDI_CTL_MSB_GENERAL_PURPOSE3:
    00110         return "General Purpose 3 (Coarse)"; break;
    00111     case MIDI_CTL_MSB_GENERAL_PURPOSE4:
    00112         return "General Purpose 4 (Coarse)"; break;
    00113     case MIDI_CTL_LSB_BANK:
    00114         return "Bank Select (Fine)"; break;
    00115     case MIDI_CTL_LSB_MODWHEEL:
    00116         return "Modulation (Fine)"; break;
    00117     case MIDI_CTL_LSB_BREATH:
    00118         return "Breath (Fine)"; break;
    00119     case MIDI_CTL_LSB_FOOT:
    00120         return "Foot (Fine)"; break;
    00121     case MIDI_CTL_LSB_PORTAMENTO_TIME:
    00122         return "Portamento Time (Fine)"; break;
    00123     case MIDI_CTL_LSB_DATA_ENTRY:
    00124         return "Data Entry (Fine)"; break;
    00125     case MIDI_CTL_LSB_MAIN_VOLUME:
    00126         return "Main Volume (Fine)"; break;
    00127     case MIDI_CTL_LSB_BALANCE:
    00128         return "Balance (Fine)"; break;
    00129     case MIDI_CTL_LSB_PAN:
    00130         return "Pan (Fine)"; break;
    00131     case MIDI_CTL_LSB_EXPRESSION:
    00132         return "Expression (Fine)"; break;
    00133     case MIDI_CTL_LSB_EFFECT1:
    00134         return "Effect 1 (Fine)"; break;
    00135     case MIDI_CTL_LSB_EFFECT2:
    00136         return "Effect 2 (Fine)"; break;
    00137     case MIDI_CTL_LSB_GENERAL_PURPOSE1:
    00138         return "General Purpose 1 (Fine)"; break;
    00139     case MIDI_CTL_LSB_GENERAL_PURPOSE2:
    00140         return "General Purpose 2 (Fine)"; break;
    00141     case MIDI_CTL_LSB_GENERAL_PURPOSE3:
    00142         return "General Purpose 3 (Fine)"; break;
    00143     case MIDI_CTL_LSB_GENERAL_PURPOSE4:
    00144         return "General Purpose 4 (Fine)"; break;
    00145     case MIDI_CTL_SUSTAIN:
    00146         return "Sustain Pedal"; break;
    00147     case MIDI_CTL_PORTAMENTO:
    00148         return "Portamento"; break;
    00149     case MIDI_CTL_SOSTENUTO:
    00150         return "Sostenuto"; break;
    00151     case MIDI_CTL_SOFT_PEDAL:
    00152         return "Soft Pedal"; break;
    00153     case MIDI_CTL_LEGATO_FOOTSWITCH:
    00154         return "Legato Foot Switch"; break;
    00155     case MIDI_CTL_HOLD2:
    00156         return "Hold2"; break;
    00157     case MIDI_CTL_SC1_SOUND_VARIATION:
    00158         return "Sound Variation"; break;
    00159     case MIDI_CTL_SC2_TIMBRE:
    00160         return "Sound Timbre"; break;
    00161     case MIDI_CTL_SC3_RELEASE_TIME:
    00162         return "Sound Release Time"; break;
    00163     case MIDI_CTL_SC4_ATTACK_TIME:
    00164         return "Sound Attack Time"; break;
    00165     case MIDI_CTL_SC5_BRIGHTNESS:
    00166         return "Sound Brightness"; break;
    00167     case MIDI_CTL_SC6:
    00168         return "Sound Control 6"; break;
    00169     case MIDI_CTL_SC7:
    00170         return "Sound Control 7"; break;
    00171     case MIDI_CTL_SC8:
    00172         return "Sound Control 8"; break;
    00173     case MIDI_CTL_SC9:
    00174         return "Sound Control 9"; break;
    00175     case MIDI_CTL_SC10:
    00176         return "Sound Control 10"; break;
    00177     case MIDI_CTL_GENERAL_PURPOSE5:
    00178         return "General Purpose 5"; break;
    00179     case MIDI_CTL_GENERAL_PURPOSE6:
    00180         return "General Purpose 6"; break;
    00181     case MIDI_CTL_GENERAL_PURPOSE7:
    00182         return "General Purpose 7"; break;
    00183     case MIDI_CTL_GENERAL_PURPOSE8:
    00184         return "General Purpose 8"; break;
    00185     case MIDI_CTL_PORTAMENTO_CONTROL:
    00186         return "Portamento Control"; break;
    00187     case MIDI_CTL_E1_REVERB_DEPTH:
    00188         return "Reverb Depth"; break;
    00189     case MIDI_CTL_E2_TREMOLO_DEPTH:
    00190         return "Tremolo Depth"; break;
    00191     case MIDI_CTL_E3_CHORUS_DEPTH:
    00192         return "Chorus Depth"; break;
    00193     case MIDI_CTL_E4_DETUNE_DEPTH:
    00194         return "Detune Depth"; break;
    00195     case MIDI_CTL_E5_PHASER_DEPTH:
    00196         return "Phaser Depth"; break;
    00197     case MIDI_CTL_DATA_INCREMENT:
    00198         return "Data Increment"; break;
    00199     case MIDI_CTL_DATA_DECREMENT:
    00200         return "Data Decrement"; break;
    00201     case MIDI_CTL_NONREG_PARM_NUM_LSB:
    00202         return "Non-registered Parameter Number"; break;
    00203     case MIDI_CTL_NONREG_PARM_NUM_MSB:
    00204         return "Non-registered Narameter Number"; break;
    00205     case MIDI_CTL_REGIST_PARM_NUM_LSB:
    00206         return "Registered Parameter Number"; break;
    00207     case MIDI_CTL_REGIST_PARM_NUM_MSB:
    00208         return "Registered Parameter Number"; break;
    00209     case MIDI_CTL_ALL_SOUNDS_OFF:
    00210         return "All Sounds Off"; break;
    00211     case MIDI_CTL_RESET_CONTROLLERS:
    00212         return "Reset Controllers"; break;
    00213     case MIDI_CTL_LOCAL_CONTROL_SWITCH:
    00214         return "Local Control Switch"; break;
    00215     case MIDI_CTL_ALL_NOTES_OFF:
    00216         return "All Notes Off"; break;
    00217     case MIDI_CTL_OMNI_OFF:
    00218         return "Omni Off"; break;
    00219     case MIDI_CTL_OMNI_ON:
    00220         return "Omni On"; break;
    00221     case MIDI_CTL_MONO1:
    00222         return "Mono 1"; break;
    00223     case MIDI_CTL_MONO2:
    00224         return "Mono 2"; break;
    00225     default:
    00226         return "Unnamed"; break;
    00227     }
    00228 }
    00229
    00230
    00231 #ifdef __cplusplus
    00232 } // extern "C"
    00233 } // namespace Raul
    00234 #endif
    00235
    00236
    00237 #endif /* RAUL_MIDI_NAMES_H */