1
0
Fork 0
Commit graph

16 commits

Author SHA1 Message Date
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)