CFugue
Instrument.cpp
1 #include "stdafx.h"
2 #include "Instrument.h"
3 
4 namespace CFugue
5 {
6  /**
7  * Music Instrument Names in String representation
8  */
9  static const TCHAR* INSTRUMENT_NAME[] =
10  {
11  _T("Piano "),
12  _T("Bright_Acoustic "),
13  _T("Electric_Grand "),
14  _T("Honkey_Tonk "),
15  _T("Electric_Piano "),
16  _T("Electric_Piano_2 "),
17  _T("Harpischord "),
18  _T("Clavinet "),
19  _T("Celesta "),
20  _T("Glockenspiel "),
21 
22  _T("Music_Box "),
23  _T("Vibraphone "),
24  _T("Marimba "),
25  _T("Xylophone "),
26  _T("Tubular_Bells "),
27  _T("Dulcimer "),
28  _T("Drawbar_Organ "),
29  _T("Percussive_Organ "),
30  _T("Rock_Organ "),
31  _T("Church_Organ "),
32 
33  _T("Reed_Organ "),
34  _T("Accordian "),
35  _T("Harmonica "),
36  _T("Tango_Accordian "),
37  _T("Guitar "),
38  _T("Steel_String_Guitar "),
39  _T("Electric_Jazz_Guitar "),
40  _T("Electric_Clean_Guitar "),
41  _T("Electric_muted_Guitar "),
42  _T("Overdriven_Guitar "),
43  _T("Distortion_Guitar "),
44 
45  _T("Guitar_Harmonics "),
46  _T("Acoustic_Bass "),
47  _T("Electric_Bass_Finger "),
48  _T("Electric_Bass_Pick "),
49  _T("Fretless_Bass "),
50  _T("Slap_Bass_1 "),
51  _T("Slap_Bass_2 "),
52  _T("Synth_Bass_1 "),
53  _T("Synth_Bass_2 "),
54 
55  _T("Violin "),
56  _T("Viola "),
57  _T("Cello "),
58  _T("Contrabass "),
59  _T("Tremolo_Strings "),
60  _T("Pizzicato_Strings "),
61  _T("Orchestral_Strings "),
62  _T("Timpani "),
63  _T("String_Ensemble_1 "),
64  _T("String_Ensemble_2 "),
65 
66  _T("Synth_strings_1 "),
67  _T("Synth_strings_2 "),
68  _T("Choir_Aahs "),
69  _T("Voice_Oohs "),
70  _T("Synth_Voice "),
71  _T("Orchestra_Hit "),
72  _T("Trumpet "),
73  _T("Trombone "),
74  _T("Tuba "),
75  _T("Muted_Trumpet "),
76 
77  _T("French_Horn "),
78  _T("Brass_Section "),
79  _T("Synth_brass_1 "),
80  _T("Synth_brass_2 "),
81  _T("Soprano_Sax "),
82  _T("Alto_Sax "),
83  _T("Tenor_Sax "),
84  _T("Baritone_Sax "),
85  _T("Oboe "),
86  _T("English_Horn "),
87 
88  _T("Bassoon "),
89  _T("Clarinet "),
90  _T("Piccolo "),
91  _T("Flute "),
92  _T("Recorder "),
93  _T("Pan_Flute "),
94  _T("Blown_Bottle "),
95  _T("Skakuhachi "),
96  _T("Whistle "),
97  _T("Ocarina "),
98 
99  _T("Square "),
100  _T("Sawtooth "),
101  _T("Calliope "),
102  _T("Chiff "),
103  _T("Charang "),
104  _T("Voice "),
105  _T("Fifths "),
106  _T("Basslead "),
107  _T("New_Age "),
108  _T("Warm "),
109 
110  _T("Polysynth "),
111  _T("Choir "),
112  _T("Bowed "),
113  _T("Metallic "),
114  _T("Halo "),
115  _T("Sweep "),
116  _T("Rain "),
117  _T("Soundtrack "),
118  _T("Crystal "),
119  _T("Atmosphere "),
120 
121  _T("Brightness "),
122  _T("Goblins "),
123  _T("Echoes "),
124  _T("Sci-fi "),
125  _T("Sitar "),
126  _T("Banjo "),
127  _T("Shamisen "),
128  _T("Koto "),
129  _T("Kalimba "),
130  _T("Bagpipe "),
131 
132  _T("Fiddle "),
133  _T("Shanai "),
134  _T("Tinkle_Bell "),
135  _T("Agogo "),
136  _T("Steel_Drums "),
137  _T("Woodblock "),
138  _T("Taiko_Drum "),
139  _T("Melodic_Tom "),
140  _T("Synth_Drum "),
141  _T("Reverse_Cymbal "),
142 
143  _T("Guitar_Fret_Noise "),
144  _T("Breath_Noise "),
145  _T("Seashore "),
146  _T("Bird_Tweet "),
147  _T("Telephone_Ring "),
148  _T("Helicopter "),
149  _T("Applause "),
150  _T("Gunshot ")
151  };
152 
154  {
155  return INSTRUMENT_NAME[m_nInstrumentID];
156  }
157 
159  {
160  //
161  // Insert Instrument names
162  //
163  stdDefns[_T("PIANO" )] = _T("0");
164  stdDefns[_T("ACOUSTIC_GRAND" )] = _T("0");
165  stdDefns[_T("BRIGHT_ACOUSTIC" )] = _T("1");
166  stdDefns[_T("ELECTRIC_GRAND" )] = _T("2");
167  stdDefns[_T("HONKEY_TONK" )] = _T("3");
168  stdDefns[_T("ELECTRIC_PIANO" )] = _T("4");
169  stdDefns[_T("ELECTRIC_PIANO_1" )] = _T("4");
170  stdDefns[_T("ELECTRIC_PIANO_2" )] = _T("5");
171  stdDefns[_T("HARPISCHORD" )] = _T("6");
172  stdDefns[_T("CLAVINET" )] = _T("7");
173  stdDefns[_T("CELESTA" )] = _T("8");
174  stdDefns[_T("GLOCKENSPIEL" )] = _T("9");
175 
176  stdDefns[_T("MUSIC_BOX" )] = _T("10");
177  stdDefns[_T("VIBRAPHONE" )] = _T("11");
178  stdDefns[_T("MARIMBA" )] = _T("12");
179  stdDefns[_T("XYLOPHONE" )] = _T("13");
180  stdDefns[_T("TUBULAR_BELLS" )] = _T("14");
181  stdDefns[_T("DULCIMER" )] = _T("15");
182  stdDefns[_T("DRAWBAR_ORGAN" )] = _T("16");
183  stdDefns[_T("PERCUSSIVE_ORGAN" )] = _T("17");
184  stdDefns[_T("ROCK_ORGAN" )] = _T("18");
185  stdDefns[_T("CHURCH_ORGAN" )] = _T("19");
186 
187  stdDefns[_T("REED_ORGAN" )] = _T("20");
188  stdDefns[_T("ACCORDIAN" )] = _T("21");
189  stdDefns[_T("HARMONICA" )] = _T("22");
190  stdDefns[_T("TANGO_ACCORDIAN" )] = _T("23");
191  stdDefns[_T("GUITAR" )] = _T("24");
192  stdDefns[_T("NYLON_STRING_GUITAR" )] = _T("24");
193  stdDefns[_T("STEEL_STRING_GUITAR" )] = _T("25");
194  stdDefns[_T("ELECTRIC_JAZZ_GUITAR" )] = _T("26");
195  stdDefns[_T("ELECTRIC_CLEAN_GUITAR" )] = _T("27");
196  stdDefns[_T("ELECTRIC_MUTED_GUITAR" )] = _T("28");
197  stdDefns[_T("OVERDRIVEN_GUITAR" )] = _T("29");
198 
199  stdDefns[_T("DISTORTION_GUITAR" )] = _T("30");
200  stdDefns[_T("GUITAR_HARMONICS" )] = _T("31");
201  stdDefns[_T("ACOUSTIC_BASS" )] = _T("32");
202  stdDefns[_T("ELECTRIC_BASS_FINGER" )] = _T("33");
203  stdDefns[_T("ELECTRIC_BASS_PICK" )] = _T("34");
204  stdDefns[_T("FRETLESS_BASS" )] = _T("35");
205  stdDefns[_T("SLAP_BASS_1" )] = _T("36");
206  stdDefns[_T("SLAP_BASS_2" )] = _T("37");
207  stdDefns[_T("SYNTH_BASS_1" )] = _T("38");
208  stdDefns[_T("SYNTH_BASS_2" )] = _T("39");
209 
210  stdDefns[_T("VIOLIN" )] = _T("40");
211  stdDefns[_T("VIOLA" )] = _T("41");
212  stdDefns[_T("CELLO" )] = _T("42");
213  stdDefns[_T("CONTRABASS" )] = _T("43");
214  stdDefns[_T("TREMOLO_STRINGS" )] = _T("44");
215  stdDefns[_T("PIZZICATO_STRINGS" )] = _T("45");
216  stdDefns[_T("ORCHESTRAL_STRINGS" )] = _T("46");
217  stdDefns[_T("TIMPANI" )] = _T("47");
218  stdDefns[_T("STRING_ENSEMBLE_1" )] = _T("48");
219  stdDefns[_T("STRING_ENSEMBLE_2" )] = _T("49");
220 
221  stdDefns[_T("SYNTH_STRINGS_1" )] = _T("50");
222  stdDefns[_T("SYNTH_STRINGS_2" )] = _T("51");
223  stdDefns[_T("CHOIR_AAHS" )] = _T("52");
224  stdDefns[_T("VOICE_OOHS" )] = _T("53");
225  stdDefns[_T("SYNTH_VOICE" )] = _T("54");
226  stdDefns[_T("ORCHESTRA_HIT" )] = _T("55");
227  stdDefns[_T("TRUMPET" )] = _T("56");
228  stdDefns[_T("TROMBONE" )] = _T("57");
229  stdDefns[_T("TUBA" )] = _T("58");
230  stdDefns[_T("MUTED_TRUMPET" )] = _T("59");
231 
232  stdDefns[_T("FRENCH_HORN" )] = _T("60");
233  stdDefns[_T("BRASS_SECTION" )] = _T("61");
234  stdDefns[_T("SYNTHBRASS_1" )] = _T("62");
235  stdDefns[_T("SYNTHBRASS_2" )] = _T("63");
236  stdDefns[_T("SOPRANO_SAX" )] = _T("64");
237  stdDefns[_T("ALTO_SAX" )] = _T("65");
238  stdDefns[_T("TENOR_SAX" )] = _T("66");
239  stdDefns[_T("BARITONE_SAX" )] = _T("67");
240  stdDefns[_T("OBOE" )] = _T("68");
241  stdDefns[_T("ENGLISH_HORN" )] = _T("69");
242 
243  stdDefns[_T("BASSOON" )] = _T("70");
244  stdDefns[_T("CLARINET" )] = _T("71");
245  stdDefns[_T("PICCOLO" )] = _T("72");
246  stdDefns[_T("FLUTE" )] = _T("73");
247  stdDefns[_T("RECORDER" )] = _T("74");
248  stdDefns[_T("PAN_FLUTE" )] = _T("75");
249  stdDefns[_T("BLOWN_BOTTLE" )] = _T("76");
250  stdDefns[_T("SKAKUHACHI" )] = _T("77");
251  stdDefns[_T("WHISTLE" )] = _T("78");
252  stdDefns[_T("OCARINA" )] = _T("79");
253 
254  stdDefns[_T("LEAD_SQUARE" )] = _T("80");
255  stdDefns[_T("SQUARE" )] = _T("80");
256  stdDefns[_T("LEAD_SAWTOOTH" )] = _T("81");
257  stdDefns[_T("SAWTOOTH" )] = _T("81");
258  stdDefns[_T("LEAD_CALLIOPE" )] = _T("82");
259  stdDefns[_T("CALLIOPE" )] = _T("82");
260  stdDefns[_T("LEAD_CHIFF" )] = _T("83");
261  stdDefns[_T("CHIFF" )] = _T("83");
262  stdDefns[_T("LEAD_CHARANG" )] = _T("84");
263  stdDefns[_T("CHARANG" )] = _T("84");
264  stdDefns[_T("LEAD_VOICE" )] = _T("85");
265  stdDefns[_T("VOICE" )] = _T("85");
266  stdDefns[_T("LEAD_FIFTHS" )] = _T("86");
267  stdDefns[_T("FIFTHS" )] = _T("86");
268  stdDefns[_T("LEAD_BASSLEAD" )] = _T("87");
269  stdDefns[_T("BASSLEAD" )] = _T("87");
270  stdDefns[_T("PAD_NEW_AGE" )] = _T("88");
271  stdDefns[_T("NEW_AGE" )] = _T("88");
272  stdDefns[_T("PAD_WARM" )] = _T("89");
273  stdDefns[_T("WARM" )] = _T("89");
274 
275  stdDefns[_T("PAD_POLYSYNTH" )] = _T("90");
276  stdDefns[_T("POLYSYNTH" )] = _T("90");
277  stdDefns[_T("PAD_CHOIR" )] = _T("91");
278  stdDefns[_T("CHOIR" )] = _T("91");
279  stdDefns[_T("PAD_BOWED" )] = _T("92");
280  stdDefns[_T("BOWED" )] = _T("92");
281  stdDefns[_T("PAD_METALLIC" )] = _T("93");
282  stdDefns[_T("METALLIC" )] = _T("93");
283  stdDefns[_T("PAD_HALO" )] = _T("94");
284  stdDefns[_T("HALO" )] = _T("94");
285  stdDefns[_T("PAD_SWEEP" )] = _T("95");
286  stdDefns[_T("SWEEP" )] = _T("95");
287  stdDefns[_T("FX_RAIN" )] = _T("96");
288  stdDefns[_T("RAIN" )] = _T("96");
289  stdDefns[_T("FX_SOUNDTRACK" )] = _T("97");
290  stdDefns[_T("SOUNDTRACK" )] = _T("97");
291  stdDefns[_T("FX_CRYSTAL" )] = _T("98");
292  stdDefns[_T("CRYSTAL" )] = _T("98");
293  stdDefns[_T("FX_ATMOSPHERE" )] = _T("99");
294  stdDefns[_T("ATMOSPHERE" )] = _T("99");
295 
296  stdDefns[_T("FX_BRIGHTNESS" )] = _T("100");
297  stdDefns[_T("BRIGHTNESS" )] = _T("100");
298  stdDefns[_T("FX_GOBLINS" )] = _T("101");
299  stdDefns[_T("GOBLINS" )] = _T("101");
300  stdDefns[_T("FX_ECHOES" )] = _T("102");
301  stdDefns[_T("ECHOES" )] = _T("102");
302  stdDefns[_T("FX_SCI-FI" )] = _T("103");
303  stdDefns[_T("SCI-FI" )] = _T("103");
304  stdDefns[_T("SITAR" )] = _T("104");
305  stdDefns[_T("BANJO" )] = _T("105");
306  stdDefns[_T("SHAMISEN" )] = _T("106");
307  stdDefns[_T("KOTO" )] = _T("107");
308  stdDefns[_T("KALIMBA" )] = _T("108");
309  stdDefns[_T("BAGPIPE" )] = _T("109");
310 
311  stdDefns[_T("FIDDLE" )] = _T("110");
312  stdDefns[_T("SHANAI" )] = _T("111");
313  stdDefns[_T("TINKLE_BELL" )] = _T("112");
314  stdDefns[_T("AGOGO" )] = _T("113");
315  stdDefns[_T("STEEL_DRUMS" )] = _T("114");
316  stdDefns[_T("WOODBLOCK" )] = _T("115");
317  stdDefns[_T("TAIKO_DRUM" )] = _T("116");
318  stdDefns[_T("MELODIC_TOM" )] = _T("117");
319  stdDefns[_T("SYNTH_DRUM" )] = _T("118");
320  stdDefns[_T("REVERSE_CYMBAL" )] = _T("119");
321 
322  stdDefns[_T("GUITAR_FRET_NOISE" )] = _T("120");
323  stdDefns[_T("BREATH_NOISE" )] = _T("121");
324  stdDefns[_T("SEASHORE" )] = _T("122");
325  stdDefns[_T("BIRD_TWEET" )] = _T("123");
326  stdDefns[_T("TELEPHONE_RING" )] = _T("124");
327  stdDefns[_T("HELICOPTER" )] = _T("125");
328  stdDefns[_T("APPLAUSE" )] = _T("126");
329  stdDefns[_T("GUNSHOT" )] = _T("127");
330 
331  //
332  // Insert Percussion names
333  //
334  stdDefns[_T("ACOUSTIC_BASS_DRUM" )] = _T("35");
335  stdDefns[_T("BASS_DRUM" )] = _T("36");
336  stdDefns[_T("SIDE_STICK" )] = _T("37");
337  stdDefns[_T("ACOUSTIC_SNARE" )] = _T("38");
338  stdDefns[_T("HAND_CLAP" )] = _T("39");
339 
340  stdDefns[_T("ELECTRIC_SNARE" )] = _T("40");
341  stdDefns[_T("LOW_FLOOR_TOM" )] = _T("41");
342  stdDefns[_T("CLOSED_HI_HAT" )] = _T("42");
343  stdDefns[_T("HIGH_FLOOR_TOM" )] = _T("43");
344  stdDefns[_T("PEDAL_HI_HAT" )] = _T("44");
345  stdDefns[_T("LOW_TOM" )] = _T("45");
346  stdDefns[_T("OPEN_HI_HAT" )] = _T("46");
347  stdDefns[_T("LOW_MID_TOM" )] = _T("47");
348  stdDefns[_T("HI_MID_TOM" )] = _T("48");
349  stdDefns[_T("CRASH_CYMBAL_1" )] = _T("49");
350 
351  stdDefns[_T("HIGH_TOM" )] = _T("50");
352  stdDefns[_T("RIDE_CYMBAL_1" )] = _T("51");
353  stdDefns[_T("CHINESE_CYMBAL" )] = _T("52");
354  stdDefns[_T("RIDE_BELL" )] = _T("53");
355  stdDefns[_T("TAMBOURINE" )] = _T("54");
356  stdDefns[_T("SPLASH_CYMBAL" )] = _T("55");
357  stdDefns[_T("COWBELL" )] = _T("56");
358  stdDefns[_T("CRASH_CYMBAL_2" )] = _T("57");
359  stdDefns[_T("VIBRASLAP" )] = _T("58");
360  stdDefns[_T("RIDE_CYMBAL_2" )] = _T("59");
361 
362  stdDefns[_T("HI_BONGO" )] = _T("60");
363  stdDefns[_T("LOW_BONGO" )] = _T("61");
364  stdDefns[_T("MUTE_HI_CONGA" )] = _T("62");
365  stdDefns[_T("OPEN_HI_CONGA" )] = _T("63");
366  stdDefns[_T("LOW_CONGA" )] = _T("64");
367  stdDefns[_T("HIGH_TIMBALE" )] = _T("65");
368  stdDefns[_T("LOW_TIMBALE" )] = _T("66");
369  stdDefns[_T("HIGH_AGOGO" )] = _T("67");
370  stdDefns[_T("LOW_AGOGO" )] = _T("68");
371  stdDefns[_T("CABASA" )] = _T("69");
372 
373  stdDefns[_T("MARACAS" )] = _T("70");
374  stdDefns[_T("SHORT_WHISTLE" )] = _T("71");
375  stdDefns[_T("LONG_WHISTLE" )] = _T("72");
376  stdDefns[_T("SHORT_GUIRO" )] = _T("73");
377  stdDefns[_T("LONG_GUIRO" )] = _T("74");
378  stdDefns[_T("CLAVES" )] = _T("75");
379  stdDefns[_T("HI_WOOD_BLOCK" )] = _T("76");
380  stdDefns[_T("LOW_WOOD_BLOCK" )] = _T("77");
381  stdDefns[_T("MUTE_CUICA" )] = _T("78");
382  stdDefns[_T("OPEN_CUICA" )] = _T("79");
383 
384  stdDefns[_T("MUTE_TRIANGLE" )] = _T("80");
385  stdDefns[_T("OPEN_TRIANGLE" )] = _T("81");
386  }
387 
388 } // namespace CFugue
static void PopulateStandardDefinitions(DICTIONARY &stdDefns)
Populates the standard musical instrument Macro defintions into Music String Dictionary.
Definition: Instrument.cpp:158
Declares Instrument class.
MString GetInstrumentName() const
Returns the name of the music instrument this object represents
Definition: Instrument.cpp:153
Helper class for simple string manipulations
Definition: MString.h:51
std::map< MString, MString, StringLess< const TCHAR * > > DICTIONARY
Definition: Dictionary.h:37

CFugue, the C++ Music Programming Library © Copyright 2009 Cenacle Research India Private Limited Gopalakrishna Palem