1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * This file is part of gmidimonitor
6 * Copyright (C) 2005,2006,2007,2008 Nedko Arnaudov <nedko@arnaudov.name>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *****************************************************************************/
28 static const char * g_gm_instrument_names
[] =
30 "Acoustic Grand Piano", /* 1 */
31 "Bright Acoustic Piano", /* 2 */
32 "Electric Grand Piano", /* 3 */
33 "Honky-tonk Piano", /* 4 */
34 "Electric Piano 1", /* 5 */
35 "Electric Piano 2", /* 6 */
36 "Harpsichord", /* 7 */
39 "Glockenspiel", /* 10 */
41 "Vibraphone", /* 12 */
44 "Tubular Bells", /* 15 */
46 "Drawbar Organ", /* 17 */
47 "Percussive Organ", /* 18 */
48 "Rock Organ", /* 19 */
49 "Church Organ", /* 20 */
50 "Reed Organ", /* 21 */
53 "Tango Accordion", /* 24 */
54 "Acoustic Guitar (nylon)", /* 25 */
55 "Acoustic Guitar (steel)", /* 26 */
56 "Electric Guitar (jazz)", /* 27 */
57 "Electric Guitar (clean)", /* 28 */
58 "Electric Guitar (muted)", /* 29 */
59 "Overdriven Guitar", /* 30 */
60 "Distortion Guitar", /* 31 */
61 "Guitar harmonics", /* 32 */
62 "Acoustic Bass", /* 33 */
63 "Electric Bass (finger)", /* 34 */
64 "Electric Bass (pick)", /* 35 */
65 "Fretless Bass", /* 36 */
66 "Slap Bass 1", /* 37 */
67 "Slap Bass 2", /* 38 */
68 "Synth Bass 1", /* 39 */
69 "Synth Bass 2", /* 40 */
73 "Contrabass", /* 44 */
74 "Tremolo Strings", /* 45 */
75 "Pizzicato Strings", /* 46 */
76 "Orchestral Harp", /* 47 */
78 "String Ensemble 1", /* 49 */
79 "String Ensemble 2", /* 50 */
80 "SynthStrings 1", /* 51 */
81 "SynthStrings 2", /* 52 */
82 "Choir Aahs", /* 53 */
83 "Voice Oohs", /* 54 */
84 "Synth Voice", /* 55 */
85 "Orchestra Hit", /* 56 */
89 "Muted Trumpet", /* 60 */
90 "French Horn", /* 61 */
91 "Brass Section", /* 62 */
92 "SynthBrass 1", /* 63 */
93 "SynthBrass 2", /* 64 */
94 "Soprano Sax", /* 65 */
97 "Baritone Sax", /* 68 */
99 "English Horn", /* 70 */
105 "Pan Flute", /* 76 */
106 "Blown Bottle", /* 77 */
107 "Shakuhachi", /* 78 */
110 "Lead 1 (square)", /* 81 */
111 "Lead 2 (sawtooth)", /* 82 */
112 "Lead 3 (calliope)", /* 83 */
113 "Lead 4 (chiff)", /* 84 */
114 "Lead 5 (charang)", /* 85 */
115 "Lead 6 (voice)", /* 86 */
116 "Lead 7 (fifths)", /* 87 */
117 "Lead 8 (bass + lead)", /* 88 */
118 "Pad 1 (new age)", /* 89 */
119 "Pad 2 (warm)", /* 90 */
120 "Pad 3 (polysynth)", /* 91 */
121 "Pad 4 (choir)", /* 92 */
122 "Pad 5 (bowed)", /* 93 */
123 "Pad 6 (metallic)", /* 94 */
124 "Pad 7 (halo)", /* 95 */
125 "Pad 8 (sweep)", /* 96 */
126 "FX 1 (rain)", /* 97 */
127 "FX 2 (soundtrack)", /* 98 */
128 "FX 3 (crystal)", /* 99 */
129 "FX 4 (atmosphere)", /* 100 */
130 "FX 5 (brightness)", /* 101 */
131 "FX 6 (goblins)", /* 102 */
132 "FX 7 (echoes)", /* 103 */
133 "FX 8 (sci-fi)", /* 104 */
136 "Shamisen", /* 107 */
139 "Bag pipe", /* 110 */
142 "Tinkle Bell", /* 113 */
144 "Steel Drums", /* 115 */
145 "Woodblock", /* 116 */
146 "Taiko Drum", /* 117 */
147 "Melodic Tom", /* 118 */
148 "Synth Drum", /* 119 */
149 "Reverse Cymbal", /* 120 */
150 "Guitar Fret Noise", /* 121 */
151 "Breath Noise", /* 122 */
152 "Seashore", /* 123 */
153 "Bird Tweet", /* 124 */
154 "Telephone Ring", /* 125 */
155 "Helicopter", /* 126 */
156 "Applause", /* 127 */
160 #define GM_DRUM_FIRST_NOTE 35
161 #define GM_DRUM_NOTES_COUNT (sizeof(g_gm_drum_names) / sizeof(g_gm_drum_names[0]))
163 static const char * g_gm_drum_names
[] =
165 "Acoustic Bass Drum", /* 35 */
166 "Bass Drum 1", /* 36 */
167 "Side Stick", /* 37 */
168 "Acoustic Snare", /* 38 */
169 "Hand Clap", /* 39 */
170 "Electric Snare", /* 40 */
171 "Low Floor Tom", /* 41 */
172 "Closed Hi-Hat", /* 42 */
173 "High Floor Tom", /* 43 */
174 "Pedal Hi-Hat", /* 44 */
176 "Open Hi-Hat", /* 46 */
177 "Low-Mid Tom", /* 47 */
178 "Hi-Mid Tom", /* 48 */
179 "Crash Cymbal 1", /* 49 */
181 "Ride Cymbal 1", /* 51 */
182 "Chinese Cymbal", /* 52 */
183 "Ride Bell", /* 53 */
184 "Tambourine", /* 54 */
185 "Splash Cymbal", /* 55 */
187 "Crash Cymbal 2", /* 57 */
188 "Vibraslap", /* 58 */
189 "Ride Cymbal 2", /* 59 */
191 "Low Bongo", /* 61 */
192 "Mute Hi Conga", /* 62 */
193 "Open Hi Conga", /* 63 */
194 "Low Conga", /* 64 */
195 "High Timbale", /* 65 */
196 "Low Timbale", /* 66 */
197 "High Agogo", /* 67 */
198 "Low Agogo", /* 68 */
201 "Short Whistle", /* 71 */
202 "Long Whistle", /* 72 */
203 "Short Guiro", /* 73 */
204 "Long Guiro", /* 74 */
206 "Hi Wood Block", /* 76 */
207 "Low Wood Block", /* 77 */
208 "Mute Cuica", /* 78 */
209 "Open Cuica", /* 79 */
210 "Mute Triangle", /* 80 */
211 "Open Triangle", /* 81 */
218 if (note
>= GM_DRUM_FIRST_NOTE
&&
219 note
< GM_DRUM_FIRST_NOTE
+ GM_DRUM_NOTES_COUNT
)
221 return g_gm_drum_names
[note
- GM_DRUM_FIRST_NOTE
];
230 gm_get_instrument_name(
231 unsigned char program
)
233 assert(program
< sizeof(g_gm_instrument_names
)/sizeof(g_gm_instrument_names
[0]));
235 return g_gm_instrument_names
[program
];
239 gm_get_controller_name(
240 unsigned int controller
)
245 return "Bank selection";
253 return "Portamento time";
257 return "Main volume";
269 return "General purpose 1";
271 return "General purpose 2";
273 return "General purpose 3";
275 return "General purpose 4";
277 return "Bank selection (LSB)";
279 return "Modulation (LSB)";
281 return "Breath (LSB)";
285 return "Portamento time (LSB)";
287 return "Data entry (LSB)";
289 return "Main volume (LSB)";
291 return "Balance (LSB)";
293 return "Panpot (LSB)";
295 return "Expression (LSB)";
297 return "Effect1 (LSB)";
299 return "Effect2 (LSB)";
301 return "General purpose 1 (LSB)";
303 return "General purpose 2 (LSB)";
305 return "General purpose 3 (LSB)";
307 return "General purpose 4 (LSB)";
309 return "Sustain pedal";
317 return "Legato foot switch";
321 return "SC1 Sound Variation";
325 return "SC3 Release Time";
327 return "SC4 Attack Time";
329 return "SC5 Brightness";
341 return "General purpose 5";
343 return "General purpose 6";
345 return "General purpose 7";
347 return "General purpose 8";
349 return "Portamento control";
351 return "E1 Reverb Depth";
353 return "E2 Tremolo Depth";
355 return "E3 Chorus Depth";
357 return "E4 Detune Depth";
359 return "E5 Phaser Depth";
361 return "Data Increment";
363 return "Data Decrement";
365 return "Non-registered parameter number (LSB)";
367 return "Non-registered parameter number (MSB)";
369 return "Registered parameter number (LSB)";
371 return "Registered parameter number (MSB)";