1
0
Fork 0
Commit graph

25 commits

Author SHA1 Message Date
Robbert van der Helm
8239169aaf Add some pointers for getting started to the docs 2022-05-13 15:08:05 +02:00
Robbert van der Helm
06c5e4b04a Make parameter modulation stick after automation
This is how it's supposed to be implemented in CLAP.
2022-05-02 15:46:57 +02:00
Robbert van der Helm
ddbaffc0bb Add ParamMut method for setting modulation offset
This will be used in the CLAP wrapper to handle `CLAP_EVENT_PARAM_MOD`.
2022-05-01 19:03:04 +02:00
Robbert van der Helm
1d3ac1b2af Move param setting functions to new ParamMut trait
This makes things slightly less confusing because these functions should
never be called from user code.
2022-05-01 18:45:35 +02:00
Robbert van der Helm
a17c63bf71 Add parameter getters for unmodulated values
This is needed to be able to support modulation events in CLAP. There an
offset gets applied to the parameter's actual current value. That way
GUIs don't have to move around when parameters are being modulated and
save states cannot get influenced by modulation.
2022-05-01 18:30:30 +02:00
Robbert van der Helm
d6bdfd7391 Get rid of Default implementations for params
These don't make any sense anymore with the builder API.
2022-05-01 17:40:26 +02:00
Robbert van der Helm
cd628e80ee Store normalized values on the param structs
This will be necessary to implement CLAP modulation later.
2022-05-01 17:34:59 +02:00
Robbert van der Helm
54d2a4cd2c Hide param fields other than value and smoothed
Direct initialization was no longer recommended anyways since now you
need to keep the default value in sync. The next couple of commits will
add a normalized value field and two more fields to help with
modulation.
2022-05-01 17:08:08 +02:00
Robbert van der Helm
48d0f87e4c Mark param value getters as inline 2022-05-01 16:40:16 +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
3c69fb72cf Make parameter names owned
That way you can generate parameters with custom `Params`
implementations.
2022-04-11 23:27:36 +02:00
Robbert van der Helm
a1be942d6d Add flags to control parameter visibility
For the host and in generic UIs. These aren't wired up to anything yet.
2022-03-23 13:04:14 +01: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
40d99a5cb3 Automatically implement Param::set_normalized_value() 2022-03-21 13:28:59 +01:00
Robbert van der Helm
021d175264 Use a default implementation for Param::normalized_value() 2022-03-21 13:28:59 +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
95370667d7 Rearrange the Param methods 2022-03-19 16:09:31 +01:00
Robbert van der Helm
d9330628c0 Add stepping functions to Param
This can be useful for GUI widgets.
2022-03-19 16:06:20 +01:00
Robbert van der Helm
fb60f3a28b Remove unused Param::set_from_string
This method is a bit more efficient than converting the string to a
normalized value and then setting the parameter using that but it's not
used right now and it adds a form of redundancy.
2022-03-18 17:53:38 +01:00
Robbert van der Helm
1a7ad0a7a0 Trim whitespace and units when parsing parameters 2022-03-08 18:53:35 +01:00
Robbert van der Helm
c3767831cd Mention unit handing in value to string 2022-03-08 18:47:28 +01:00
Robbert van der Helm
329da782b5 Fix with_string_to_value() after param refactor 2022-03-07 21:00:39 +01:00
Robbert van der Helm
963696cbff Warn on invalid ranges with logarithmic smoothing 2022-03-06 12:27:52 +01:00
Robbert van der Helm
f581294d7b Update rustdoc formatting for links
Apparently it showed this text verbatim, and not in monospace.
2022-03-03 23:05:12 +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
Renamed from src/param/plain.rs (Browse further)