1
0
Fork 0
Commit graph

53 commits

Author SHA1 Message Date
Robbert van der Helm 727d88c4d7 Add ID renaming superpowers to #[nested(...)]
This can now be used for most common use cases where you previously had
to do a manual `Params` implementation, like arrays of parameter objects
and duplicate parameter objects.
2022-10-13 01:28:05 +02:00
Simon Leiner 0caef90b1a Fix typos in comments 2022-09-29 15:13:43 +02:00
Simon Leiner f4995abf88 Fix typos in documentation 2022-09-29 15:13:43 +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 743d456e0f Don't build the gain example with zstd enabled 2022-08-18 19:46:51 +02:00
Robbert van der Helm 1bb1cde913 Add optional Zstandard compression for state
This can be particularly useful when using the persistent fields feature
to store JSON or other large textual documents.
2022-08-18 13:55:48 +02:00
Robbert van der Helm c412d3cca6 Remove debug print 2022-08-18 13:45:13 +02:00
Robbert van der Helm fdbff129f8 Use linear gain params in gain examples
Using the new skewed coefficient calculation function for gain ranges
from a couple commits ago.

Closes #18.
2022-07-24 21:21:13 +02:00
AmaiKinono 00fa9e9703 Fix typos in the gain example 2022-07-17 00:51:01 +08:00
Robbert van der Helm 7cd7294b22 Make CLAP descriptions and special URLs optional
This closes #14.
2022-07-04 12:46:34 +02:00
sonata-chen a284ba020f
fix typo 2022-06-28 19:42:46 +08: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 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 f4f54029eb Add a deactivation callback
This is the equivalent of initialize()
2022-05-24 13:05:06 +02:00
Robbert van der Helm 596b04af0a Add preliminary support for auxiliary IO
The missing parts are allocating buffers for these busses, copying data
to those buffers, and adding methods to the ProcessContext to interact
with these inputs and outputs.
2022-05-23 17:13:49 +02:00
Robbert van der Helm 9acd312768 Parmaeters are not real, they can't hurt you 2022-04-24 19:46:07 +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 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 f37974448d Change naming convention for formatters
This still isn't idea, but at least it's less ambiguous than it was
before this.
2022-03-27 03:43:39 +02:00
Robbert van der Helm 30b913e159 Don't use direct Param initialization in exmaples
Since you now also need to specify the default field you probably
shouldn't use this anymore.
2022-03-21 13:29:03 +01:00
Robbert van der Helm a844051054 Store defaults on Param objects
And add methods for querying them.
2022-03-21 12:49:59 +01:00
Robbert van der Helm 581e5911fc Add parameter groups with #[nested = "Group Name"] 2022-03-16 17:04:38 +01:00
Robbert van der Helm 48ff012cea Document sample accurate automation in the example 2022-03-10 20:19:03 +01: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 3c5aff1ec6 Rename Buffer::iter_mut() to iter_samples()
Since there's also an iter_blocks(). This is consistent with the new
Block method.
2022-03-09 20:11:37 +01:00
Robbert van der Helm fd8bd025c8 Implement the reset function everywhere 2022-03-08 00:44:10 +01:00
Robbert van der Helm d758dd652f Re-export all macros in the prelude
Now you don't need the `#[macro_use] extern crate nih_plug;` anymore
2022-03-04 12:01:47 +01:00
Robbert van der Helm 4c0b07c578 💥 Move re-exports to a prelude module
So you can import everything at once, because you're likely going to
need at least 90% of it anyways.
2022-03-03 23:23:51 +01:00
Robbert van der Helm 6c9db8fee8 Change sample iterator variable names in examples 2022-03-03 21:38:50 +01:00
Robbert van der Helm be4bbd4400 Allow nested parameter structs
See the Parameters docstring for the caveats.
2022-03-03 20:38:28 +01:00
Robbert van der Helm 76369ad1e1 💥 Rework FloatParam and IntParam
They are now two separate types with slightly different options. I had
these merged initially because they're 95% the same, and I thought it
would be fun to have weird distributions for integer parameters, but
that doesn't really work because hosts and the plugin APIs expect the
steps to be linear. And if you're going to have an unstepped integer
parameter, might as well use FloatParam with rounding.

Because non-linear ranges are no longer possible with IntParam, the
types have been split up to make everything much more readable instead
of adding a parameterizing the range type with another type family.
2022-03-03 19:24:40 +01:00
Robbert van der Helm a26ddbb45e Change CLAP_KEYWORDS to CLAP_FEATURES
This name was changed in CLAP 0.19, but in 0.18 it's still called
features.
2022-02-28 17:29:53 +01:00
Robbert van der Helm 1151a80769 Add the other CLAP metadata fields 2022-02-28 17:18:11 +01:00
Robbert van der Helm c7f1c46f18 Add a reverse DNS ID field to ClapPlugin 2022-02-28 17:04:47 +01:00
Robbert van der Helm 56c1545196 Add a basic nih_export_clap!() macro
This does not do anything useful yet.
2022-02-28 14:45:31 +01:00
Robbert van der Helm d5d90e3e61 Add a ClapPlugin trait
Just like the Vst3Plugin trait
2022-02-28 14:45:07 +01:00
Robbert van der Helm 3d8cfd7477 Use the step sizes 2022-02-13 16:43:11 +01:00
Robbert van der Helm adf59c192b Add a step size for float parameters 2022-02-13 16:41:31 +01:00
Robbert van der Helm d6b358f8ca Don't require importing Param for derive macro 2022-02-12 19:55:39 +01:00
Robbert van der Helm bc11c97fcf Use the new builder interface 2022-02-12 17:19:52 +01:00
Robbert van der Helm 342aebee89 Add a plugin skeleton for a Diopser port 2022-02-12 16:29:23 +01:00
Robbert van der Helm f645b6a92f Relicense under the ISC license 2022-02-12 16:04:46 +01:00
Robbert van der Helm 0514d2de96 Increase the gain smoothing time 2022-02-06 02:36:31 +01:00
Robbert van der Helm 53f802b295 Fix accidental gain smoothing style change 2022-02-06 02:08:58 +01:00
Robbert van der Helm b075d1b1bb Modify the editor API to use trait objects
The alternative isn't really feasible without specialization, and
NIH-plug should work on the stable compiler.
2022-02-05 17:12:03 +01:00
Robbert van der Helm 7ac1df0d8d Add stubs for editor handling 2022-02-05 12:46:26 +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