{
  "format": "forge.graph/0",
  "name": "Gated Reverb",
  "author": "Chirp",
  "license": "CC-BY-4.0",
  "remixed_from": null,
  "description": "The big 1980s reverb that stops dead: a dense, bright room that's cut off a moment after you stop playing, so chords sound huge but never wash into each other. Hold sets how long it lingers after the note; Threshold how hard you must play to open it.",
  "tags": ["reverb", "gated", "80s", "room"],
  "face": {
    "display": { "kind": "lamp", "label": "Open", "source": "smooth", "range": [0, 1] },
    "knobs": [
      { "id": "size", "label": "Size", "default": 0.6,
        "controls": [ { "target": "t1_fb.amount", "from": 0.55, "to": 0.9 }, { "target": "t2_fb.amount", "from": 0.55, "to": 0.9 } ] },
      { "id": "hold", "label": "Hold", "default": 0.4,
        "controls": [ { "target": "follow.release_ms", "from": 60, "to": 700, "curve": "exp" } ] },
      { "id": "threshold", "label": "Thresh", "default": 0.5,
        "controls": [ { "target": "thr.v", "from": 0.2, "to": 0.01, "curve": "exp" } ] },
      { "id": "tone", "label": "Tone", "default": 0.6,
        "controls": [ { "target": "t1_damp.cutoff", "from": 2000, "to": 11000, "curve": "exp" },
                      { "target": "t2_damp.cutoff", "from": 2000, "to": 11000, "curve": "exp" } ] },
      { "id": "mix", "label": "Mix", "default": 0.4,
        "controls": [ { "target": "mixer.mix", "from": 0, "to": 1 } ] }
    ]
  },
  "nodes": {
    "d1": { "block": "allpass", "set": { "time": 0.0048, "g": 0.75 }, "in": { "x": "in" } },
    "d2": { "block": "allpass", "set": { "time": 0.0036, "g": 0.75 }, "in": { "x": "d1" } },
    "d3": { "block": "allpass", "set": { "time": 0.0127, "g": 0.65 }, "in": { "x": "d2" } },
    "t1_ap": { "block": "allpass", "set": { "time": 0.0181, "g": -0.7 }, "in": { "x": ["d3", "t2_fb"] } },
    "t1": { "block": "delay", "set": { "time": 0.0712, "max": 0.08, "glide": 1 }, "in": { "x": "t1_ap" } },
    "t1_damp": { "block": "onepole", "in": { "x": "t1" } },
    "t1_fb": { "block": "gain", "in": { "x": "t1_damp" } },
    "t2_ap": { "block": "allpass", "set": { "time": 0.0243, "g": -0.7 }, "in": { "x": "t1_fb" } },
    "t2": { "block": "delay", "set": { "time": 0.0587, "max": 0.07, "glide": 1 }, "in": { "x": "t2_ap" } },
    "t2_damp": { "block": "onepole", "in": { "x": "t2" } },
    "t2_fb": { "block": "gain", "in": { "x": "t2_damp" } },
    "room": { "block": "gain", "set": { "amount": 0.8 }, "in": { "x": ["t1_damp", "t2_damp", "t1_ap"] } },
    "follow": { "block": "envelope", "mono": true, "set": { "attack_ms": 1 }, "in": { "x": "in" } },
    "thr": { "block": "value", "mono": true },
    "open": { "block": "formula", "mono": true, "set": { "expr": "clamp((a / max(b, 0.0001) - 1) * 4, 0, 1)" },
              "in": { "a": "follow", "b": "thr" } },
    "smooth": { "block": "formula", "mono": true, "set": { "expr": "b + (a - b) * 0.01" }, "in": { "a": "open", "b": "smooth_mem" } },
    "smooth_mem": { "block": "history", "mono": true, "in": { "x": "smooth" } },
    "gated": { "block": "formula", "set": { "expr": "a * b" }, "in": { "a": "room", "b": "smooth" } },
    "mixer": { "block": "blend", "in": { "dry": "in", "wet": "gated" } }
  },
  "out": "mixer"
}
