Skip to main content

DeriveProcessorParams

Derive Macro DeriveProcessorParams 

Source
#[derive(DeriveProcessorParams)]
{
    // Attributes available to this derive:
    #[param]
}
Expand description

Derive macro for implementing ProcessorParams trait.

This macro automatically generates parameter metadata from struct fields annotated with #[param(...)] attributes.

ยงExample

use wavecraft_macros::ProcessorParams;

#[derive(ProcessorParams, Default)]
struct GainParams {
    #[param(range = "0.0..=2.0", default = 1.0, unit = "x")]
    level: f32,
}