summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
AgeCommit message (Collapse)Author
2013-01-05Send LV2 time properties with correct types from specification.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13791 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-04Fix crash when loading LV2 plugins with a corrupt ↵David Robillard
LV2_Descriptor::extension_data. This is a plugin bug, but Ardour is supposed to check using the data as well. git-svn-id: svn://localhost/ardour2/branches/3.0@13777 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-18Deliver MIDI events to atom ports that support it, merged with transport events.David Robillard
Eliminate delivery of non-MIDI events to Ardour MIDI buffers. Fix the general mess of LV2 port flags and types. Unify old MIDI API and new atom API MIDI stuff. Making this work required changing the way we do LV2 MIDI slightly: instead of BufferSet::get_lv2_midi doing the translation automatically, it returns an empty buffer and the caller is responsible for actually filling it. This allows the LV2 code to iterate over the MIDI and transport changes in one go to merge them into the buffer at the correct times. Synth plugins using the new atom API now work and can get accurate transport information along with the MIDI that drives them. git-svn-id: svn://localhost/ardour2/branches/3.0@13522 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-18Gracefully ignore plugins with no ports, or invalid ports.David Robillard
Remove crufty old LV2 debug printing stuff. git-svn-id: svn://localhost/ardour2/branches/3.0@13520 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-18Better implementation of LV2 plugin<=>UI communication.David Robillard
This might use a bit more memory than it could, but it works reliably for me loading a large Ingen patch inside Ardour as an LV2 plugin, which I'm pretty sure is by far the most high volume such communication out there. git-svn-id: svn://localhost/ardour2/branches/3.0@13519 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-17Sent precise transport information to LV2 plugins via events.David Robillard
We send the full transport state (frame position, BBT time, transport speed, meter) to the plugin: * At the start of a cycle whenever a relocate or transport speed change has occurred * On every occurrence of a meter change within a cycle This means the plugin gets a sample accurate meter/tempo map, even if the meter changes in the middle of a cycle. However, this is not quite right yet: things can get wonky if the tempo map is edited while rolling, since this code will not detect the change and fail to update the plugin at the start of the cycle. Other changes: * Factor out TempoMetric::set_metric() and simplify some tempo functions * Clean up LV2 URID stuff git-svn-id: svn://localhost/ardour2/branches/3.0@13513 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-09-16Support latest options extension.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13191 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-09-08Consistent style.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13180 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-30Fix compilation without svn lv2.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13152 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-29Implement latest buf-size extension via new options extension.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13151 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-28LV2: amend previous commit, respect replicated plugin instancesRobin Gareus
When a plugin is replicated (eg. mono plugin on a stereo-track), configure_io() is only called for the first instance. The 2nd instance will not have dedicated buffers but re-use copies of the first instance. Should the 2nd instance use a LV2 worker-thread or local communication ports they can not be shared with the first instance. -> this patch allocates Atom-buffers for each instance. PS. this still needs more work; there is only one UI instance for all plugin instances. messages from the UI should go to all instances. git-svn-id: svn://localhost/ardour2/branches/3.0@13148 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-28LV2: allocate dedicated buffers for [non-midi] event-ports.Robin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13147 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-27fix LV2 workerRobin Gareus
start worker thread after _sem and _exit have been initialized. stop thread when plugin is removed. git-svn-id: svn://localhost/ardour2/branches/3.0@13145 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-27dedicated LV2 non-MIDI atom-event-port handlingRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13144 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-21Create and realize LV2 UI container before instantiating (required for ↵David Robillard
proper embedding in some situations). git-svn-id: svn://localhost/ardour2/branches/3.0@13140 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-18Fix some const-violating casts.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13138 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-17LV2 log extension support.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13135 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-08Fix more tab width assumption mess caused by Paul's misconfigured editor.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@13113 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-08-08Support new LV2 buf-size extension if a new enough (currently svn) LV2 is ↵David Robillard
present. git-svn-id: svn://localhost/ardour2/branches/3.0@13112 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-12break recursive loops of ↵Paul Davis
Plugin::parameter_changed()->Plugin::ParameterChanged()->Plugin::parameter_changed() ... git-svn-id: svn://localhost/ardour2/branches/3.0@13036 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-192nd half of patch for handling LV2 presets from colinf (#4698)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12786 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-09Send LV2 notes to the info stream.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@12632 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-27Re-implement URIMap to tolerate broken plugins that use the wrong context toDavid Robillard
map MIDI event types (fix #4889). All uri-map contexts are now just ignored, and equivalent to urid (which is equivalent to uri-map with context NULL). We now just hope that no event types are mapped after UINT16_MAX URIs have been mapped, and die horribly otherwise. This is exceedingly unlikely to happen any time in the next several years, if ever. git-svn-id: svn://localhost/ardour2/branches/3.0@12462 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-05-02a variety of mostly unused parameter errors from OS X Lion's compilerPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12148 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-21Use URI defines from LV2 headers instead of error-prone hardcoded URIs.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@12051 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-21Fix crash when removing an LV2 plugin or on shutdown.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@12050 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-20Add "Description" pane to generic plugin UI for LV2 plugins with ↵David Robillard
documentation (rdfs:comment property). A Gtk::Entry might be better here, making Gtk::Label wrap based on size is tedious... git-svn-id: svn://localhost/ardour2/branches/3.0@12043 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-20Set tooltips on generic UI controls for LV2 plugin controls with ↵David Robillard
documentation (rdfs:comment property). git-svn-id: svn://localhost/ardour2/branches/3.0@12042 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-20Remove support for old and/or experimental LV2 stuff.David Robillard
Ardour 3 now simply depends on the latest version of Lilv, which depends on the LV2 package (which contains all the LV2 headers). git-svn-id: svn://localhost/ardour2/branches/3.0@12041 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-13Fix compilation with old lilv.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11960 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-13Implement proper LV2 preset support.David Robillard
The old code here was attempting to load several various random methods of listing LV2 presets. IMO this situation has become untenable, the way implemented here is the way documented with examples in the extension, and if plugins don't work with it, they need to be updated. For the record, the rationale behind this change is to make preset data separately loadable, since it tends to be far too massive to have hosts loading it for all plugins when unnecessary. git-svn-id: svn://localhost/ardour2/branches/3.0@11957 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-11Fix crash introduced in r11877 (oops). Add LV2Plugin::port_index().David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11885 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-10Forward port LV2 BPM and freewheeling port stuff from 2.0-ongoing.David Robillard
Fix worker implementation to preserve error codes. git-svn-id: svn://localhost/ardour2/branches/3.0@11877 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-06Execute plugin worker tasks immediately in the audio thread if freewheeling.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11803 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-05Implement LV2 worker extension.David Robillard
This is done by way of a generic Worker object/thread, which currently just applies to one LV2 plugin, but the idea is to share one thread and set of buffers among many plugins. The same pattern may also be useful elsewhere in Ardour. The responding part gets a bit tricker when sharing a worker between plugins, it's not a blocker, and I'm lazy, sooo here's this. This commit also adds a new portable in-process semaphore to PBD. The existing one is pretty weird and uses a named semaphore on OSX for reasons unknown to me. Perhaps as a quick fix to avoid POSIX semaphores being utterly broken on OSX? It would probably be a good idea to replace that with this new one, which uses Mach kernel semaphores on OSX which work well, though I am not sure how pedantically real-time safe they are to signal. git-svn-id: svn://localhost/ardour2/branches/3.0@11790 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-30Update to latest LV2 state extension.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11769 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-25Update to latest LV2 atom extension.David Robillard
Implement proper support for fixed size LV2 plugin UIs. git-svn-id: svn://localhost/ardour2/branches/3.0@11757 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-21Use combo box for plugin controls for ports marked asCarl Hetherington
lv2:enumeration. git-svn-id: svn://localhost/ardour2/branches/3.0@11745 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-17fix crash when setting an LV2 preset that refers to ports via incorrect ↵Paul Davis
names (from bazz) git-svn-id: svn://localhost/ardour2/branches/3.0@11719 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-03Update for latest Lilv SVN.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11587 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-01Hopefully fix compilation without Suil.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11574 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-29Update to latest LV2 atom extension.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11548 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-25Fix real-time violation, only send UI updates if explicitly requested by UI.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11522 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-25Use FastScreenUpdate for UI message updating, and only if plugin has message ↵David Robillard
output ports. git-svn-id: svn://localhost/ardour2/branches/3.0@11521 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-25Full round-trip message communication between LV2 UIs and plugins.David Robillard
Still a little bit rough around the edges, but it works. This can be tested with the eg-sampler plugin from LV2 svn (whose UI can load different samples). git-svn-id: svn://localhost/ardour2/branches/3.0@11519 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-25Use more straightforward 1:1 names for URI nodes.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11518 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-25Support LV2 atom sequence ports alongside old event ports.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11517 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-24Clean up LV2 code in preparation for atom support.David Robillard
Merge all parameter_is_* boolvectors into a single vector of flags (smaller/faster). git-svn-id: svn://localhost/ardour2/branches/3.0@11515 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-28Fix compilation with older Glib.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@11378 d708f5d6-7413-0410-9779-e7cbd77b26cf