{
  "format": "forge.graph/0",
  "name": "Rotary Speaker",
  "author": "Chirp",
  "license": "CC-BY-4.0",
  "remixed_from": null,
  "description": "The spinning organ speaker: a crossover splits the guitar into a horn and a drum that turn at their own speeds, each with the pitch wobble and the swell of a speaker going round. Switch Speed and they speed up or slow down the way the real one does, the light horn in about a second, the heavy drum over several. Brake stops them.",
  "tags": ["rotary", "leslie", "modulation", "stereo"],
  "face": {
    "display": { "kind": "trace", "label": "Horn", "source": "horn_spin:sine.L", "range": [-1, 1] },
    "knobs": [
      { "id": "drive", "label": "Drive", "default": 0.3,
        "controls": [ { "target": "drive.drive", "from": 1, "to": 8, "curve": "exp" } ] },
      { "id": "horn", "label": "Horn", "default": 0.55,
        "controls": [ { "target": "horn_amp.amount", "from": 0.4, "to": 1.1 } ] },
      { "id": "depth", "label": "Depth", "default": 0.6,
        "controls": [ { "target": "mods.horn_doppler", "from": 0.0002, "to": 0.0009 },
                      { "target": "mods.drum_doppler", "from": 0.0001, "to": 0.0005 } ] },
      { "id": "level", "label": "Level", "default": 0.5,
        "controls": [ { "target": "level.amount", "from": 0.5, "to": 1.5 } ] }
    ],
    "menus": [
      { "id": "speed", "label": "Speed", "options": ["Slow", "Fast", "Brake"], "default": 0,
        "controls": [ { "target": "speed.v", "values": [0, 1, -0.125] } ] }
    ]
  },
  "nodes": {
    "speed": { "block": "value", "mono": true },
    "horn_ramp": { "block": "formula", "mono": true, "set": { "expr": "b + (a - b) * 0.00004" }, "in": { "a": "speed", "b": "horn_mem" } },
    "horn_mem": { "block": "history", "mono": true, "in": { "x": "horn_ramp" } },
    "drum_ramp": { "block": "formula", "mono": true, "set": { "expr": "b + (a - b) * 0.000008" }, "in": { "a": "speed", "b": "drum_mem" } },
    "drum_mem": { "block": "history", "mono": true, "in": { "x": "drum_ramp" } },
    "horn_spin": { "block": "lfo", "set": { "rate": 0.8, "stereo_phase": 0.25 } },
    "horn_swell": { "block": "lfo", "set": { "rate": 0.8, "phase": 0.25, "stereo_phase": 0.25 } },
    "drum_spin": { "block": "lfo", "set": { "rate": 0.65, "stereo_phase": 0.25 } },
    "xover": { "block": "svf", "set": { "freq": 800, "q": 0.6 }, "in": { "x": "in" } },
    "horn": { "block": "delay", "set": { "time": 0.002, "max": 0.01, "glide": 1 }, "in": { "x": "xover:hp" } },
    "horn_amp": { "block": "gain", "in": { "x": "horn" } },
    "drum": { "block": "delay", "set": { "time": 0.003, "max": 0.01, "glide": 1 }, "in": { "x": "xover:lp" } },
    "drum_amp": { "block": "gain", "set": { "amount": 0.85 }, "in": { "x": "drum" } },
    "drive": { "block": "saturate", "in": { "x": ["horn_amp", "drum_amp"] } },
    "level": { "block": "gain", "in": { "x": "drive" } }
  },
  "mods": {
    "horn_speed": { "from": "horn_ramp", "target": "horn_spin.rate", "amount": 6 },
    "horn_speed2": { "from": "horn_ramp", "target": "horn_swell.rate", "amount": 6 },
    "drum_speed": { "from": "drum_ramp", "target": "drum_spin.rate", "amount": 5.2 },
    "horn_doppler": { "from": "horn_spin:sine", "target": "horn.time", "amount": 0 },
    "horn_am": { "from": "horn_swell:sine", "target": "horn_amp.amount", "amount": 0.3 },
    "drum_doppler": { "from": "drum_spin:sine", "target": "drum.time", "amount": 0 },
    "drum_am": { "from": "drum_spin:tri", "target": "drum_amp.amount", "amount": 0.15 }
  },
  "out": "level"
}
