Completely eliminate static MIDI controller name code.
Reduce dependency on midnam_patch.h (which would have saved me several hours if I did it earlier).
Store controller name numbers as an integer.
Keep controller names in a map keyed by int instead of a list for fast lookup.
More cleanup of MIDI::Name code.
git-svn-id: svn://localhost/ardour2/branches/3.0@13927 d708f5d6-7413-0410-9779-e7cbd77b26cf
Colon seems most consistent, the separate space is to fix the spacing in the dialog while re-using the existing translation string 'New name:'.
git-svn-id: svn://localhost/ardour2/branches/3.0@13924 d708f5d6-7413-0410-9779-e7cbd77b26cf
Use const references where appropriate.
Fix incorrect use of (either confusingly named or often abused) Patch tag Number attribute.
git-svn-id: svn://localhost/ardour2/branches/3.0@13923 d708f5d6-7413-0410-9779-e7cbd77b26cf
This seems impossible, but it happens. Reproduction instructions:
1) Click in an empty portion of MIDI track to create a region
2) Add a CC lane
3) Click some points into lane (perhaps unnecessary)
4) Switch lane to linear mode (perhaps unnecessary)
5) Attempt to extend region leftward (with draw tool, but probaby doesn't matter)
6) Boom
Note trimming still doesn't work in this case and something seems deeply broken, but at least it doesn't crash now.
git-svn-id: svn://localhost/ardour2/branches/3.0@13922 d708f5d6-7413-0410-9779-e7cbd77b26cf
... I think. Not sure precisely, conditions were fuzzy, I just tortured my
mouse button until I could reproduce it.
git-svn-id: svn://localhost/ardour2/branches/3.0@13921 d708f5d6-7413-0410-9779-e7cbd77b26cf
I can't really make sense of this, they seem to be conflicting and of different origins, but I doubt it's worth my time to figure it out.
Also clean up the other one a bit.
git-svn-id: svn://localhost/ardour2/branches/3.0@13918 d708f5d6-7413-0410-9779-e7cbd77b26cf
The colour on the text doesn't seem to be what it should be, though. I think
Gtkmm2ext::convert_bgra_to_rgba might be broken...
git-svn-id: svn://localhost/ardour2/branches/3.0@13916 d708f5d6-7413-0410-9779-e7cbd77b26cf
Support loading note names per ChannelNameSet (like GM) in addition to per Patch (like DM5).
git-svn-id: svn://localhost/ardour2/branches/3.0@13913 d708f5d6-7413-0410-9779-e7cbd77b26cf
This fixes the note name displayed at a given time to be based on the correct program at that time, and not one in the future.
git-svn-id: svn://localhost/ardour2/branches/3.0@13912 d708f5d6-7413-0410-9779-e7cbd77b26cf
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
Give up trying to hide mode selector when it's useless.
Fix display of program names for default mode.
Abstract out (non-crashy) MidiTimeAxisView::get_device_names().
git-svn-id: svn://localhost/ardour2/branches/3.0@13903 d708f5d6-7413-0410-9779-e7cbd77b26cf
Accordingly, make "generic" MIDI truly generic, just numbered controllers.
Break up MIDI name UI stuff into manageable functions of reasonable size.
Add convenient method to MIDINameDocument for getting the names for a device.
Tolerate comments in MIDINameDocument ControlNameList.
Can't remove the MIDI name code just yet, since it's still erroneously used by
Automatable::describe_parameter(). This is the cause of a bug where the name
on the automation lane does not match that in the menu.
The plan is to make a very simple pure abstract interface for getting MIDI
names, and make it possible to set one for Automatable (or perhaps pass it to
describe_parameter()). Thus we'll be on the way to supporting names from
sources other than midnam files, namely plugins.
git-svn-id: svn://localhost/ardour2/branches/3.0@13895 d708f5d6-7413-0410-9779-e7cbd77b26cf
We will have to embrace and extend the format to provide that. I think it's the only feasible way to present up to 127 controllers in the UI in a decently usable way, so it's probably a good idea to do so.
git-svn-id: svn://localhost/ardour2/branches/3.0@13894 d708f5d6-7413-0410-9779-e7cbd77b26cf
We really need some kind of more sophisticated assert macro that can be
switched to non-fatal logging mode for release builds. A log message, which is
often all that would happen, is a lot better than a trainwrecked performance...
git-svn-id: svn://localhost/ardour2/branches/3.0@13892 d708f5d6-7413-0410-9779-e7cbd77b26cf
Since this is usually not the case, showing this all the time as before was so
confusing everyone thought it was broken (myself included).
Changing that show_all() to a show() might have consequences, but it seems to
work fine and we really shouldn't be using show_all() anyway.
git-svn-id: svn://localhost/ardour2/branches/3.0@13889 d708f5d6-7413-0410-9779-e7cbd77b26cf
... and voila, decent data. Good grief, what a mess that was.
git-svn-id: svn://localhost/ardour2/branches/3.0@13887 d708f5d6-7413-0410-9779-e7cbd77b26cf
By "standard" I mean "actually hosted by the MMA at midi.org". Where the heck
this broken DTD link to sonosphere.org came from is anyone's guess. Either
midi.org wasn't doing things correctly back in the day, or somebody is insane.
Probably both.
As a hint to the legacy of this data, some of these documents referred to
version 0.7, and some have mac newlines. Mac newlines! Remember those?
git-svn-id: svn://localhost/ardour2/branches/3.0@13883 d708f5d6-7413-0410-9779-e7cbd77b26cf