DerGut/SonicFusion

๐ŸŽ›๏ธ DataFusion, but for sound.

โ˜… 0Forks 0RustGitHub โ†—Compare

README

SonicFusion

DataFusion, but for sound.

The preview binary can build a synth graph from a text file:

scripts/preview --graph examples/graphs/two-tone.sf --seconds 1

After the first build, run target/debug/preview --graph examples/graphs/two-tone.sf directly to try edits without invoking Cargo.

The graph language supports sine(frequency), square(frequency, pulse_width), lpf(cutoff), gain(factor), mix(inputs, weights), and out. -> passes the previous node to a filter or gain. A $name at the end of a statement saves its output for later statements; references must be defined before use. For example:

sine(440.0) -> $high;
sine(220.0) -> $low;
mix([$high, $low], [0.4, 0.6]) -> out

mix($high, $low) uses unit weights. gain($high, 0.5) is equivalent to $high -> gain(0.5). out applies the final frame limit from RenderConfig, which the preview command derives from --seconds.

Contributors

DerGut

Issues