Robbert van der Helm
c8ed795524
Add a SysExMessage type to Plugin
...
This is needed to enable sending and receiving SysEx #54 . Because
associated type defaults still are not stable, this requires every
plugin that doesn't need this to set this to the unit type:
```rust
type SysExMessage = ();
```
2023-01-31 18:18:41 +01:00
Robbert van der Helm
a7e425581f
Use CARGO_PKG_VERSION for plugin versions
...
Instead of duplicating this. Means that plugin versions only need to be
updated in the Cargo.toml file.
2022-11-11 03:15:05 +01: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
297ad2a83e
Add an AsyncExecutor associated type to Plugin
...
This will make it possible to run background tasks in a type safe way.
Sadly, this does mean that every plugin now needs to define the type
alias and constructor function since Rust does not yet support defaults
for associated types.
2022-10-21 23:52:46 +02:00
Robbert van der Helm
1a706ea1c7
Rename DEFAULT_NUM_INPUTS and DEFAULT_NUM_OUTPUTS
2022-08-19 14:34:21 +02:00
Robbert van der Helm
7cd7294b22
Make CLAP descriptions and special URLs optional
...
This closes #14 .
2022-07-04 12:46:34 +02:00
Robbert van der Helm
bfc472e49b
Introduce a new enum for CLAP features
...
Based on the new CLAP 0.26 clap-features.h.
2022-06-02 01:16:30 +02:00
Robbert van der Helm
6996fdaed1
Update features names for CLAP 0.26
2022-06-02 00:52:13 +02:00
Robbert van der Helm
ee900f74c2
Support auxiliary inputs and outputs for CLAP
...
This does not yet work for VST3. You'll always get empty slices there.
2022-05-27 02:30:57 +02:00
Robbert van der Helm
b2e6bd5515
Create a separate InitContext
...
Only a couple of these functions would be needed during initialization.
In the next couple commits ProcessContext will get a way to access
auxiliary IO, so this really had to be separated.
2022-05-27 01:17:15 +02:00
Robbert van der Helm
535ae1260e
Remove now unnecessary explicit dyn casts
...
Rust-analyzer used to not infer this, seems like now it does.
2022-05-24 23:55:48 +02:00
Robbert van der Helm
0459405ced
Remove STFT example readme
...
This hasn't been using fftw for a while now so it's no longer relevant.
2022-05-20 03:23:57 +02:00
Robbert van der Helm
c5841cbe33
Add missing latency compensation in STFT example
...
The latency introduced by the linear phase filter wasn't compensated
for.
2022-05-08 03:14:56 +02:00
Robbert van der Helm
6400e2d71d
Fix gain compensation in new STFT example
2022-05-08 02:25:44 +02:00
Robbert van der Helm
3fe24e7dc6
Use more typical convolution FFT in STFT example
2022-05-08 02:22:36 +02:00
Robbert van der Helm
55eeb689dd
Add a padding option to StftHelper
2022-05-08 02:12:37 +02:00
Robbert van der Helm
58d7dc034c
Fix gain compensation in STFT examples
2022-04-28 17:24:35 +02:00
Robbert van der Helm
e35886c216
Move window function handling out of StftHelper
...
And apply the window function only once at the end of the process
function for the plugins that used it.
2022-04-28 17:20:39 +02:00
Robbert van der Helm
cab0af5153
Add explicit dyn trait casts
...
So Rust Analyzer stops complaining.
2022-04-15 19:31:38 +02:00
Robbert van der Helm
eb5b81fcac
Remove MidiInput::None from nontrivial examples
...
Since it's the default, makes the examples a bit shorter.
2022-04-11 18:02:55 +02:00
Robbert van der Helm
1141616466
Replace ACCEPTS_MIDI bool with new enum
...
So we can gate future MIDI CC support behind an additional option since
this involves more work on the VST3 side.
2022-04-07 20:27:37 +02:00
Robbert van der Helm
083885a40c
Rework Params trait API with Arc instead of Pin
...
This is a breaking change requiring a small change to plugin
implementations.
The reason why `Pin<&dyn Params>` was used was more as a hint to
indicate that the object must last for the plugin's lifetime, but `Pin`
doesn't enforce that. It also makes the APIs a lot more awkward.
Requiring the use of `Arc` fixes the following problems:
- When storing the params object in the wrapper, the `ParamPtr`s are
guaranteed to be stable.
- This makes it possible to access the `Params` object without acquiring
a lock on the plugin, this is very important for implementing
plugin-side preset management.
- It enforces immutability on the `Params` object.
- And of course the API is much nicer without a bunch of unsafe code to
work around Pin's limitations.
2022-04-07 15:31:46 +02:00
Robbert van der Helm
b4ff09ca33
Get rid of unnecessary RustFFT scratch buffer
2022-03-28 17:45:46 +02:00
Robbert van der Helm
80c3fb8d51
Swap fftw in the stft example out for realfft
...
The FFTW bindings can't statically link on Windows.
2022-03-28 17:13:23 +02:00
Robbert van der Helm
36d54edae7
Add a constant for sample accurate automation
2022-03-10 18:57:17 +01:00
Robbert van der Helm
bda8ecfb23
Add a biquad for low- and high-pass filters
2022-03-09 13:24:57 +01:00
Robbert van der Helm
be39e19365
Allow FFTW to destroy input arrays
...
Since they're scratch buffers anyways.
2022-03-08 13:50:45 +01:00
Robbert van der Helm
fd8bd025c8
Implement the reset function everywhere
2022-03-08 00:44:10 +01:00
Robbert van der Helm
115d03a34a
Make the window size for configurable
2022-03-07 21:19:38 +01:00
Robbert van der Helm
376c1d7b0a
Fix gain compensation in STFT example
2022-03-07 02:04:47 +01:00
Robbert van der Helm
b06e67bde7
Supper non-buffer and non-sidechain inputs in STFT
2022-03-06 22:26:37 +01:00
Robbert van der Helm
e61a42e96f
Revert windowing change from 93ab08e
...
This is actually needed to prevent spectral leakage from IDTFs with
small window sizes.
2022-03-06 19:17:42 +01:00
Robbert van der Helm
93ab08e5d5
Remove post-IDFT windowing in STFT helper
...
There's no reason to.
2022-03-06 19:08:04 +01:00
Robbert van der Helm
175030b77c
Fix STFT example filter normalization
2022-03-06 18:56:07 +01:00
Robbert van der Helm
0f78b02685
Add a simple filter example with FFTW
2022-03-06 17:54:23 +01:00
Robbert van der Helm
601ced9363
Add a license note on the STFT example
2022-03-06 16:14:04 +01:00
Robbert van der Helm
d7ea21f597
Fix clippy lints
2022-03-06 15:41:35 +01:00
Robbert van der Helm
2343485c1c
Don't do gain compensation in STFT helper
...
You'll likely want to add some scaling yourself anyways, so this would
just be a wasted operation since the scaling also depends on your window
function.
2022-03-06 15:36:24 +01:00
Robbert van der Helm
e72203f919
Use the new overlap-add helper in the STFT example
...
Still without any proper FFT stuff.
2022-03-06 15:28:53 +01:00
Robbert van der Helm
592a908132
Fix samples until next window calculation
2022-03-06 15:11:42 +01:00
Robbert van der Helm
3c62670164
Add proper overlap-add to the StftHelper
...
Doesn't make much sense without it.
2022-03-06 14:33:30 +01:00
Robbert van der Helm
b416d1630b
Add the basis for a simple STFT example
...
Right now it doesn't do any FFT operations yet, but all the pieces are
in place using the new STFT helper.
2022-03-06 02:07:53 +01:00