Godstrument/strudel/godstrument.md
monsterrobotparty a039ee7d7c Add dark/yang data, concept groups, named templates, editing console, Strudel kit
- world_debt.py + world_econ.py: US national debt + inflation (the dark half)
- concept groups: "the shadow" / "the bright" — group sources by feeling
- named templates: hub save_patch/load_patch + console TEMPLATES panel
- editing console: runtime add/remove/set route + make_group; drag-to-patch,
  shift-click inspector, cmd-select grouping in the viz
- planetary orbital LFOs per group; almanac + ephemeris workers
- Web MIDI (out + learn) in the console; strudel/godstrument.md starter kit

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 02:25:19 +10:00

3.4 KiB

Godstrument → Strudel (and any MIDI synth)

The destinations aren't sound on their own — they're control signals looking for a voice. The ⚙ panel's Web MIDI out already streams every destination to a MIDI port as CC (and lead.note/bass.note as notes). So any synth that speaks MIDI becomes an output that "receives sources": a hardware synth, a software instrument, Ableton — or Strudel, which reads MIDI natively and is free/open/self-hostable (fits the whole ethos).

Setup (Strudel as the sound engine, no Ableton)

  1. In config.json set "midi": { "enabled": true } (or just use the browser Web MIDI out from the ⚙ panel — either sends the same CCs).
  2. On macOS, open Audio MIDI Setup → MIDI Studio, double-click IAC Driver, tick Device is online. That's your virtual cable.
  3. In the ⚙ panel: enable MIDI, pick the IAC bus as out.
  4. Open strudel.cc (or your self-hosted Strudel), allow MIDI, set its input to the IAC bus, and paste the pattern below.

The CC map (from config.jsonmidi.map)

destination CC driven by (in the starter patch)
filter.cutoff 74 the sun / your hand
pad.brightness 71 daylight, harmony, almanac fertility
wavetable.morph 70 your hand / Mars / almanac element
delay.feedback 93 your hand Y / Mercury retrograde
reverb.size 91 room light / quakes
saturation 75 Delhi's air / debt churn
granular.density 76 Wikipedia edit rate
perc.density 77 your dealgod market / crypto volatility
tempo.nudge 78 market activity / inflation
drone.voices 79 aircraft / population / the debt's weight
lfo.rate 72 wind / the Moon rising & falling
glitch 73 retrogrades / wiki edits / light flashes
master.space 94 the moon phase / quakes / inflation
lead.note note, ch 0 your market, quantized (G dorian)
bass.note note, ch 1 earthquake depth, quantized

A starter pattern

// bind the hub's CCs (adjust the input-binding call to your Strudel version;
// ccn(n) returns 0..1 for controller n on the selected MIDI input)
setcps(0.5)

const cutoff = ccn(74), bright = ccn(71), morph = ccn(70)
const grit   = ccn(75), perc = ccn(77), drone = ccn(79)
const space  = ccn(94), lfo  = ccn(72), glitch = ccn(73)

stack(
  // LEAD — your market plays it (note on channel 0)
  note(notein()).s("sawtooth")
    .cutoff(cutoff.range(300, 5000)).lpq(morph.range(2, 12)).gain(0.5),

  // PAD — light / almanac brightness
  n("0 3 7 10").scale("C:dorian").s("gm_pad_warm")
    .room(space.range(0, 0.9)).gain(bright.range(0.15, 0.6)),

  // DRONE — the weight of the debt
  n("0").scale("C:dorian").s("sawtooth").cutoff(180)
    .gain(drone.range(0, 0.45)).room(0.7),

  // HATS — dealgod market activity drives density
  s("hh*8").gain(perc.range(0, 0.9)).pan(sine.fast(lfo.range(0.2, 4)))
).distort(grit.range(0, 2.5)).sometimesBy(glitch.range(0, 0.4), x => x.crush(4))

No-MIDI alternative (custom web-audio synth)

If you'd rather build your own voices, the hub also broadcasts every value on ws://localhost:8765 as JSON (dests, sources, macros). A ~30-line page can open that socket and feed the numbers straight into Web Audio nodes — no MIDI, no IAC. Ask and I'll scaffold it.