Module params

Module params 

Source
Expand description

Low-level parameter system for VST3 host communication.

This module provides the Parameters trait for direct VST3 host communication. It exposes the raw normalized value interface that VST3 expects.

§Choosing Between Params and Parameters

Beamer provides two parameter traits that work together:

  • Params (recommended): High-level trait with type-erased iteration, automatic state serialization, and support for parameter types like FloatParam, IntParam, and BoolParam. Use #[derive(Params)] for automatic implementation.

  • Parameters: Low-level trait for direct VST3 host communication. Provides raw access to normalized values and parameter metadata. Useful when you need fine-grained control over parameter handling or are building custom parameter systems.

For most plugins, use #[derive(Params)] which automatically implements both traits. The Params trait builds on top of Parameters to provide a more ergonomic API.

§Thread Safety

The Parameters trait requires Send + Sync because parameters may be accessed from multiple threads:

  • Audio thread: reads parameter values during processing
  • UI thread: displays and modifies parameter values
  • Host thread: automation playback and recording

Use atomic types (e.g., AtomicU64 with to_bits/from_bits) for lock-free access.

Structs§

NoParams
Empty parameter collection for plugins with no parameters.
ParamFlags
Flags controlling parameter behavior.
ParamInfo
Metadata describing a single parameter.
UnitInfo
Information about a parameter group (VST3 Unit).

Constants§

ROOT_UNIT_ID
Root unit ID constant (parameters with no group).

Traits§

Parameters
Trait for plugin parameter collections.
Units
Trait for querying VST3 unit hierarchy.

Type Aliases§

UnitId
VST3 Unit ID type.