Robbert van der Helm
8a0e083168
Add a TODO and stub for parameter smoothing
2022-02-01 00:14:33 +01:00
Robbert van der Helm
5aec636f9f
Format boolean parameters as On/Off by default
2022-01-31 22:36:58 +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
54bcf52912
Add Default implementations for parameter types
2022-01-31 21:19:40 +01:00
Robbert van der Helm
6fc733e029
Add callbacks for parameter changes
2022-01-31 21:02:47 +01:00
Robbert van der Helm
44172da94f
Use Arcs for the callbacks
...
So it becomes possible to reuse one callback for multiple parameters.
This will be important for value change notifications.
2022-01-31 20:44:10 +01:00
Robbert van der Helm
c883e0000d
Move the PersistentField implementations
2022-01-31 20:41:46 +01:00
Robbert van der Helm
b65158283a
Support parking_lot mutexes and rwlocks
2022-01-31 19:42:35 +01:00
Robbert van der Helm
6494d1ed5f
Store persistent fields as plain JSON strings
...
On second thought, this is much better. The resulting file size will be
much smaller because only double quotes need to be escaped. It's also
easier to read at a glance.
2022-01-30 18:23:13 +01:00
Robbert van der Helm
f0ea9e9451
Fix broken rustdoc links
2022-01-30 17:17:34 +01:00
Robbert van der Helm
a4606f41cd
Add more TODOs for parameters and persistence
2022-01-30 17:16:12 +01:00
Robbert van der Helm
64cf04a77d
Add a todo about parking_lot
2022-01-30 17:10:42 +01:00
Robbert van der Helm
221e424f78
Use thread safe interior mutability for persist
...
Sadly there's not really a safe way to do this otherwise, but if you
really want to have persistence this way and absolutely need it to be
lock-free (because you're going to use it from the GUI thread), then you
can implement your own PersistentField.
2022-01-30 17:07:50 +01:00
Robbert van der Helm
8ac036f6cc
Add an API for persisting arbitrary fields
2022-01-30 16:14:52 +01:00
Robbert van der Helm
c286958c63
Swap around trait bound order
2022-01-30 13:15:42 +01:00
Robbert van der Helm
b76b6e4a9b
Add boolean parameters
2022-01-30 02:17:40 +01:00
Robbert van der Helm
dabd2beca8
Add functions for interacting with plain values
2022-01-29 14:59:59 +01:00
Robbert van der Helm
ebb74a737c
Use plain instead of unnormalized in the APIs
...
It takes more effort than what should be needed to tell normalized and
unnormalized apart at a glance.
2022-01-29 14:54:48 +01:00
Robbert van der Helm
ef021915e5
Move the PlainParam functions to a trait
...
We can use this for setting parameter values, as a &Param can be turned
into a pointer which can then later be mapped to a parameter ID to
handle outputting parameter values.
2022-01-29 13:39:01 +01:00
Robbert van der Helm
5697183918
Rename from_string to set_from_string
...
To make it a bit more obvious at a glance that this mutates the
parameter.
2022-01-29 13:32:31 +01:00
Robbert van der Helm
b14dc7eae9
Avoid duplicate units in VST3 parameter strings
2022-01-28 14:06:51 +01:00
Robbert van der Helm
b91a02baa6
Add a todo and idea for non-parameter persistence
2022-01-28 01:34:36 +01:00
Robbert van der Helm
91e20f1230
Don't internally use param string IDs in wrapper
...
This avoids a layer of indirection for every parameter lookup using a
hash.
2022-01-27 22:36:46 +01:00
Robbert van der Helm
9ff881b355
Add functions for previewing parameter conversions
2022-01-27 19:43:19 +01:00
Robbert van der Helm
ad94b44b93
Add lookup functions between strings and values
...
For parameters.
2022-01-27 00:15:11 +01:00
Robbert van der Helm
dfbfc657a8
Add a getter for parameter units from poitners
2022-01-26 23:37:41 +01:00
Robbert van der Helm
070e68c084
Move nih_plug to the repo's root
...
Makes more sense to have this be on the same level as the workspace
since technically this crate can be used separately.
2022-01-26 12:52:57 +01:00
Robbert van der Helm
736468a510
Move nih-plug to a workspace
2022-01-25 12:23:19 +01:00
Robbert van der Helm
2df0d7453d
Fix library name in copyright headers
2022-01-25 02:19:53 +01:00
Robbert van der Helm
e8697d9a74
Redo the parameters without atomics
...
These atomics make things more difficult and they don't solve the main
problem: storing the parameter objects in an easy to use struct while
still allowing hash based access to them from the plugin wrapper. Going
through this new Params trait makes a lot more sense, and with pinning
this should be safe.
2022-01-25 02:17:30 +01:00
Robbert van der Helm
4f501f539e
Implement the rest of the basic parameter UI
2022-01-24 21:12:02 +01:00
Robbert van der Helm
edf9e96975
Rename Normalize to NormalizebleRange
...
To hopefully make the use of trait a bit clearer. This is where higher
kinded types would have been nice.
2022-01-24 21:00:37 +01:00
Robbert van der Helm
64f7dc8148
Add some of the building blocks for param handling
2022-01-24 21:00:37 +01:00