summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_patch_manager.cc
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-30remove debug outputRobin Gareus
2016-10-30avoid C++11 (and remove debug output)Robin Gareus
2016-10-29Allow to dynamically un/load Midnam PatchesRobin Gareus
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2015-10-25properly translatable plural formsRobin Gareus
2015-10-22Enable i18n for info/error messages in MidiPatchManagerTim Mayberry
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-22Don't parse midnam patch files contained in Session twiceTim Mayberry
MidiPatchManager::refresh already adds the patch files contained in the session folder
2015-10-22Refactor common code in MidiPatchManager class into new methodTim Mayberry
2015-10-22Don't call MidiPatchManager::refresh when creating MidiPatchManager instanceTim Mayberry
Currently when loading a session for the first time MidiPatchManager::instance creates the MidiPatchManager singleton which calls MPM::refresh and all the midnam files are parsed etc. MPM::set_session is then immediately called and all the MPM state that has just been set when parsing all the midnam files is cleared and the parsing of all the files is performed again but this time with any session specific midnam patch files. MPM::instance and MPM::set_session consume about 55% of the time spent in the Session ctor according to kcachegrind and removing the double call to refresh brings Session construction time for a particular test session down from 7.5s to 5.5s
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
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-09-11fix memory leak, changing semantics of PatchManager (needs x-check)Robin Gareus
2014-06-25Use PBD::find_files_matching_pattern instead of other variationsTim Mayberry
2014-03-10Transfer 'midi_patch_search_path()' into 'libs/ardour/search_paths.cc'John Emmas
2013-09-06Rename SearchPath class SearchpathTim Mayberry
Windows headers define SearchPath which means we have to undefine it where necessary. This is a pain and can be tricksy, so I feel renaming the class slightly is the easiest solution.
2013-07-11undef SearchPath where needed as it is defined via windows.hPaul Davis
2013-01-19Gracefully handle errors parsing midnam documents instead of crashing.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13904 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-19Use a std::set for MIDI device models so the combo is sorted and the user ↵David Robillard
can find things. git-svn-id: svn://localhost/ardour2/branches/3.0@13902 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-23Use std::string instead of PBD::sys::path in pbd/search_path.h, ↵Tim Mayberry
pbd/file_utils.h and ardour/session_dir.h git-svn-id: svn://localhost/ardour2/branches/3.0@12829 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Remove over 500 unnecessary includes (including 54 of session.h).David Robillard
It's slightly possible that this causes trivial build failures on different configurations, but otherwise shouldn't cause any problems (i.e. no actual changes other than include/naming/namespace stuff). I deliberately avoided removing libardour-config.h since this can mysteriously break things, though a few of those do seem to be unnecessary. This commit only targets includes of ardour/*.h. There is also a very large number of unnecessary includes of stuff in gtk2_ardour; tackling that should also give a big improvement in build time when things are modified. git-svn-id: svn://localhost/ardour2/branches/3.0@12420 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
2010-09-14remove Glib::ustring from libardour; allow any characters except '/' and '\' ↵Paul Davis
in paths (may cause issues when loading creatively named 2.X sessions; fix a couple of details of name collection and usage from the startup dialog git-svn-id: svn://localhost/ardour2/branches/3.0@7772 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-12-12remove using namespace sigc everywhere to ensure clarity over which ↵Paul Davis
bind/mem_fun is being used; make Config::map_parameters take a boost::function rather than a sigc::slot ; continue debugging crash caused by regionviews not tracking their Region's lifetime git-svn-id: svn://localhost/ardour2/branches/3.0@6357 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-22Use info stream for infoey things.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5866 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-06-09Remove annoying pop-up message.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5138 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-07The great audio processing overhaul.David Robillard
The vast majority of Route signal processing is now simply in the list of processors. There are definitely regressions here, but there's also a lot of things fixed. It's far too much work to let diverge anymore regardless, so here it is. The basic model is: A route has a fixed set of input channels (matching its JACK input ports and diskstream). The first processor takes this as input. The next processor is configured using the first processor's output as input, and is allowed to choose whatever output it wants given that input... and so on, and so on. Finally, the last processor's requested output is used to set up the panner and create whatever Jack ports are needed to output the data. All 'special' internal processors (meter, fader, amp, insert, send) are currently transparent: they read any input, and return the same set of channels back (unmodified, except for amp). User visible changes: * LV2 Instrument support (tracks with both MIDI and audio channels) * MIDI in/out plugin support * Generic plugin replication (for MIDI plugins, MIDI/audio plugins) * Movable meter point Known Bugs: * Things seem to get weird on loaded sessions * Output delivery is sketchy * 2.0 session loading was probably already broken... but it's definitely broken now :) Please test this and file bugs if you have any time... git-svn-id: svn://localhost/ardour2/branches/3.0@5055 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-12* fixed memory allocation bugsHans Baier
* commented out a crash line in ardour_ui2.cc (added a warning message). (I thought, it may be fairly efficient to keep issues as code instead of putting them in the tracker where hardly ever one would notice the needle in the haystack) * forgot to clear two other collections on MidiPatchManager::refresh() git-svn-id: svn://localhost/ardour2/branches/3.0@4312 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