Expand description
Plugin setup types for declaring host information requirements.
See beamer_core::setup for documentation and examples.
Plugin setup types for declaring host information requirements.
Use these types with Descriptor::Setup to specify what
information your plugin needs from the host during preparation.
§Quick Reference
| Type | Value | Use Case |
|---|---|---|
() | - | Stateless plugins (gain, pan) |
SampleRate | f64 | Time-based DSP (delay, filter, envelope) |
MaxBufferSize | usize | FFT, lookahead buffers |
MainInputChannels | u32 | Per-channel input processing |
MainOutputChannels | u32 | Per-channel output state |
AuxInputCount | usize | Sidechain-aware processing |
AuxOutputCount | usize | Multi-bus output |
ProcessMode | enum | Quality settings for offline rendering |
§Combining Types
Request multiple values using tuples:
ⓘ
type Setup = (SampleRate, MaxBufferSize);
type Setup = (SampleRate, MainOutputChannels);
type Setup = (SampleRate, MaxBufferSize, ProcessMode);§Examples
ⓘ
use beamer::setup::*;
// Stateless plugin (gain, pan)
impl Descriptor for Gain {
type Setup = ();
fn prepare(self, _: ()) -> Self { self }
}
// Time-based DSP (delay, filter, envelope, smoothing)
impl Descriptor for Delay {
type Setup = SampleRate;
fn prepare(self, sample_rate: SampleRate) -> DelayProcessor {
let buffer_size = (2.0 * sample_rate.hz()) as usize;
DelayProcessor { buffer: vec![0.0; buffer_size], /* ... */ }
}
}
// FFT or lookahead processing
impl Descriptor for Fft {
type Setup = (SampleRate, MaxBufferSize);
fn prepare(self, (sr, mbs): (SampleRate, MaxBufferSize)) -> FftProcessor {
FftProcessor { fft_buffer: vec![0.0; mbs.0], /* ... */ }
}
}Structs§
- AuxInput
Count - Number of auxiliary input buses.
- AuxOutput
Count - Number of auxiliary output buses.
- Main
Input Channels - Number of channels on the main input bus.
- Main
Output Channels - Number of channels on the main output bus.
- MaxBuffer
Size - Maximum buffer size in samples.
- Sample
Rate - Sample rate in Hz.
Enums§
- Process
Mode - Processing mode (realtime vs offline).
Traits§
- Plugin
Setup - Trait for plugin setup requirements.