Expand description
Aether Node Development Kit
Everything a third-party developer needs to build a DSP node:
use aether_ndk::prelude::*;
#[aether_node]
pub struct Tremolo {
#[param(name = "Rate", min = 0.1, max = 20.0, default = 4.0)]
rate: f32,
#[param(name = "Depth", min = 0.0, max = 1.0, default = 0.5)]
depth: f32,
phase: f32,
}
impl DspProcess for Tremolo {
fn process(
&mut self,
inputs: &NodeInputs,
output: &mut NodeOutput,
params: &mut ParamBlock,
sample_rate: f32,
) {
let input = inputs.get(0);
for (i, out) in output.iter_mut().enumerate() {
let rate = params.get(0).current;
let depth = params.get(1).current;
let lfo = 1.0 - depth * 0.5 * (1.0 - (self.phase * std::f32::consts::TAU).cos());
*out = input[i] * lfo;
self.phase = (self.phase + rate / sample_rate).fract();
params.tick_all();
}
}
}Modules§
- node
- Node registration and factory system.
- param
- Parameter utilities for node authors.
- prelude
- Prelude — import everything needed to write a node.
- registry
- Built-in node registry — pre-registers all aether-nodes types.
- schema
- JSON schema generation for registered nodes. Used by the CLI and manifest system.
Macros§
- register_
node - Register a node type into a
NodeRegistry.
Structs§
- Node
Adapter - Adapter that bridges
DspProcess→DspNodeso NDK nodes work transparently inside the AetherDSP engine. - Node
Inputs - Ergonomic wrapper around the raw input buffer array.
- Param
Block - A fixed-size block of parameters for a node. Sized to fit common DSP nodes without heap allocation.
- Param
Def - A parameter definition — name, range, and default value.
Generated statically by
#[aether_node]. - State
Blob - Opaque state blob — large enough for all built-in node types. Stored as raw bytes to avoid generics in the graph.
Constants§
- BUFFER_
SIZE - Audio buffer size in samples. Hard real-time constraint: 64 samples @ 48kHz = 1.33ms deadline.
- MAX_
INPUTS - Maximum number of inputs per node. Kept small to fit in cache lines.
Traits§
- Aether
Node Meta - Metadata trait auto-implemented by
#[aether_node]. - DspNode
- The core DSP processing trait. Implementations MUST be real-time safe:
- DspProcess
- The processing trait node authors implement.
Simpler than
DspNode— no raw pointer handling required.
Functions§
- into_
node - Convenience function: wrap any
DspProcess + AetherNodeMetainto a boxedDspNodeready for the graph.
Type Aliases§
- Node
Output - Ergonomic wrapper around the output buffer.