Support note names from midnam files (tested with the DM5).

Do this via a simple MasterDeviceNames::note_name() function.  The same really
needs to be done for program names, this stuff is absolutely brutal to use.

Store note names in a vector indexed by number instead of a list with string
"numbers" for reasonable lookup time.

Make some references const that should be.


git-svn-id: svn://localhost/ardour2/branches/3.0@13908 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2013-01-20 00:46:55 +00:00
parent 448c156b4b
commit 88de45b7cc
6 changed files with 173 additions and 54 deletions

View file

@ -127,11 +127,11 @@ public:
* @key a reference to an instance of MIDI::Name::PatchPrimaryKey whose fields will
* will be set according to the result of the lookup
*/
void get_patch_key_at (double time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key);
void get_patch_key_at (double time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key) const;
/** Convert a given PatchChange into a PatchPrimaryKey
*/
MIDI::Name::PatchPrimaryKey patch_change_to_patch_key (ARDOUR::MidiModel::PatchChangePtr);
/** Convert a given PatchChange into a PatchPrimaryKey
*/
MIDI::Name::PatchPrimaryKey patch_change_to_patch_key (ARDOUR::MidiModel::PatchChangePtr);
/** Change old_patch to new_patch.
* @param old_patch the canvas patch change which is to be altered