summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_patch_manager.h
AgeCommit message (Collapse)Author
2016-10-30Fix midnam replacement:Robin Gareus
Unloading before update may otherwise reset the patch to generic midi (when the current patch is no longer available)
2016-10-29Allow to dynamically un/load Midnam PatchesRobin Gareus
2015-10-22Only parse additional Session midnam files on Session loadTim Mayberry
When loading a Session add the Session patchfiles directory to the MidiPatchManager search path and only process/parse the files for that directory rather than refreshing/reparsing all the files. Similarly for unload, just unload the devices that are from the Session specific midnam files instead of removing the path and refreshing/reparsing all the files. This will not remove the "system" midnam files as they are always added first and duplicates from the session patchfiles directory are ignored.
2015-10-22Decouple Session from MidiPatchManager and reduce parsing of midnam xml filesTim Mayberry
The MidiPatchManager only requires a reference to the session to get the path to the Session midnam directory so change it so that the path is passed to MidiPatchManager::add_search_path on Session construction and removed on Session Destruction. This will also make it easier to test and reduce compile times etc. For the common case where the Session doesn't have a Session specific midnam patch files directory(for instance a new session) it won't cause a refresh and reparsing of all the midnam files. This saves about 2 seconds to load a Session on my machine(fast machine with SSD), or about half the time spent in the Session constructor for a new session. There is still going to be that initial cost of parsing the midnam files when the first session is created after starting Ardour. Options to remove that would be to parse the files asynchronously and or use a faster xml parser(eventually), neither of which seem worth doing at this stage. This change will cause a performance regression for the uncommon case where a Session with Session specific midnam files is unloaded and then another Session with Session specific midnam files is loaded as it will cause the common midnam files in midi_patch_path to be parsed twice(unload and load).
2015-10-22Refactor common code in MidiPatchManager class into new methodTim Mayberry
2015-01-10gracefully handle missing .midnamRobin Gareus
Fixes bug: Add a .midnam to local preferences. use it in a session. delete the .midnam, reload session -> crash
2014-12-13Structure MIDI device selector by manufacturer.David Robillard
Unfortunately we store the state of models as simply model, so if there's ever duplicate model names, we're somewhat screwed, but this makes the (previously unmanageably huge) menu usable, while retaining the "model name as global identifier" state unmodified.
2014-01-11fix merge with masterPaul Davis
2014-01-10Support midnam controller value labels.David Robillard
2013-10-17add export visibility macros across libardourPaul Davis
2012-06-12fix complete screw up in connecting MIDNAM PatchNameList with ↵Paul Davis
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-12more changes to patch change/plugin preset support - replace regexp ↵Paul Davis
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-03-20make MIDI Patch Manager search in $user_config_dir/patchfiles for midnam ↵Paul Davis
files as well as the per-session equivalent. need to stop it from doing at session shutdown time too. git-svn-id: svn://localhost/ardour2/branches/3.0@11736 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-19use new syntax for connecting to backend signals that enforces explicit ↵Paul Davis
connection scope, plus a few other related matters git-svn-id: svn://localhost/ardour2/branches/3.0@6376 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17switch to using boost::signals2 instead of sigc++, at least for libardour. ↵Paul Davis
not finished yet, but compiles, loads sessions, records and can close a session without a crash git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14Strip trailing whitespace and fix other whitespace errors (e.g. space/tab ↵David Robillard
mixing). Whitespace changes only. Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-12Remove most using declarations from header files.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-23* added comments to midi_region_view.hHans Baier
* implemented choosing patches with context menu on the program change flag * added convenience method and a little refactoring in midi_patch_manager.h Conflicts: .cproject build-tmp.sh git-svn-id: svn://localhost/ardour2/branches/3.0@4338 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-15* first working prototype of changing program changes by scroll wheel (still ↵Hans Baier
some automation points issues) git-svn-id: svn://localhost/ardour2/branches/3.0@4324 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-14* some refactoring of patch name stuff in preparation for altering program ↵Hans Baier
changes events git-svn-id: svn://localhost/ardour2/branches/3.0@4323 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-10* make patch selection appear only when there are patches loadedHans Baier
* add combobox to select CustomDeviceMode * add code to resolve patch names by their msb, lsb and program change number git-svn-id: svn://localhost/ardour2/branches/3.0@4306 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-09* moved /midi_patch_manager.* to libs/ardourHans Baier
* GUI improvement: do away with the midi channel expander git-svn-id: svn://localhost/ardour2/branches/3.0@4305 d708f5d6-7413-0410-9779-e7cbd77b26cf