Module parameters

Source
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§

ConstantBufferStates
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.
PiecewiseLinearCurve
Represents a numeric value that changes over the course of the buffer.
PiecewiseLinearCurvePoint
Represents a single point of a piecewise linear curve.
RampedStatesMap
A simple implementation of a BufferStates that allows for parameters to change between the start and end of a buffer.
StatesMap
A simple implementation of States that is backed by a HashMap.
TimedEnumValues
Represents an enum value that changes over the course of a buffer.
TimedSwitchValues
Represents a switched value that changes over the course of a buffer.
TimedValue
Represents a value at a specific point in time in a buffer.

Enums§

BufferState
Represents the value of a parameter as it varies across a buffer.
EnumBufferState
Represents the state of an enum value across a buffer
InternalValue
A value of a parameter used in performance-critical ocntexts.
NumericBufferState
Represents the state of a numeric value across a buffer
SwitchBufferState
Represents the state of an switched value across a buffer
TypeSpecificInfo
Contains information specific to a certain type of parameter.
TypeSpecificInfoRef
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§

BufferStates
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 Infos.
override_synth_defaults
Helper function to get a map of synth param values based on the default values from a list of Infos.
switch_per_sample
Converts a SwitchBufferState into a per-sample iterator.
to_infos
Converts a slice of InfoRefs to a vector of Infos.

Type Aliases§

StaticInfoRef
InfoRef of static data