Expand description
Code related to the parameters of a processor.
A processor has a number of parameters that can be changed over time.
The parameters state is managed by Conformal, with changes ultimately coming from either the UI or the hosting application. The parameters form the “logical interface” of the processor.
Each parameter is one of the following types:
- Numeric: A numeric value that can vary within a range of possible values.
- Enum: An value that can take one of a discrete set of named values.
- Switch: A value that can be either on or off.
Note that future versions may add more types of parameters!
Components tell Conformal about which parameters exist in their crate::Component::parameter_infos
method.
Conformal will then provide the current state to the processor during processing,
either crate::synth::Synth::process
or crate::effect::Effect::process
.
Note that conformal may also change parameters outside of processing and call
the crate::synth::Synth::handle_events
or
crate::effect::Effect::handle_parameters
methods, Components can update any
internal state in these methods.
Macros§
- pzip
- Utility to get a per-sample iterator including the state of multiple parameters.
Structs§
- Constant
Buffer States - Simple implementation of
BufferStates
trait where every parameter is constant throughout the whole buffer. - Flags
- Metadata about a parameter.
- IdHash
- A numeric hash of a parameter’s ID.
- Info
- Owning version of
InfoRef
. - InfoRef
- Information about a parameter.
- Piecewise
Linear Curve - Represents a numeric value that changes over the course of the buffer.
- Piecewise
Linear Curve Point - Represents a single point of a piecewise linear curve.
- Ramped
States Map - A simple implementation of a
BufferStates
that allows for parameters to change between the start and end of a buffer. - States
Map - A simple implementation of
States
that is backed by aHashMap
. - Timed
Enum Values - Represents an enum value that changes over the course of a buffer.
- Timed
Switch Values - Represents a switched value that changes over the course of a buffer.
- Timed
Value - Represents a value at a specific point in time in a buffer.
Enums§
- Buffer
State - Represents the value of a parameter as it varies across a buffer.
- Enum
Buffer State - Represents the state of an enum value across a buffer
- Internal
Value - A value of a parameter used in performance-critical ocntexts.
- Numeric
Buffer State - Represents the state of a numeric value across a buffer
- Switch
Buffer State - Represents the state of an switched value across a buffer
- Type
Specific Info - Contains information specific to a certain type of parameter.
- Type
Specific Info Ref - Contains information specific to a certain type of parameter.
- Value
- A value of a parameter
Constants§
- UNIQUE_
ID_ INTERNAL_ PREFIX - Reserved unique id prefix for internal parameters. No component should have any parameters with unique ids that start with this prefix.
Traits§
- Buffer
States - Represents the state of several parameters across a buffer.
- States
- Represents a snapshot of all valid parameters at a given point in time.
Functions§
- enum_
per_ sample - Converts an
EnumBufferState
into a per-sample iterator. - hash_id
- Creates a hash from a unique ID.
- numeric_
per_ sample - Converts a
NumericBufferState
into a per-sample iterator. - override_
defaults - Helper function to get a map of param values based on the default values from a list of
Info
s. - override_
synth_ defaults - Helper function to get a map of synth param values based on the default values from a list of
Info
s. - switch_
per_ sample - Converts a
SwitchBufferState
into a per-sample iterator. - to_
infos - Converts a slice of
InfoRef
s to a vector ofInfo
s.
Type Aliases§
- Static
Info Ref InfoRef
of static data