Commit graph

420 commits

Author SHA1 Message Date
Robin Gareus
1cc561bf74 Use official LV2 state:StateChanged URI
http://lv2plug.in/git/cgit.cgi/lv2.git/commit/?id=dbb18d82136d43eec435e321bffa835ba5776d6e
2016-10-19 19:45:53 +02:00
Robin Gareus
215d88ac87 Allow a LV2 plugin to mark the session dirty
If some plugin-internal state changes (GUI <> Plugin e.g. load a sample)
no ports change and the host does not know that the plugin state has
changed. The session may be closed without save.

This is a prototype using an ardour.org URI, pending upstream lv2plug.in
2016-10-13 16:04:28 +02:00
Robin Gareus
1acfb11cb6 add a static flag to force writing LV2 state
This is needed for save-as and archiving, LV2 state may not be saved
otherwise if lilv_state_equals() returns true.

Also if thestate is saved as part of save-as or archiving or
template, the state-version did increase.
Upcoming normal save will reference a plugin state that does not exist
in the current session bundle.
2016-09-21 03:45:57 +02:00
Robin Gareus
e2b06156c9 add support for LV2 #coarseBlockLength and #enabled
this deprecated previously non-standard extensions
2016-09-18 19:06:59 +02:00
Robin Gareus
935fd3b32f Add automatable click-free bypass/enable feature to a-eq 2016-08-27 13:23:25 +02:00
Robin Gareus
4a831725af fix threaded state restore (duplicate calls to restore during init)
and also allow immediate work during use latency-compute runs.

At session load, Ardour calls a plugins "set default" state (GUI thread).
Some plugins may schedule work during state-restore. Ardour immediately
proceeded to restore the actual session plugin state without processing
the already scheduled work and without calling run() for a plugin
to apply state synchronously.
2016-08-23 13:46:11 +02:00
Robin Gareus
b3cec2716e fix LV2 BPM report (use ramped tempo) 2016-08-17 17:04:02 +02:00
Robin Gareus
18af0dc4cd Also send lv2:timePosition whenever BBT or Tempo changes
This mostly fixes an issue with notifying plugins about tempo-ramps
and BPM changes.

remaining to be fixed (in tempo.h):
```
_session.tempo_map().metric_at(frame_position).tempo().beats_per_minute()
```
currently returns the most recent *fixed* tempo at or before
`frame_position`. All other Plugin types are affected by this as well.
2016-08-16 13:11:49 +02:00
David Robillard
ae599f0a79 Fix state features array 2016-07-31 22:48:15 -04:00
David Robillard
7c23026515 Support thread-safe LV2 state restoration
The original LV2 state extension required that run() is suspended during
restore().  Ardour violates this rule, which can lead to crashes and
other issues.

The state extension has been updated to allow restoring state in a
thread-safe way by using the worker to enqueue state changes.  This
commit supports that new specification, i.e. supports dropout-free state
restoration properly.

However, the bug with old plugins that do not use this facility is still
not fixed.
2016-07-31 21:59:21 -04:00
David Robillard
ae71e57e24 Support LV2 log trace messages 2016-07-31 20:58:47 -04:00
Paul Davis
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Damien Zammit
fdfff81850 a-EQ: Remove LPF/HPF completely from this plugin 2016-07-15 01:54:50 +10:00
Robin Gareus
56c4eebfdd move LatencyChanged detection from Plugin to Processor (plugin-insert)
* support all Plugin APIs (not implementation specific)
* also check for latency changes when plugins are hard en/disabled
2016-07-09 04:42:21 +02:00
Robin Gareus
db564a03c7 add an plugin API to query generic-gui grid-layout 2016-07-08 18:19:31 +02:00
Robin Gareus
ac325cea25 implement lv2:designation processing#enable (for bypass ports) 2016-07-05 23:30:21 +02:00
Robin Gareus
e542e501a0 add support for http://lv2plug.in/ns/ext/port-props/#rangeSteps 2016-07-05 16:21:09 +02:00
Robin Gareus
15b006c6c2 LV2 render-value: override precision
lv2's units.ttl specifies "%f" for many values by default which results in
useless high precision
2016-07-04 00:20:11 +02:00
Robin Gareus
e9a8ccc7e2 major internal plugin & processor API change:
Pass current (latency compensated) cycle times to plugin.
This fixes time-reporting to plugins and also fixes automation
and when bouncing (the session->transport* is not valid) etc.
2016-06-25 02:23:56 +02:00
Robin Gareus
86607097d6 plugin support for Controllable::NotAutomatable 2016-06-05 19:05:05 +02:00
Robin Gareus
6e42d7b99e prepare for LV2 non-automatable control ports 2016-06-05 14:45:24 +02:00
Robin Gareus
37b90c2a9e refine self-automating plugin interface
* thin automation at end
* allow plugins to disable its internal write state (ctrl port)
* Debug messages
2016-06-05 14:44:54 +02:00
Robin Gareus
56a5dd92af allow latent self-automating plugins 2016-06-03 23:09:18 +02:00
Robin Gareus
eeed8edf82 isspace 2016-06-01 19:19:09 +02:00
Robin Gareus
10a91850f2 strip trailing whitespace from lv2 log message 2016-06-01 19:01:13 +02:00
nick_m
34c9ac9dd7 Tempo ramps - rename bbt_time() -> bbt_at_frame(), frame_time() -> frame_at_bbt() 2016-05-27 23:38:17 +10:00
nick_m
6309807bc7 Tempo ramps - rename for consistency, remove some testing code, add meter based bbt->pulse conversions. 2016-05-27 23:38:17 +10:00
nick_m
b415b59f79 Tempo ramps - respect tempo note type and meter note divisor correctly.
- tempo and meter position is now pulse-based,
	  although meter still has a beat for convenience.
2016-05-27 23:38:11 +10:00
nick_m
87d49cd6ec Tempo ramps - api rename, fix various meter and tempo dialog bugs. 2016-05-27 23:38:10 +10:00
Robin Gareus
2066afe28c fix LV2 locale guard (missed in 6d343ba search/replace) 2016-05-07 15:38:17 +02:00
Robin Gareus
6d343ba3c6 fix LocaleGuard contstructor (3dc77280) 2016-05-07 12:19:41 +02:00
Robin Gareus
3dc7728038 we always only use the "C" locale when saving. 2016-05-05 21:49:56 +02:00
Paul Davis
17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
Robin Gareus
d81547efb4 add a debug message for LV2 per port buffer allocation 2016-04-28 12:27:53 +02:00
Robin Gareus
4005ef9db6 tweak LV2 atom buffer allocation strategy
Allow to re-use Midi buffers for GUI communication. Honor
resize-port extension for all Atom Sequence buffers.
(following example of http://lv2plug.in/book/#_sampler)
2016-04-27 14:46:24 +02:00
Robin Gareus
e3607a4c8b plug some memory leaks in libardour 2016-04-24 14:43:18 +02:00
Robin Gareus
ab1242ca65 don't use lv2plug.in for non-standard URIs 2016-04-17 16:08:53 +02:00
Robin Gareus
424cacfbc8 variable plugin port config.
* extend plugin API (query IO ports)
* collect possible variable plugin configurations (AU, Lua)
* prepare semi-automatic configuration (presets: mono, stereo, N)
2016-04-15 17:57:40 +02:00
Robin Gareus
752662051a add Plugin LatencyChanged() signal and max latency report 2016-04-08 18:16:01 +02:00
Robin Gareus
650f2802a0 Implement describe_io_port() API for LV2 2016-04-03 22:45:23 +02:00
Hanspeter Portner
b0937edeec Fix blocked patch:Set messages. 2016-03-18 23:36:11 +01:00
Robin Gareus
1665baa917 add missing ifdef 2016-03-16 19:39:13 +01:00
Robin Gareus
93bc9b9728 update [LV2] Plugin Inline Display API: drop cairo dependency 2016-03-14 16:45:27 +01:00
Robin Gareus
c32824e452 Implement LV2 Inline Display Extension 2016-03-14 00:17:16 +01:00
Robin Gareus
58469214be prototype online self-automating LV2 plugin interface
goes along with https://github.com/x42/automate.lv2
2016-03-14 00:17:14 +01:00
Robin Gareus
f6fe87d63e prevent some mess when automating control ports on midi synths 2016-02-21 22:19:08 +01:00
Robin Gareus
31442cd63d work-around case where metric is NULL in split cycles.
This really needs to be fixed on a higher level.
e.g Pluin::connect_and_run() needs to be passed the current time identical to
PluginInsert::connect_and_run()
2016-02-16 18:17:13 +01:00
Robin Gareus
cbdae78511 try to catch https://github.com/rncbc/synthv1/issues/1#issuecomment-183041991
(n_samples = 64 but Ardour sends midi-buffer with an event at 960)

some guesses as to why:
 - split cycle for looping (nominal: 1024, cycle split:64)
 - plugin uses _session.transport_frame() directly :(
   (not latency compensated offset or looped position)
 - "offset" is not taken into account for midi buffers
 - tempo/metric change (metric iterator is wrong after loop)
2016-02-16 15:36:43 +01:00
Robin Gareus
1972cf966e Another attempt fixing crash at exit on windows. 2016-01-29 18:22:57 +01:00
Robin Gareus
d14e3ccc24 force LV2 plugin-state save for templates - #6709 2016-01-15 13:44:17 +01:00