Commit graph

362 commits

Author SHA1 Message Date
Robin Gareus
a28b1f548e
Add interface to inform plugins about replicated instances
This allows for asking plugins to synchronize internal state
that isn't visible to the host between plugin instances.
2020-10-06 23:34:25 +02:00
Robin Gareus
7ab664d5a4
Properly emit Plugin::DropReferences (1/2) 2020-10-05 19:57:14 +02:00
Robin Gareus
2f68656679
Update API to send immediate events
This is to allow passing the EventType to the Buffer, using a
consistent {[Time], Type, size, data} API, that is equivalent
for all classes.

This is particularly useful for Lua scripts and plugin UIs
than can call `write_immediate_event()` while being ignorant
where the data is routed to (MIDI tracks, plugins, processors).
2020-09-20 19:16:43 +02:00
Robin Gareus
0ca0b4f335
VST3 skeleton 2020-09-16 22:49:19 +02:00
Robin Gareus
c5014d9d9e
Remove unused LV2 ifdef 1/3
LV2 has been mandatory since 6.0 (04ccd328dc)
2020-09-15 17:01:32 +02:00
Robin Gareus
1a50b6b8ea
Update Plugin API to allow timestamped parameter changes
This is in preparation for VST3 automation.
2020-09-14 23:37:21 +02:00
Robin Gareus
6742a0961c
Ask LuaProc to drop references
This fixes a circular shared_ptr<> reference that prevents
plugin destruction.

LuaProc may hold references to Route that contains the plugin
or the PluginInsert of the LuaPlugin. These are only dropped
when the interpreter collects garbage.

Previously this happened in the d'tor or LuaProc, but while the
Plugin has a reference to the Insert, the Insert is not deleted
and the d'tor is never called.
2020-08-05 22:39:06 +02:00
Robin Gareus
4d76388b8d
Remove no-inplace check from rt-context
This may fix a crash due to concurrency when _in_map changes
while the plugin runs and calls ::check_inplace()
2020-07-08 22:49:50 +02:00
Robin Gareus
bb62f7eaec
Plugin: bypass <> enabled mapping
LV2 uses "enabled": -1: inactive, 0: bypassed, 1:enabled
VST3 has "bypass: 0:active, 1: bypassed
2020-04-16 16:47:13 +02:00
Robin Gareus
2d4e125802
Prefer std::string for print_parameter API 2020-04-16 16:47:13 +02:00
Robin Gareus
eeb2e99a3b
Display unit-label of VST parameters -- #7938 2020-03-26 02:17:22 +01:00
Robin Gareus
ebd743d795
NO-OP: use set/clear_flag() API instead of set_flags() 2020-03-10 20:55:50 +01:00
Robin Gareus
f372cc0bf2
Fix PI bypass, fix apply linear pin-connections
Previously this could assert(), copying a buffer to itself.
2020-02-26 17:49:01 +01:00
Robin Gareus
46a6f47362
Address sidechain-port name uniqueness
[Re]name sidechain port directly when a plugin is added.

Usually plugins are constructed without an Route (owner is unset).
PluginInsert c'tor may already create a side-chain port, at the
time of construction the sidechain port will be created using
the port-name "toBeRenamed".

Previously the plugin had to be added to a route using "add_processor",
in order to set a unique name, before a new plugin with sidechain
could be constructed.

ProcessorBox::use_plugins() did that in the correct sequence,
however there may have been cases where this didn't work, and
Route::add_processors() was called directly..
2020-02-13 00:47:18 +01:00
Robin Gareus
93180ceea9
Add Inline Control Port Property
This allows to indicate that a control should by default be displayed
inline in the mixer-strip.

Previously that was hard-coded for and enabled for send-level
controls only.
2019-12-14 15:50:56 +01:00
Robin Gareus
3cf888498a
Fix automation lookup when rolling backwards 2019-11-18 15:55:32 +01:00
Robin Gareus
3c446a5275
Fix cycle-end position when not rolling
When stopped start_sample == end_sample.
This fixes accidental automation lookup,
as well as plugin time/position information.
2019-11-14 21:50:00 +01:00
Paul Davis
febaa1ff2d fix unconditional note resolution during DiskReader::realtime_locate()
When looping, we do not want to resolve notes at the end of the loop via ::realtime_locate() -
::get_midi_playback() has already taken care of this. But when not looping, we need this. So,
add an argument to tell all interested parties whether the locate is for a loop end or not
2019-11-06 16:00:31 -07:00
Robin Gareus
a5140f4558
Handle Lua DSP script load failure (unknown plugin)
This handles a very specific edge-case: A script that was
successfully parsed before, fails load on session state restore.
2019-11-01 15:54:36 +01:00
Paul Davis
f470d3e856 remove all use of NO_PLUGIN_STATE #ifdef
We determined several years that we should never ever do this,
and changed the basis for the free/demo copy because of that.
2019-10-02 18:04:40 -06:00
Robin Gareus
27f6754f1a
Amend 903c3ec5a API rename 2019-10-02 21:28:13 +02:00
Robin Gareus
a7cb2055ec
Plugin type lookup does not change PI 2019-10-02 19:35:03 +02:00
Robin Gareus
539b61f127
Remove unused API (and some MIXBUS specifics) 2019-10-02 19:29:52 +02:00
Paul Davis
903c3ec5a0 rename BufferSet::get* to BufferSet::get_available*
This tries to make it clear what the BufferSet limit semantics really are
2019-09-26 18:39:56 -06:00
Robin Gareus
9ce5184993
NO-OP: comment 2019-08-24 17:11:22 +02:00
Robin Gareus
05e0cc4035
Fix prev commit, state-restore of plugins 2019-08-20 02:06:55 +02:00
Ben Loftis
031847f88e
LV2 extension to override strict-i/o per plugin
This allows mono to stereo plugins to override the default
routing and forces both outputs to be connected.
2019-08-19 23:28:04 +02:00
Robin Gareus
a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Robin Gareus
430e51065c
Update cAutomationControl values when copying state
This fixes a bug that can result in inconsistent session-state when
copying plugin state from one plugin to another (via drag/drop
ProcessorBox::object_drop, LINK).

The underlying plugin state and settings are copied, port _shadow_data
is updated, and ::get_parameter() shows the correct new value.

However the Controllable was not updated. On Session save/restore
the value may have be lost or was inconsistently restored.
2019-03-22 14:12:30 +01:00
Robin Gareus
5372f9182d
NO-OP: reduce scope 2019-03-22 14:06:51 +01:00
Robin Gareus
bdcfab73f8
Use VST's print_parameter() when applicable. 2019-03-11 02:56:08 +01:00
Robin Gareus
d2b73141af
Fix analysis plugin when using plugin-presets 2019-02-28 04:49:27 +01:00
Robin Gareus
5d4fbcb1ea
Allow to special case plugins used for IR analysis
This is relevant for some VST specifics (e.g connected pins) or
similar audioMasterCallbacks that use either global or plugin-insert
specific data.
2019-02-28 04:49:00 +01:00
Robin Gareus
5714e390f8
Take latency into account when analyzing live signal 2019-02-28 04:20:12 +01:00
Robin Gareus
69322ccd1b
Add unified API to select plugins to show on control-surfaces
e.g. Mixbus channelstrip should be hidden, also mixbus' built-in
effects are exposed as well-known controls
2019-02-20 16:26:51 +01:00
Robin Gareus
6d7bc4ea30
Emit signal when plugin latency changes 2019-02-17 02:22:03 +01:00
Robin Gareus
3cffaeac74
Prepare to allow to disable latency-compensation
Previously "zero custom/user latency" meant "default plugin latency".
This is now saved in a separate boolean allowing a user to reduce a
processor's latency to zero.

This also prepares for a global switch to use zero latency throughout
the whole session.
2019-02-16 01:10:50 +01:00
Robin Gareus
3f66bac4d0
Fix MIDI-bypass for inplace plugins -- #7722 2019-02-09 00:38:36 +01:00
Robin Gareus
6a171eb847
Remove cruft: previous set_value_unchecked optimization 2018-12-16 04:25:24 +01:00
Robin Gareus
e4d3ebfb66
Optimize plugin-processing for non-automated params
Keep a dedicated list of automated parameters to evaluate in realtime.
This fixes a performance issue with plugins that have many controls
with only few of them being automated.
2018-12-16 04:25:20 +01:00
Robin Gareus
aa8128cdf5
Fix logic-error in d1cf2163: hide info for optimized builds 2018-12-04 17:06:13 +01:00
Robin Gareus
d1cf21634f
Special case Mixbus Chanstrip for load calculation
These processors don't have a UI, so their load stats are not easily
visible. The stats can still be queried via Lua API or DSP-load
overview window, so we retain this for debug builds.
2018-12-03 22:43:02 +01:00
Robin Gareus
cf98a75558
Do not allocate MIDI buffers for signal analysis
At this point in time MIDI buffers are vastly over-sized.
They include VST and LV2 event structure. This added about a MB per
plugin for no benefit.
2018-11-25 17:43:15 +01:00
Robin Gareus
8a4518d76f Remove C++11'ism
While gnu-gcc had `std::map:at const` as non-standard extension
it is n/a for older gcc on OSX.

Surprisingly this const& p() const; performs a tad better as well, likely
due to different exception handling.

Perhaps it is also worth investigating boost::flat_map<> as replacement
for std::map<>, here. Our common case is just a single entry, so using
a std::vector emulated mapping might help.
2018-11-04 15:37:46 +01:00
Robin Gareus
8d6d0b3232 Prefer const references for Pin/Channel maps
Another micro-optmization shaving off some ten microseconds for every
plugin. Also copying maps isn't RT-safe.

This may however cause issue if const map references can change
while a plugin is running.
2018-11-04 03:25:36 +01:00
Robin Gareus
e4c7cb1e75 Plugin pin-mapping micro-optimization
Prefer std::map::at() over std::map::operator[] to allow const maps.
For debug builds, there should probably some try{} catch{} along with this.
2018-11-04 02:21:53 +01:00
Robin Gareus
51e33796f1 Optimize Parameter Control Loop
For plugins with 10000 Control Inputs, dynamic_pointer_cast<> overhead
is significant, here ~2msec (~0.2usec per cast, optimized build, i7-5600U,
2.60GHz)
2018-11-04 02:16:34 +01:00
Johannes Mueller
fe318c0cd5 Create sidechain ports when created from template (#0007680)
When a route with a sidechain is created from a template or by route
duplication the number of ports of the sidechain are set according to the
XMLNode defining the sidechain. Then the names are set according to the name of
the newly created route.

Thus all the pin connections defined in the template are replicated in the
newly created route.
2018-11-01 22:17:01 +01:00
Johannes Mueller
732fd75f9b Update names of sidechains.
When a PluginInsert is created it does not have an owner right away. That's why
a we need to set the sidechains name once the owner is known, in order to
include owner's name into the name.

Furthermore we need to follow renames of the owner.
2018-11-01 18:53:27 +01:00
Robin Gareus
fd832d9d1a Add option to limit automatable control parmaters
VCVRack VST currently exposes 9999 automatable-control parmaters.
This slows down various GUI dropdown lists and dialogs.
(even worse: those parameters are not mapped to anything by default).

This change allows to limit automatable parameters to a reasonable number,
without loosing state of already automated parameters in existing sessions.
2018-10-31 23:44:04 +01:00