Robbert van der Helm
b901dac012
Disambiguate rustdoc link references
2022-02-05 12:56:03 +01:00
Robbert van der Helm
bbc190c67f
Hold the RwLock guard in the process context
...
This avoids having to constantly acquire a new lock.
2022-02-04 23:03:11 +01:00
Robbert van der Helm
ce3da8ea44
Use a dedicated struct for the process context
2022-02-04 22:55:10 +01:00
Robbert van der Helm
209c19b74f
Get rid of lifetime parameters for VST3 wrapper
...
This lifetime didn't make any sense anyways since these buffers don't
adhere to Rust's lifetime rules. Getting rid of these will let us make
nicer wrappers around the process context.
2022-02-04 22:54:28 +01:00
Robbert van der Helm
fdfd1b01c2
Add a function for retrieving the next note event
2022-02-04 15:17:42 +01:00
Robbert van der Helm
0e67c61be0
Store timing along with the note events
2022-02-04 15:17:42 +01:00
Robbert van der Helm
02cf16e9c0
Accept incoming note events
2022-02-04 15:17:42 +01:00
Robbert van der Helm
51dace591d
Add an event bus depending on ACCEPTS_MIDI
2022-02-04 15:17:42 +01:00
Robbert van der Helm
fc96bb4349
Fix channel map debug assertion
2022-02-03 17:03:33 +01:00
Robbert van der Helm
dfedd7b2c4
Enable assert_no_alloc in debug builds
2022-02-03 15:58:00 +01:00
Robbert van der Helm
0ecec104fb
Completely reset smoothing on init or restore
2022-02-02 21:41:20 +01:00
Robbert van der Helm
1336139a65
Update smoothers on init and state restore
...
Otherwise this would be filled with default values.
2022-02-02 21:33:20 +01:00
Robbert van der Helm
8f89754ba5
Add simple linear parameter smoothing
2022-02-02 21:26:13 +01:00
Robbert van der Helm
fced4001c0
Access plain values using the method
...
Since we're also setting them using the method.
2022-02-02 20:39:04 +01:00
Robbert van der Helm
a42649b2de
Derive a Default instance for the Buffer
...
To make Clippy happy.
2022-02-02 20:37:06 +01:00
Robbert van der Helm
13369e4085
Reinitialize the plugin after restoring state
...
This lets you use the parameters to set fields on the plugin struct
during `initialize()`.
2022-02-02 15:39:55 +01:00
Robbert van der Helm
c982ad9599
Avoid duplicate state restores
2022-02-02 15:32:21 +01:00
Robbert van der Helm
c8cc6bd26b
Re-export all user facing includes
2022-02-02 15:16:10 +01:00
Robbert van der Helm
f44597df7c
Move the buffer adapter to its own module
2022-02-02 15:01:41 +01:00
Robbert van der Helm
048d69213e
Make the buffer own the output slices
...
This gets rid of a lot of lifetime casting and other unsoundness.
2022-02-02 14:41:35 +01:00
Robbert van der Helm
58736f5cc8
Add a super unsafe channel buffer adapter
...
To avoid having to perform lifetime magic here, this buffer needs to own
the slices and be stored as part of the RwLock.
2022-02-02 13:02:28 +01:00
Robbert van der Helm
7752ce6771
Add symmetrically and asymmetrically skewed ranges
...
This is super useful. I'm sure the symmetrical implementation can be
optimized a lot, but my math-fu was not strong enough today.
2022-02-01 23:37:28 +01:00
Robbert van der Helm
4aa85b43b4
Move parameter implementation details to a module
2022-02-01 21:01:28 +01:00
Robbert van der Helm
6bb83061dd
Rename the params module to param
...
It's a heterogeneous module, and splitting the ranges to their own
module will be a bit weird otherwise.
2022-02-01 20:51:22 +01:00
Robbert van der Helm
473447179f
Handle idempotent latency changes
2022-02-01 17:17:10 +01:00
Robbert van der Helm
e2e2c59d34
Pass the process context to the plugin
2022-02-01 17:09:23 +01:00
Robbert van der Helm
3a1fbed4c3
Mark MainThreadExecutor::execute as unsafe
...
This should only be called from the main thread. Otherwise the API's
threading guarantees will not be upheld.
2022-02-01 17:01:05 +01:00
Robbert van der Helm
459175b470
Call the component handler for restarts
2022-02-01 16:59:11 +01:00
Robbert van der Helm
223d0c3a90
Take a reference to the component handler
2022-02-01 16:52:55 +01:00
Robbert van der Helm
d47aac25a1
Rearrange WrapperInner parameters
2022-02-01 16:40:51 +01:00
Robbert van der Helm
565d9259c3
Use weak references to the executor
...
So this cyclic reference can't keep it alive.
2022-02-01 15:31:16 +01:00
Robbert van der Helm
f009384c2f
Don't require Arcs for ProcessContext
...
It makes more sense to pass this as a reference, so the plugin cannot do
weird things with it.
2022-01-31 23:47:54 +01:00
Robbert van der Helm
22995df7ea
Actually only calculate hashes once
2022-01-31 22:42:36 +01:00
Robbert van der Helm
0aad790fd7
Fix deserializing boolean parameters
2022-01-31 22:32:20 +01:00
Robbert van der Helm
85db4d82df
Fix param_id_to_hash name
...
These were swapped for some reason.
2022-01-31 22:24:07 +01:00
Robbert van der Helm
880ee92a47
Drop param_id_to_hash
...
As it turns out, it's redundant (and also had the opposite name).
2022-01-31 22:23:29 +01:00
Robbert van der Helm
fe8f1d27d6
Use a stable ordering for the parameters
...
As the fields are specified on the parameters struct.
2022-01-31 22:20:09 +01:00
Robbert van der Helm
4734a51440
Move wrapper data to an inner struct
...
This fixes the soundness issue with the use of Arc. Moving a `Box` to an
`Arc` frees the old boxed data, and the internal reference counting
would also try to free that. As an added benefit, we no longer need the
unsafe Send+Sync implementation for the event loop.
2022-01-31 20:18:12 +01:00
Robbert van der Helm
6c518fad9d
Add stubs for using the event loop in VST3 wrapper
2022-01-31 19:47:16 +01:00
Robbert van der Helm
4495064558
Redesign the wrapper's interiors for thread safety
...
There are a lot of locks needed now here, but none of them should be
contended. This is much better than potentially having RefCell's blow up
due to simultaneous mutable borrows, and the Arc is needed for the event
loop.
2022-01-31 19:44:02 +01:00
Robbert van der Helm
1a2c90fdfd
Set the VST3 parameter step counts
2022-01-31 13:33:30 +01:00
Robbert van der Helm
486fc67a4b
Serialize persistent fields for VST3 plugins
2022-01-30 17:09:18 +01:00
Robbert van der Helm
b76b6e4a9b
Add boolean parameters
2022-01-30 02:17:40 +01:00
Robbert van der Helm
7feb8006ef
Persist the bypass parameter
2022-01-30 02:04:35 +01:00
Robbert van der Helm
16238f1e00
Support VST3 parameter flushes
2022-01-30 01:50:22 +01:00
Robbert van der Helm
6ddae6a506
Handle the output channel map
...
I apparently committed this a bit too early.
2022-01-30 01:43:40 +01:00
Robbert van der Helm
0c24398234
Target vst3-sys fork with better pointer semantics
2022-01-30 01:37:10 +01:00
Robbert van der Helm
902c3b2bf6
Upgrade vst3-sys dependency
2022-01-29 20:54:52 +01:00
Robbert van der Helm
3019f7aea6
Add a way to create VST3 bundles after building
2022-01-29 18:38:09 +01:00
Robbert van der Helm
47d102f2ba
Implement restoring parameter values
2022-01-29 16:42:20 +01:00