Patch language with osc/noise/trig/seq/adsr/filter/delay/poly + voice templates and inline live values. Two runtimes: - code_sinth/ — Python engine (numpy + sounddevice). Hot-reload via mtime watcher. Offline render to WAV. Static-HTTP+WS visualizer (viz/) that injects waveforms next to each `node X = ...` line. - web/ — port of the engine to JS running in AudioWorklet. Single static page with CodeMirror 6 editor (line widgets for live waveforms) and a control surface on the right with knobs/faders/step_seq/piano_roll declared from the patch. State preserved across hot-reload. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 lines
530 B
Diff
13 lines
530 B
Diff
# Mismo arpegio pero con delay con feedback (ecos a tiempo de corchea).
|
|
# rate=8 -> step=125ms; delay 250ms = 2 steps; feedback 0.45 da ~3-4 ecos.
|
|
node clk = trig(period=0.125, duration=0.06)
|
|
node mel = seq(rate=8, steps=[220.0, 261.63, 329.63, 392.0, 523.25, 392.0, 329.63, 261.63])
|
|
|
|
node o1 = osc(saw, freq=mel)
|
|
node env = adsr(a=0.005, d=0.08, s=0.3, r=0.08, gate=clk)
|
|
node lp = filter(lp, in=o1, cutoff=300 + env*3000, q=3.0)
|
|
node dry = lp * env * 0.5
|
|
node wet = delay(in=dry, time=0.25, feedback=0.45, mix=0.5)
|
|
|
|
out <- wet
|