You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c_dsp: body-only snippets + user C oscillators (install_c_osc / c_osc)
install_c_process/install_c_osc now accept just the function body -- the
signature and standard includes are wrapped on automatically, with #line
so tcc errors keep the user's own line numbers. Full programs still work
(detected by a process(/render( mention).
New oscillator kind: install_c_osc(name, src) compiles
void render(int16_t *buf, int frames, int osc, int phase_inc_q16, int amp_q15)
and c_osc(name, osc) makes that AMY osc play it -- dispatched from
amy_external_render_hook (registered on desktop run_amy), which derives the
Q16 phase step and Q15 envelope level from msynth so pitch bend and ADSR
just work; AMY still applies pan and mixing. State between calls = statics
in the body; per-osc state (polyphony) = static arrays indexed by the osc
param.
Ships tulip/fs/tulip/ex/c_dsp_demo.py: a body-form bitcrusher and a
CZ-101-style phase distortion oscillator, on osc 200 (low oscs belong to
midi.py's default synths, which silence raw events -- now documented).
Verified headless: a muting user osc zeroes the bus during a held note
(override proven on the live path), hot-swapping to the CZ body restores
full-scale audio, and the effect path still passes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments