Skip to main content

SignalChain

Macro SignalChain 

Source
macro_rules! SignalChain {
    ($single:ty) => { ... };
    ($first:ty, $($rest:ty),+ $(,)?) => { ... };
}
Expand description

Combines processors into a serial signal chain.

This is the recommended macro for building DSP chains in Wavecraft. Use SignalChain! for consistency with the wavecraft_plugin! DSL.

§Single Processor (Zero Overhead)

use wavecraft_dsp::builtins::GainDsp;
use wavecraft_dsp::SignalChain;

type Single = SignalChain![GainDsp]; // Compiles to just `GainDsp`, no wrapper

§Multiple Processors

use wavecraft_dsp::builtins::{GainDsp, PassthroughDsp};
use wavecraft_dsp::SignalChain;

type Multiple = SignalChain![GainDsp, PassthroughDsp];