yet another fix for complaints from OS X gcc about constness
[ardour.git] / libs / midi++2 / midnam_patch.cc
1 /*
2     Copyright (C) 2008 Hans Baier
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18     $Id$
19 */
20
21 #include <algorithm>
22 #include <iostream>
23
24 #include "midi++/midnam_patch.h"
25 #include "pbd/compose.h"
26 #include "pbd/convert.h"
27 #include "pbd/error.h"
28 #include "pbd/failed_constructor.h"
29
30 using namespace std;
31 using PBD::error;
32
33 namespace MIDI
34 {
35
36 namespace Name
37 {
38         
39 Patch::Patch (std::string name, uint8_t p_number, uint16_t b_number)
40         : _name (name)
41         , _id (p_number, b_number)
42 {
43 }
44
45 int initialize_primary_key_from_commands (PatchPrimaryKey& id, const XMLNode* node)
46 {
47         id.bank_number = 0;
48
49         const XMLNodeList events = node->children();
50         for (XMLNodeList::const_iterator i = events.begin(); i != events.end(); ++i) {
51
52                 XMLNode* node = *i;
53                 if (node->name() == "ControlChange") {
54                         string control = node->property("Control")->value();
55                         assert(control != "");
56                         string value = node->property("Value")->value();
57                         assert(value != "");
58
59                         if (control == "0") {
60                                 id.bank_number |= (PBD::atoi (value)) << 7;
61                         } else if (control == "32") {
62                                 id.bank_number |= PBD::atoi (value);
63                         }
64
65                 } else if (node->name() == "ProgramChange") {
66                         string number = node->property("Number")->value();
67                         assert(number != "");
68                         id.program_number = PBD::atoi(number);
69                 }
70         }
71
72         return 0;
73 }
74
75 XMLNode&
76 Patch::get_state (void)
77 {
78         XMLNode* node = new XMLNode("Patch");
79
80         /* XXX this is totally wrong */
81
82         node->add_property("Number", string_compose ("%1", _id.program_number));
83         node->add_property("Name",   _name);
84
85         /*
86         typedef std::list< boost::shared_ptr< Evoral::MIDIEvent<double> > > PatchMidiCommands;
87         XMLNode* commands = node->add_child("PatchMIDICommands");
88         for (PatchMidiCommands::const_iterator event = _patch_midi_commands.begin();
89             event != _patch_midi_commands.end();
90             ++event) {
91                 commands->add_child_copy(*((((Evoral::MIDIEvent&)*event)).to_xml()));
92         }
93         */
94
95         return *node;
96 }
97
98 int
99 Patch::set_state (const XMLTree&, const XMLNode& node)
100 {
101         if (node.name() != "Patch") {
102                 cerr << "Incorrect node " << node.name() << " handed to Patch" << endl;
103                 return -1;
104         }
105
106         const XMLProperty* prop = node.property ("Number");
107
108         if (!prop) {
109                 return -1;
110         }
111         _id.program_number = PBD::atoi (prop->value());
112
113         prop = node.property ("Name");
114
115         if (!prop) {
116                 return -1;
117         }
118         _name   = prop->value();
119
120         XMLNode* commands = node.child("PatchMIDICommands");
121
122         if (commands) {
123                 if (initialize_primary_key_from_commands(_id, commands)) {
124                         return -1;
125                 }
126         } else {
127                 string program_change = node.property("ProgramChange")->value();
128                 assert(program_change.length());
129                 _id.program_number = PBD::atoi(program_change);
130         }
131
132
133         return 0;
134 }
135
136 XMLNode&
137 Note::get_state (void)
138 {
139         XMLNode* node = new XMLNode("Note");
140         node->add_property("Number", _number);
141         node->add_property("Name",   _name);
142
143         return *node;
144 }
145
146
147 int
148 Note::set_state (const XMLTree&, const XMLNode& node)
149 {
150         assert(node.name() == "Note");
151         _number = node.property("Number")->value();
152         _name   = node.property("Name")->value();
153
154         return 0;
155 }
156
157 XMLNode&
158 NoteNameList::get_state (void)
159 {
160         XMLNode* node = new XMLNode("NoteNameList");
161         node->add_property("Name",   _name);
162
163         return *node;
164 }
165
166 int
167 NoteNameList::set_state (const XMLTree& tree, const XMLNode& node)
168 {
169         assert(node.name() == "NoteNameList");
170         _name   = node.property("Name")->value();
171
172         boost::shared_ptr<XMLSharedNodeList> notes = tree.find("//Note");
173         for (XMLSharedNodeList::const_iterator i = notes->begin(); i != notes->end(); ++i) {
174                 boost::shared_ptr<Note> note(new Note());
175                 note->set_state (tree, *(*i));
176                 _notes.push_back(note);
177         }
178
179         return 0;
180 }
181
182
183 XMLNode&
184 PatchBank::get_state (void)
185 {
186         XMLNode* node = new XMLNode("PatchBank");
187         node->add_property("Name",   _name);
188         XMLNode* patch_name_list = node->add_child("PatchNameList");
189         for (PatchNameList::iterator patch = _patch_name_list.begin();
190             patch != _patch_name_list.end();
191             ++patch) {
192                 patch_name_list->add_child_nocopy((*patch)->get_state());
193         }
194
195         return *node;
196 }
197
198 int
199 PatchBank::set_state (const XMLTree& tree, const XMLNode& node)
200 {
201         assert(node.name() == "PatchBank");
202         _name   = node.property("Name")->value();
203
204         XMLNode* commands = node.child("MIDICommands");
205         if (commands) {
206                 PatchPrimaryKey id (0, 0);
207                 if (initialize_primary_key_from_commands (id, commands)) {
208                         return -1;
209                 }
210                 _number = id.bank_number;
211         }
212
213         XMLNode* patch_name_list = node.child("PatchNameList");
214
215         if (patch_name_list) {
216                 const XMLNodeList patches = patch_name_list->children();
217                 for (XMLNodeList::const_iterator i = patches.begin(); i != patches.end(); ++i) {
218                         boost::shared_ptr<Patch> patch (new Patch (string(), 0, _number));
219                         patch->set_state(tree, *(*i));
220                         _patch_name_list.push_back(patch);
221                 }
222         } else {
223                 XMLNode* use_patch_name_list = node.child ("UsesPatchNameList");
224                 if (use_patch_name_list) {
225                         _patch_list_name = use_patch_name_list->property ("Name")->value();
226                 } else {
227                         error << "Patch without patch name list - patchfile will be ignored" << endmsg;
228                         return -1;
229                 }
230         }
231
232         return 0;
233 }
234
235 int
236 PatchBank::set_patch_name_list (const PatchNameList& pnl)
237 {
238         _patch_name_list = pnl;
239         _patch_list_name = "";
240
241         for (PatchNameList::iterator p = _patch_name_list.begin(); p != _patch_name_list.end(); p++) {
242                 (*p)->set_bank_number (_number);
243         }
244
245         return 0;
246 }
247
248 std::ostream&
249 operator<< (std::ostream& os, const ChannelNameSet& cns)
250 {
251         os << "Channel Name Set: name = " << cns._name << endl
252            << "Map size " << cns._patch_map.size () << endl
253            << "List size " << cns._patch_list.size() << endl
254            << "Patch list name = [" << cns._patch_list_name << ']' << endl
255            << "Available channels : ";
256         for (set<uint8_t>::iterator x = cns._available_for_channels.begin(); x != cns._available_for_channels.end(); ++x) {
257                 os << (int) (*x) << ' ';
258         }
259         os << endl;
260         
261         for (ChannelNameSet::PatchBanks::const_iterator pbi = cns._patch_banks.begin(); pbi != cns._patch_banks.end(); ++pbi) {
262                 os << "\tPatch Bank " << (*pbi)->name() << " with " << (*pbi)->patch_name_list().size() << " patches\n";
263                 for (PatchBank::PatchNameList::const_iterator pni = (*pbi)->patch_name_list().begin(); pni != (*pbi)->patch_name_list().end(); ++pni) {
264                         os << "\t\tPatch name " << (*pni)->name() << " prog " << (int) (*pni)->program_number() << " bank " << (*pni)->bank_number() << endl;
265                 }
266         }
267
268         return os;
269 }
270
271 void
272 ChannelNameSet::set_patch_banks (const ChannelNameSet::PatchBanks& pb)
273 {
274         _patch_banks = pb;
275         
276         _patch_map.clear ();
277         _patch_list.clear ();
278         _patch_list_name = "";
279         _available_for_channels.clear ();
280         
281         for (PatchBanks::const_iterator pbi = _patch_banks.begin(); pbi != _patch_banks.end(); ++pbi) {
282                 for (PatchBank::PatchNameList::const_iterator pni = (*pbi)->patch_name_list().begin(); pni != (*pbi)->patch_name_list().end(); ++pni) {
283                         _patch_map[(*pni)->patch_primary_key()] = (*pni);
284                         _patch_list.push_back ((*pni)->patch_primary_key());
285                 }
286         }
287
288         for (uint8_t n = 0; n < 16; ++n) {
289                 _available_for_channels.insert (n);
290         }
291 }
292
293 void
294 ChannelNameSet::use_patch_name_list (const PatchBank::PatchNameList& pnl)
295 {
296         for (PatchBank::PatchNameList::const_iterator p = pnl.begin(); p != pnl.end(); ++p) {
297                 _patch_map[(*p)->patch_primary_key()] = (*p);
298                 _patch_list.push_back ((*p)->patch_primary_key());
299         }
300 }
301
302 XMLNode&
303 ChannelNameSet::get_state (void)
304 {
305         XMLNode* node = new XMLNode("ChannelNameSet");
306         node->add_property("Name",   _name);
307
308         XMLNode* available_for_channels = node->add_child("AvailableForChannels");
309         assert(available_for_channels);
310
311         for (uint8_t channel = 0; channel < 16; ++channel) {
312                 XMLNode* available_channel = available_for_channels->add_child("AvailableChannel");
313                 assert(available_channel);
314
315                 available_channel->add_property("Channel", (long) channel);
316
317                 if (_available_for_channels.find(channel) != _available_for_channels.end()) {
318                         available_channel->add_property("Available", "true");
319                 } else {
320                         available_channel->add_property("Available", "false");
321                 }
322         }
323
324         for (PatchBanks::iterator patch_bank = _patch_banks.begin();
325             patch_bank != _patch_banks.end();
326             ++patch_bank) {
327                 node->add_child_nocopy((*patch_bank)->get_state());
328         }
329
330         return *node;
331 }
332
333 int
334 ChannelNameSet::set_state (const XMLTree& tree, const XMLNode& node)
335 {
336         assert(node.name() == "ChannelNameSet");
337         _name   = node.property("Name")->value();
338
339         const XMLNodeList children = node.children();
340         for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
341                 XMLNode* node = *i;
342                 assert(node);
343                 if (node->name() == "AvailableForChannels") {
344                         boost::shared_ptr<XMLSharedNodeList> channels =
345                                 tree.find("//AvailableChannel[@Available = 'true']/@Channel", node);
346                         for(XMLSharedNodeList::const_iterator i = channels->begin();
347                             i != channels->end();
348                             ++i) {
349                                 _available_for_channels.insert(atoi((*i)->attribute_value().c_str()));
350                         }
351                 }
352
353                 if (node->name() == "PatchBank") {
354                         boost::shared_ptr<PatchBank> bank (new PatchBank ());
355                         bank->set_state(tree, *node);
356                         _patch_banks.push_back(bank);
357                         const PatchBank::PatchNameList& patches = bank->patch_name_list();
358                         for (PatchBank::PatchNameList::const_iterator patch = patches.begin();
359                              patch != patches.end();
360                              ++patch) {
361                                 _patch_map[(*patch)->patch_primary_key()] = *patch;
362                                 _patch_list.push_back((*patch)->patch_primary_key());
363                         }
364                 }
365         }
366
367         return 0;
368 }
369
370 int
371 CustomDeviceMode::set_state(const XMLTree& tree, const XMLNode& a_node)
372 {
373         assert(a_node.name() == "CustomDeviceMode");
374
375         _name = a_node.property("Name")->value();
376
377         boost::shared_ptr<XMLSharedNodeList> channel_name_set_assignments =
378                 tree.find("//ChannelNameSetAssign", const_cast<XMLNode *>(&a_node));
379         for(XMLSharedNodeList::const_iterator i = channel_name_set_assignments->begin();
380             i != channel_name_set_assignments->end();
381             ++i) {
382                 int channel = atoi((*i)->property("Channel")->value().c_str());
383                 string name_set = (*i)->property("NameSet")->value();
384                 assert( 1 <= channel && channel <= 16 );
385                 _channel_name_set_assignments[channel - 1] = name_set;
386         }
387         return 0;
388 }
389
390 XMLNode&
391 CustomDeviceMode::get_state(void)
392 {
393         XMLNode* custom_device_mode = new XMLNode("CustomDeviceMode");
394         custom_device_mode->add_property("Name",   _name);
395         XMLNode* channel_name_set_assignments =
396                 custom_device_mode->add_child("ChannelNameSetAssignments");
397         for (int i = 0; i < 15 && !_channel_name_set_assignments[i].empty(); i++) {
398                 XMLNode* channel_name_set_assign =
399                         channel_name_set_assignments->add_child("ChannelNameSetAssign");
400                 channel_name_set_assign->add_property("Channel", i + 1);
401                 channel_name_set_assign->add_property("NameSet", _channel_name_set_assignments[i]);
402         }
403
404         return *custom_device_mode;
405 }
406
407 boost::shared_ptr<CustomDeviceMode> 
408 MasterDeviceNames::custom_device_mode_by_name(std::string mode_name)
409 {
410         // can't assert this, since in many of the patch files the mode name is empty
411         //assert(mode_name != "");
412         return _custom_device_modes[mode_name];
413 }
414
415 boost::shared_ptr<ChannelNameSet> 
416 MasterDeviceNames::channel_name_set_by_device_mode_and_channel(std::string mode, uint8_t channel)
417 {
418         boost::shared_ptr<CustomDeviceMode> cdm = custom_device_mode_by_name(mode);
419         boost::shared_ptr<ChannelNameSet> cns =  _channel_name_sets[cdm->channel_name_set_name_by_channel(channel)];
420         return cns;
421 }
422
423 boost::shared_ptr<Patch> 
424 MasterDeviceNames::find_patch(std::string mode, uint8_t channel, PatchPrimaryKey& key) 
425 {
426         return channel_name_set_by_device_mode_and_channel(mode, channel)->find_patch(key);
427 }
428
429 int
430 MasterDeviceNames::set_state(const XMLTree& tree, const XMLNode& a_node)
431 {
432         // Manufacturer
433         boost::shared_ptr<XMLSharedNodeList> manufacturer = tree.find("//Manufacturer");
434         assert(manufacturer->size() == 1);
435         _manufacturer = manufacturer->front()->children().front()->content();
436
437         // Models
438         boost::shared_ptr<XMLSharedNodeList> models = tree.find("//Model");
439         assert(models->size() >= 1);
440         for (XMLSharedNodeList::iterator i = models->begin();
441              i != models->end();
442              ++i) {
443                 const XMLNodeList& contents = (*i)->children();
444                 assert(contents.size() == 1);
445                 XMLNode * content = *(contents.begin());
446                 assert(content->is_content());
447                 _models.push_back(content->content());
448         }
449
450         // CustomDeviceModes
451         boost::shared_ptr<XMLSharedNodeList> custom_device_modes = tree.find("//CustomDeviceMode");
452         for (XMLSharedNodeList::iterator i = custom_device_modes->begin();
453              i != custom_device_modes->end();
454              ++i) {
455                 boost::shared_ptr<CustomDeviceMode> custom_device_mode(new CustomDeviceMode());
456                 custom_device_mode->set_state(tree, *(*i));
457
458                 _custom_device_modes[custom_device_mode->name()] = custom_device_mode;
459                 _custom_device_mode_names.push_back(custom_device_mode->name());
460         }
461
462         // ChannelNameSets
463         boost::shared_ptr<XMLSharedNodeList> channel_name_sets = tree.find("//ChannelNameSet");
464         for (XMLSharedNodeList::iterator i = channel_name_sets->begin();
465              i != channel_name_sets->end();
466              ++i) {
467                 boost::shared_ptr<ChannelNameSet> channel_name_set(new ChannelNameSet());
468                 channel_name_set->set_state(tree, *(*i));
469                 _channel_name_sets[channel_name_set->name()] = channel_name_set;
470         }
471
472         // NoteNameLists
473         boost::shared_ptr<XMLSharedNodeList> note_name_lists = tree.find("//NoteNameList");
474         for (XMLSharedNodeList::iterator i = note_name_lists->begin();
475              i != note_name_lists->end();
476              ++i) {
477                 boost::shared_ptr<NoteNameList> note_name_list(new NoteNameList());
478                 note_name_list->set_state (tree, *(*i));
479                 _note_name_lists.push_back(note_name_list);
480         }
481
482         // global/post-facto PatchNameLists
483         boost::shared_ptr<XMLSharedNodeList> patch_name_lists = tree.find("/child::MIDINameDocument/child::MasterDeviceNames/child::PatchNameList");
484         for (XMLSharedNodeList::iterator i = patch_name_lists->begin();
485              i != patch_name_lists->end();
486              ++i) {
487
488                 PatchBank::PatchNameList patch_name_list;
489                 const XMLNodeList patches = (*i)->children();
490
491                 for (XMLNodeList::const_iterator p = patches.begin(); p != patches.end(); ++p) {
492                         boost::shared_ptr<Patch> patch (new Patch ());
493                         patch->set_state(tree, *(*p));
494                         patch_name_list.push_back(patch);
495                 }
496
497                 if (!patch_name_list.empty()) {
498                         _patch_name_lists[(*i)->property ("Name")->value()] = patch_name_list;
499                 }
500         }
501
502         /* now traverse patches and hook up anything that used UsePatchNameList
503          * to the right patch list
504          */
505
506         for (ChannelNameSets::iterator cns = _channel_name_sets.begin(); cns != _channel_name_sets.end(); ++cns) {
507                 ChannelNameSet::PatchBanks pbs = cns->second->patch_banks();
508                 PatchNameLists::iterator p;
509
510                 for (ChannelNameSet::PatchBanks::iterator pb = pbs.begin(); pb != pbs.end(); ++pb) {
511                         std::string pln = (*pb)->patch_list_name();
512                         if (!pln.empty()) {
513                                 if ((p = _patch_name_lists.find (pln)) != _patch_name_lists.end()) {
514                                         if ((*pb)->set_patch_name_list (p->second)) {
515                                                 return -1;
516                                         }
517                                         cns->second->use_patch_name_list (p->second);
518                                 } else {
519                                         error << string_compose ("Patch list name %1 was not found - patch file ignored", pln) << endmsg;
520                                         return -1;
521                                 }
522                         }
523                 }
524
525         }
526
527         return 0;
528 }
529
530 XMLNode&
531 MasterDeviceNames::get_state(void)
532 {
533         static XMLNode nothing("<nothing>");
534         return nothing;
535 }
536
537 MIDINameDocument::MIDINameDocument (const string& filename)
538 {
539         if (!_document.read (filename)) {
540                 throw failed_constructor ();
541         }
542
543         set_state (_document, *_document.root());
544 }
545
546 int
547 MIDINameDocument::set_state (const XMLTree& tree, const XMLNode& a_node)
548 {
549         // Author
550
551         boost::shared_ptr<XMLSharedNodeList> author = tree.find("//Author");
552         if (author->size() < 1) {
553                 error << "No author information in MIDNAM file" << endmsg;
554                 return -1;
555         }
556         
557         if (author->front()->children().size() > 0) {
558                 _author = author->front()->children().front()->content();
559         }
560
561         // MasterDeviceNames
562
563         boost::shared_ptr<XMLSharedNodeList> master_device_names_list = tree.find ("//MasterDeviceNames");
564
565         for (XMLSharedNodeList::iterator i = master_device_names_list->begin();
566              i != master_device_names_list->end();
567              ++i) {
568                 boost::shared_ptr<MasterDeviceNames> master_device_names(new MasterDeviceNames());
569
570                 if (master_device_names->set_state(tree, *(*i))) {
571                         return -1;
572                 }
573
574                 for (MasterDeviceNames::Models::const_iterator model = master_device_names->models().begin();
575                      model != master_device_names->models().end();
576                      ++model) {
577                         _master_device_names_list.insert(
578                                 std::pair<std::string, boost::shared_ptr<MasterDeviceNames> >
579                                 (*model,      master_device_names));
580                         
581                         _all_models.push_back(*model);
582                 }
583         }
584
585         return 0;
586 }
587
588 XMLNode&
589 MIDINameDocument::get_state(void)
590 {
591         static XMLNode nothing("<nothing>");
592         return nothing;
593 }
594
595 const char* general_midi_program_names[128] = {
596         "Acoustic Grand Piano",
597         "Bright Acoustic Piano",
598         "Electric Grand Piano",
599         "Honky-tonk Piano",
600         "Rhodes Piano",
601         "Chorused Piano",
602         "Harpsichord",
603         "Clavinet",
604         "Celesta",
605         "Glockenspiel",
606         "Music Box",
607         "Vibraphone",
608         "Marimba",
609         "Xylophone",
610         "Tubular Bells",
611         "Dulcimer",
612         "Hammond Organ",
613         "Percussive Organ",
614         "Rock Organ",
615         "Church Organ",
616         "Reed Organ",
617         "Accordion",
618         "Harmonica",
619         "Tango Accordion",
620         "Acoustic Guitar (nylon)",
621         "Acoustic Guitar (steel)",
622         "Electric Guitar (jazz)",
623         "Electric Guitar (clean)",
624         "Electric Guitar (muted)",
625         "Overdriven Guitar",
626         "Distortion Guitar",
627         "Guitar Harmonics",
628         "Acoustic Bass",
629         "Electric Bass (finger)",
630         "Electric Bass (pick)",
631         "Fretless Bass",
632         "Slap Bass 1",
633         "Slap Bass 2",
634         "Synth Bass 1",
635         "Synth Bass 2",
636         "Violin",
637         "Viola",
638         "Cello",
639         "Contrabass",
640         "Tremolo Strings",
641         "Pizzicato Strings",
642         "Orchestral Harp",
643         "Timpani",
644         "String Ensemble 1",
645         "String Ensemble 2",
646         "SynthStrings 1",
647         "SynthStrings 2",
648         "Choir Aahs",
649         "Voice Oohs",
650         "Synth Voice",
651         "Orchestra Hit",
652         "Trumpet",
653         "Trombone",
654         "Tuba",
655         "Muted Trumpet",
656         "French Horn",
657         "Brass Section",
658         "Synth Brass 1",
659         "Synth Brass 2",
660         "Soprano Sax",
661         "Alto Sax",
662         "Tenor Sax",
663         "Baritone Sax",
664         "Oboe",
665         "English Horn",
666         "Bassoon",
667         "Clarinet",
668         "Piccolo",
669         "Flute",
670         "Recorder",
671         "Pan Flute",
672         "Bottle Blow",
673         "Shakuhachi",
674         "Whistle",
675         "Ocarina",
676         "Lead 1 (square)",
677         "Lead 2 (sawtooth)",
678         "Lead 3 (calliope lead)",
679         "Lead 4 (chiff lead)",
680         "Lead 5 (charang)",
681         "Lead 6 (voice)",
682         "Lead 7 (fifths)",
683         "Lead 8 (bass + lead)",
684         "Pad 1 (new age)",
685         "Pad 2 (warm)",
686         "Pad 3 (polysynth)",
687         "Pad 4 (choir)",
688         "Pad 5 (bowed)",
689         "Pad 6 (metallic)",
690         "Pad 7 (halo)",
691         "Pad 8 (sweep)",
692         "FX 1 (rain)",
693         "FX 2 (soundtrack)",
694         "FX 3 (crystal)",
695         "FX 4 (atmosphere)",
696         "FX 5 (brightness)",
697         "FX 6 (goblins)",
698         "FX 7 (echoes)",
699         "FX 8 (sci-fi)",
700         "Sitar",
701         "Banjo",
702         "Shamisen",
703         "Koto",
704         "Kalimba",
705         "Bagpipe",
706         "Fiddle",
707         "Shanai",
708         "Tinkle Bell",
709         "Agogo",
710         "Steel Drums",
711         "Woodblock",
712         "Taiko Drum",
713         "Melodic Tom",
714         "Synth Drum",
715         "Reverse Cymbal",
716         "Guitar Fret Noise",
717         "Breath Noise",
718         "Seashore",
719         "Bird Tweet",
720         "Telephone Ring",
721         "Helicopter",
722         "Applause",
723         "Gunshot",
724 };
725
726 } //namespace Name
727
728 } //namespace MIDI
729