13
0
Commit Graph

65 Commits

Author SHA1 Message Date
3b77472ac0
Overhaul InstrumentInfo
* Remove unused direct calls into plugin
* Assume empty model to mean plugin-provided MIDNAM (!)

The route owned Instrument-Info is the central access point used
by the GUI for MIDI name lookups.

At this point in time, custom settings are saved/restored by the
GUI (MidiTimeAxisView). InstrumentInfo provides a volatile store
for MIDNAM mode and model.
2020-04-01 16:31:58 +02:00
4874ff8843 slightly enhanced error handling when loading MIDNAM data 2019-12-19 13:14:45 -07:00
0301c47f6b
Update core library GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
0f24316c3c
Ignore MIDNAM NRPN Controls for the time being
This fixes an issue with Novation_BassStationII.midnam
duplicate assignments CC + NRPN.
2019-05-04 00:07:26 +02:00
948c5d0706 Handle some midnam edge-cases
Whitespace between XML nodes can result in "text" children.
Those need to be skipped in the patch-name list.
2018-11-23 22:43:26 +01:00
7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
d11d8b8a96 Catch new exception in other places. 2017-08-30 17:53:31 +02:00
2d52b425b8 Use XMLNode::set_property API in Midnam related classes 2017-04-19 09:36:48 +10:00
08fffeffec Remove Evoral::MIDIEvent
It is slightly questionable whether type specific methods like
velocity() belong on Event at all, these may be better off as free
functions.  However the code currently uses them as methods in many
places, and it seems like a step in the right direction, since, for
example, we might some day have events that have a velocity but aren't
stored as MIDI messages (e.g. if Ardour uses an internal musical model
that is more expressive).

In any case, the former inheritance and plethora of sloppy casts is
definitely not the right thing.
2016-12-03 15:18:21 -05:00
efc26a0490 Store the file path when constructing MidiNameDocument
This is so we can compare and see if we have already parsed the file
2015-10-22 11:51:03 -04:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
2a251b4570 MusicalTime => Beats. 2015-01-07 00:12:07 -05:00
2e62ca9631 Fix off-by-one MIDI note names.
Much like everything else in midnam, it's not specified whether the numbers are
0 or 1 relative, but everything out there seems to be 0 relative and this
matches the canvas, so go with that.
2014-12-29 20:20:16 -05:00
d2cafbe95a Remove some aborts that don't really need to be.
Enforce PatchPrimaryKey sanity at the type level rather than attempting to
check for it everywhere.

Remove dead file.
2014-12-17 19:43:09 -05:00
c1cfa12d6e Wrap MusicalTime in a class.
This lets us get a more explicit handle on time conversions, and is the main
step towards using actual beat:tick time and getting away from floating point
precision problems.
2014-11-22 04:05:42 -05:00
a361781e08 plug a major mem hog.
(default empty session is now ~140MB RSS, was 280MB)
libXML memory was only free() at exit
2014-09-09 23:53:27 +02:00
fe9f2b15b1 Support midnam files with a channel (not patch) NoteNameList. 2014-07-15 15:18:18 -04:00
59631acc5f fix merge with master 2014-01-11 15:19:18 -05:00
72d8ca89e2 Support midnam controller value labels. 2014-01-10 20:51:54 -05:00
3020b224fa Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there 2014-01-10 16:07:57 -05:00
e281f5653c fix assert for non-existing MIDI patch-names
typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = MIDI::Name::ChannelNameSet; typename boost::detail::sp_member_access<T>::type = MIDI::Name::ChannelNameSet*]: Assertion `px != 0' failed.
2013-12-30 16:24:27 +01:00
369c0e4a66 'libs/midi++2' - Modify to be buildable with MSVC 2013-07-25 07:19:51 +01:00
6375b5d278 Default to "7bit" controller type if missing, as per DTD.
git-svn-id: svn://localhost/ardour2/branches/3.0@14012 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-27 17:15:46 +00:00
4e6d0c9e61 Show matching controller name in automation lane header.
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
2013-01-20 08:56:00 +00:00
64f1a8e893 Error checking string to int conversion from midnam files.
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
2013-01-20 07:33:27 +00:00
586484abf0 Support loading MIDI note names in NoteGroup tags as well.
git-svn-id: svn://localhost/ardour2/branches/3.0@13919 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 04:27:12 +00:00
f7ada4b323 Add General MIDI drum note names and patch names.
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
2013-01-20 02:41:27 +00:00
4a47edeaf0 Fix MIDI note number off by one error.
Bloody one-based indices...


git-svn-id: svn://localhost/ardour2/branches/3.0@13911 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 01:12:12 +00:00
230c4e080e Fix midnam warning messages.
git-svn-id: svn://localhost/ardour2/branches/3.0@13910 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 00:58:19 +00:00
88de45b7cc 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
2013-01-20 00:46:55 +00:00
444d89b669 Set MIDI device mode to the first by default if unset.
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
2013-01-19 20:15:15 +00:00
2d9a15087b Use a std::set for MIDI device models so the combo is sorted and the user can find things.
git-svn-id: svn://localhost/ardour2/branches/3.0@13902 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19 19:25:06 +00:00
b1bc353f0d Add standard MIDI midnam file and remove hard coded equivalent.
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
2013-01-19 10:02:00 +00:00
e092fe33af Preliminary support for named MIDI controllers via midname files.
Add midnam file for Moog Minitaur controller names.


git-svn-id: svn://localhost/ardour2/branches/3.0@13852 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-16 08:24:31 +00:00
1a096d5472 yet another fix for complaints from OS X gcc about constness
git-svn-id: svn://localhost/ardour2/branches/3.0@13361 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-29 16:16:07 +00:00
Hans Baier
9a19da77e3 fix insidious bugs in midnam_patch.cc which account for garbled data
git-svn-id: svn://localhost/ardour2/branches/3.0@13219 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-09 03:17:15 +00:00
Hans Baier
0bb2227eb8 add unit tests to midi++ and assorted bugfixes for midnam_patch.cc
git-svn-id: svn://localhost/ardour2/branches/3.0@13213 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-08 04:32:12 +00:00
d1d08e3910 fix complete screw up in connecting MIDNAM PatchNameList with ChannelNameSets; more tweaks and twirls for patch/program change mgmt
git-svn-id: svn://localhost/ardour2/branches/3.0@12673 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-12 16:32:06 +00:00
557f56a7f2 more changes to patch change/plugin preset support - replace regexp replacement with boost::replace_all(), actually find programs/patches in the data we have, and more. notable changes to constructors and structure of various MIDI::Name objects
git-svn-id: svn://localhost/ardour2/branches/3.0@12667 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-12 04:05:10 +00:00
d97312d438 lots more work trying to create a common structure for accessing plugin and MIDNAME patch/preset/program names. still not done
git-svn-id: svn://localhost/ardour2/branches/3.0@12665 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-11 22:59:35 +00:00
23350c195d remove craziness of propagating MIDI 7 bit limits into MIDNAM handling by replacing bank_msb/lsb with "bank" ; move responsibility for discovering patch names into MIDI trackview (soon to move again)
git-svn-id: svn://localhost/ardour2/branches/3.0@12647 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-10 16:42:17 +00:00
Carl Hetherington
d2f61e0f4c Look in the UsesPatchNameList for the name rather than
its parent.


git-svn-id: svn://localhost/ardour2/branches/3.0@12551 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-03 15:47:23 +00:00
8f4e126c72 a lot of tweaking and fixing for the MIDNAM parsing code so that it correctly handles all 44 sample files from digicake.com/midnams.
git-svn-id: svn://localhost/ardour2/branches/3.0@11734 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-20 18:01:59 +00:00
bc56eb8bd7 Fix unused parameter warnings since GCC apparently doesn't feel like listening to -Wno-unused-parameter
git-svn-id: svn://localhost/ardour2/branches/3.0@5835 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-21 00:15:42 +00:00
8713667ec1 rework Stateful::set_state() patch to avoid default version argument
git-svn-id: svn://localhost/ardour2/branches/3.0@5787 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15 18:56:11 +00:00
Carl Hetherington
79f91c7a20 Part 1 of loading 2.X sessions; some things work, some things don't, hacks a-plenty.
LOADING 2.X SESSIONS WITH THIS COMMIT IN PLACE WILL (PROBABLY) CORRUPT THE .ardour FILE,
MAKING THE SESSION UNLOADABLE ON 2.X AND LOSING INFORMATION.

So don't do that unless you make a backup of the session file first.



git-svn-id: svn://localhost/ardour2/branches/3.0@5786 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15 00:57:55 +00:00
2463be97f7 Make sure Evoral::MIDIEvent XML stuff is entirely unused in midi++ for now (resolve ticket #0002491).
Remove empty midi++ README etc files (and ancient nearly-empty midi++ ChangeLog).


git-svn-id: svn://localhost/ardour2/branches/3.0@4621 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-18 18:04:54 +00:00
Hans Baier
625507fc1a * extend MIDNAM support (PatchBanks containing the bank select MIDI Commands)
git-svn-id: svn://localhost/ardour2/branches/3.0@4409 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-15 03:13:24 +00:00
Hans Baier
5e7ae490c1 * first working prototype of changing program changes by scroll wheel (still some automation points issues)
git-svn-id: svn://localhost/ardour2/branches/3.0@4324 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-15 11:05:41 +00:00