initial: code-sinth — DSL-driven modular synth (Python engine + web app)
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>
This commit is contained in:
25
examples/pad_delay.patch
Normal file
25
examples/pad_delay.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
# Pad polifonico + delay sincronizado al rate (250ms = una nota).
|
||||
voice pad {
|
||||
node o1 = osc(saw, freq=freq)
|
||||
node o2 = osc(saw, freq=freq * 1.005)
|
||||
node sum = (o1 + o2) * 0.5
|
||||
node env = adsr(a=0.06, d=0.3, s=0.5, r=1.2, gate=gate)
|
||||
node lp = filter(lp, in=sum, cutoff=400 + env*1500, q=1.2)
|
||||
out <- lp * env
|
||||
}
|
||||
|
||||
node p = poly(
|
||||
voice=pad, voices=8,
|
||||
rate=4, gate_duration=0.6,
|
||||
notes=[
|
||||
261.63, 329.63, 392.00, 523.25,
|
||||
220.00, 261.63, 329.63, 440.00,
|
||||
174.61, 220.00, 261.63, 349.23,
|
||||
196.00, 246.94, 293.66, 392.00
|
||||
]
|
||||
)
|
||||
|
||||
node dry = p * 0.18
|
||||
node wet = delay(in=dry, time=0.375, feedback=0.35, mix=0.35)
|
||||
|
||||
out <- wet
|
||||
Reference in New Issue
Block a user