1
0
Fork 0
Commit graph

511 commits

Author SHA1 Message Date
Robbert van der Helm
b7849f9a7a Add a NoteEvent::MidiSysEx variant
Right now this isn't used, and there is not yet any way to convert to
and from raw SysEx data.
2023-01-31 18:32:16 +01:00
Robbert van der Helm
683c96bca0 Avoid duplicate parameter callbacks and smoothing
REAPER seems to spam value set events when an automation lane is active,
and it also always sends CLAP automation events twice.
2023-01-31 16:31:29 +01:00
Robbert van der Helm
161c97bb28 Add the CLAP note detector feature 2023-01-28 23:23:56 +01:00
Robbert van der Helm
1e90f55019 Add a todo for invalid CLAP event parsing
Currently these values are never -1, but they can be.
2023-01-16 23:59:10 +01:00
Robbert van der Helm
bb521fcb82 Upgrade Vizia for the cosmic-text changes
This brings some breaking changes, and vertical positioning of text may
have changed slightly.
2023-01-12 19:03:02 +01:00
Robbert van der Helm
e5a26ac199 Send individual parameter changes for VST3 plugins 2023-01-11 16:59:21 +01:00
Robbert van der Helm
adb49cb6d1 Simplify VST3 wrapper creation 2023-01-11 16:51:21 +01:00
Robbert van der Helm
d3d34b59ac Send individual parameter changes for standalones 2023-01-11 16:51:21 +01:00
Robbert van der Helm
048cfd73b5 Add a TODO for merging hashmaps 2023-01-11 15:22:26 +01:00
Robbert van der Helm
951a0739d7 Send individual parameter changes for CLAP plugins 2023-01-11 15:22:26 +01:00
Robbert van der Helm
5c9be077e7 Allow BackgroundThread sharing between instances
This removes the need for every instance to have its own background
thread.
2023-01-06 17:51:38 +01:00
Robbert van der Helm
dfeb8164ca Fix new Clippy lints 2023-01-06 16:13:01 +01:00
Robbert van der Helm
cb827d18dd Rename Buffer::len() to Buffer::samples()
To reduce ambiguity.
2023-01-05 16:04:38 +01:00
Robbert van der Helm
9e1a888b38 Store sample count in Buffer
This fixes the sample count not being correct for MIDI-only plugins.
2023-01-05 15:58:55 +01:00
Robbert van der Helm
19be530ba3 Rename Buffer::with_raw_vec to set_slices 2023-01-05 15:36:04 +01:00
Robbert van der Helm
069053ca50 Also defer latency change for CLAP plugins
In case a future host does the same thing Ardour does right now for VST3
plugins.
2022-12-28 01:34:42 +01:00
Robbert van der Helm
5cbef6ec03 Fix alloc failures in VST3 with many events
Or well, work around. We should use a different non-allocating sorting
implementation here. This only crept up in Ardour because they for some
reason send all parameter values after loading a VST3 plugin.
2022-12-28 01:30:26 +01:00
Robbert van der Helm
fd28a95231 Defer set_latency_samples() in VST3 plugin init
The host might otherwise restart the plugin while the `Plugin::init()`
call is still active, resulting in a deadlock because the plugin mutex
is still locked. This was causing issues when loading state in Ardour7.
The new approach also removes the need for a previous hack added for
Ardour6.
2022-12-28 01:28:33 +01:00
Robbert van der Helm
2747714640 Silence warning for standalone config on macOS 2022-12-02 19:42:51 +01:00
Robbert van der Helm
ec34e54bfe Update dependencies, allow resizing on Win/macOS
This was implemented for Linux in March, but it should now also work on
Windows and macOS.
2022-12-01 20:21:56 +01:00
Robbert van der Helm
50fa1008c0 Allow assert_process_allocs+mingw-w64 in release
This causes the application to halt in debug builds, but it shouldn't be
an issue in release builds.
2022-12-01 20:18:30 +01:00
Robbert van der Helm
9a77bd2918 Remove old comment 2022-11-22 21:29:06 +01:00
Robbert van der Helm
d9284ef0b7 Add debug assertion for custom feature namespaces 2022-11-22 21:19:17 +01:00
Robbert van der Helm
7c732e594c Document that custom features must be namespaced 2022-11-22 21:09:35 +01:00
Robbert van der Helm
b93cd08dfa Default cpal backend to 48 kHz sample rate
This is probably a safer default for most regular computers.
2022-11-11 03:15:05 +01:00
Robbert van der Helm
b2da26ecd7 Add prefix to plain_value() and normalized_value()
To make it clearer that these functions include monophonic modulation.
When creating GUI widgets, you should be using the unmodulated variants.
2022-11-11 03:15:05 +01:00
Robbert van der Helm
e8002730a0 Fix clippy lints 2022-11-05 14:19:47 +01:00
Robbert van der Helm
6eccabb701 Allow basic CLAP MIDI msgs with MidiConfig::Basic
This is needed for Qtractor compatibility. Even though it always sends
notes as CLAP events, it requires the plugin to support both the CLAP
and the MIDI note event dialects. Otherwise it won't send any notes at
all. Feature, not a bug.
2022-11-05 14:19:47 +01:00
Robbert van der Helm
fc9e521a85 Fix potential VST3 parking_lot allocation failure
This can happen when the process function is called from a new thread or
when a new thread has been spawned.
2022-11-04 15:00:45 +01:00
Robbert van der Helm
456655b269 Use the clap_plugin::plugin_data field
Instead of relying on the struct layout and doing raw pointer casts. We
still need to do this for the CLAP plugin factory though.
2022-10-30 14:18:18 +01:00
Robbert van der Helm
36bf46f569 Fix setProcessing() in Ardour when setting latency 2022-10-25 17:47:36 +02:00
Robbert van der Helm
8b47f90dd7 Fix setActive() in Ardour when setting latency 2022-10-25 17:38:51 +02:00
Robbert van der Helm
0dd3bfe4e7 Allow running tasks on a dedicated thread
Independent of the GUI thread, which is also still an option. This is
useful for long running IO jobs that might otherwise block the GUI for
long enough to be noticeable.
2022-10-23 16:23:20 +02:00
Robbert van der Helm
028aeed18e Add a schedule_background() EventLoop method 2022-10-23 16:19:49 +02:00
Robbert van der Helm
31cda78201 Rename do_maybe_async() to schedule_gui() 2022-10-23 15:48:27 +02:00
Robbert van der Helm
4524719128 Add an is_gui_thread flag to MainThreadExecutor
We'll also use the EventLoop for running background tasks completely
decoupled from the GUI.
2022-10-23 15:48:27 +02:00
Robbert van der Helm
967426453a Clean up EventLoop API
By taking an `Arc<T>` instead of a `Weak<T>`. The `Weak` is only needed
for the background threads.
2022-10-23 15:48:27 +02:00
Robbert van der Helm
21bfb57023 Rename execute_async() to execute_gui()
We'll have another function that uses a dedicated background thread.
2022-10-23 13:58:33 +02:00
Robbert van der Helm
c980576102 Add an AsyncExecutor for editor GUIs
This is decoupled form `GuiContext` as that would require invasive
changes all over the place.
2022-10-22 15:05:39 +02:00
Robbert van der Helm
b676353589 Split the nih_plug::context module
So that structs are more logically grouped with their traits.
2022-10-22 14:19:10 +02:00
Robbert van der Helm
faa9742eee Rearrange the wrapper context modules
This matches the order in `src/context.rs`.
2022-10-22 14:15:49 +02:00
Robbert van der Helm
b1f24bfad9 Reorder Context methods 2022-10-22 13:13:08 +02:00
Robbert van der Helm
5a974219b8 Remove Sync bound from TaskExecutor 2022-10-22 12:31:54 +02:00
Robbert van der Helm
5ea2377c18 Replace AsyncExecutor with simple closure
This makes everything much simpler. The task type is now defined
directly on `Plugin`.
2022-10-22 02:01:03 +02:00
Robbert van der Helm
84f834abb6 Add AsyncExecutor support to ProcessContext 2022-10-22 02:01:03 +02:00
Robbert van der Helm
6ffa23971e Add AsyncExecutor support to InitContext 2022-10-22 00:21:08 +02:00
Robbert van der Helm
6ee3aafa91 Move Editor and ParentWindowHandle to a new module 2022-10-21 23:12:05 +02:00
Robbert van der Helm
46094e5249 Explicitly drop Arc::from_raw 2022-10-20 16:28:58 +02:00
Robbert van der Helm
f9bdaffc62 Don't require Sync for Plugin
In hindsight there's really no reason to, because process() requires
exclusive access and the other functions won't be called during
processing.
2022-10-20 16:12:50 +02:00
Robbert van der Helm
375262aaa3 Also drop Sync requirement for editor handles 2022-10-20 14:41:53 +02:00