Skip to content

audiograph: a C graph runner over the existing kernels (MicroPython only) - #297

Merged
bdbarnett merged 2 commits into
mainfrom
feat/audiograph
Oct 21, 2026
Merged

bdbarnett merged 2 commits into
mainfrom
feat/audiograph

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

One audiograph.Graph renders a whole patch per block: nodes over the oscillator, ladder, float biquad and feedback delay kernels, plus an ADSR, a triangle LFO, white noise, a mixer with ramped gains, a VCA and the output stage, wired through the graph's own int16 block buffers, each node in a group a run can mask out. Nothing in Python runs between the nodes, which is what lets a six-voice polysynth built from these kernels play in real time on an ESP32-P4.

No existing node file changes. New: src/shared/audiodsp_graph.{h,c} (runtime-neutral), src/audiograph/ (the MicroPython binding), docs/audiograph.md, tests/parity/graph_probe.py with three planted faults that clean-build.yml runs first, a README section and a roadmap line for the CPython and CircuitPython bindings.

Measured on the ESP32-P4 DEV-KIT at a 128-frame block: the vrack Poly106 as a graph holds four voices at real-time factor 1.3 and six at 0.95, where the same patch run node by node from Python held none.

…ython only)

One Graph object owns the block buffers and a list of nodes; run() renders
every enabled node in order and writes the OUT node into a caller's
buffer. The kernels are the oscillator, ladder, float biquad and feedback
delay as they stand, plus small new nodes a voice needs: an ADSR (vrack's
EnvelopeCore per sample), a triangle LFO, white noise, a mixer with ramped
gains, a VCA and a constant. No existing node file changes.
…nly)

One audiograph.Graph renders a whole patch per block: nodes over the
oscillator, ladder, float biquad and feedback delay kernels, plus an ADSR,
a triangle LFO, white noise, a mixer with ramped gains, a VCA and the
output stage, wired through the graph's own int16 block buffers, each
node in a group a run can mask out. Nothing in Python runs between the
nodes, which is what lets a six-voice polysynth built from these kernels
play in real time on an ESP32-P4 (the vrack Poly106: four voices held at
factor 1.3 where the rack held none).

tests/parity/graph_probe.py holds the runner to its wiring, its nodes,
its groups, the mixer ramp and the output node, and each of its planted
faults (a mixer added before the node it reads, a filter left out of the
chain, a cutoff sent to a node no output reads) fails; clean-build.yml
runs the faults first. docs/audiograph.md is the user's page. The CPython
and CircuitPython bindings are on the roadmap.
@bdbarnett
bdbarnett merged commit 7c34d45 into main Oct 21, 2026
57 of 58 checks passed
@bdbarnett
bdbarnett deleted the feat/audiograph branch October 21, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant