{
  "format": "forge.graph/0",
  "name": "Ducked Echo",
  "author": "Chirp",
  "license": "CC-BY-4.0",
  "remixed_from": null,
  "description": "A tempo-synced echo that gets out of the way while you play and swells up in the gaps, like the studio trick of ducking a delay under the vocal. Duck sets how far the repeats drop under your playing, Recover how quickly they come back when you stop.",
  "tags": ["delay", "tempo", "dynamics", "echo"],
  "face": {
    "display": { "kind": "lamp", "label": "Time", "source": "beat:gate", "range": [0, 1] },
    "knobs": [
      { "id": "feedback", "label": "Repeats", "default": 0.5,
        "controls": [ { "target": "fb.amount", "from": 0, "to": 0.92 } ] },
      { "id": "mix", "label": "Mix", "default": 0.5,
        "controls": [ { "target": "mixer.mix", "from": 0, "to": 1 } ] },
      { "id": "duck", "label": "Duck", "default": 0.7,
        "controls": [ { "target": "depth.v", "from": 0, "to": 0.95 } ] },
      { "id": "recover", "label": "Recover", "default": 0.4,
        "controls": [ { "target": "follow.release_ms", "from": 60, "to": 1200, "curve": "exp" } ] },
      { "id": "tone", "label": "Tone", "default": 0.6,
        "controls": [ { "target": "tone.cutoff", "from": 1200, "to": 14000, "curve": "exp" } ] }
    ],
    "menus": [
      { "id": "division", "label": "Division", "options": ["1/4", "1/8 dot", "1/8", "1/4T"], "default": 1,
        "controls": [ { "target": "line.time", "unit": "beats", "values": [1, 0.75, 0.5, 0.6667] },
                      { "target": "beat.rate", "unit": "per_beat", "values": [2, 2.6667, 4, 3] } ] }
    ]
  },
  "nodes": {
    "beat": { "block": "rhythm", "mono": true, "set": { "steps": 2, "pattern": 1, "smooth": 0 } },
    "line": { "block": "delay", "set": { "glide": 120 }, "in": { "x": ["in", "fb"] } },
    "tone": { "block": "onepole", "in": { "x": "line" } },
    "fb": { "block": "gain", "in": { "x": "tone" } },
    "follow": { "block": "envelope", "mono": true, "set": { "attack_ms": 8 }, "in": { "x": "in" } },
    "depth": { "block": "value", "mono": true },
    "ducked": { "block": "formula", "set": { "expr": "a * (1 - c * clamp(b * 12, 0, 1))" },
                "in": { "a": "tone", "b": "follow", "c": "depth" } },
    "mixer": { "block": "blend", "in": { "dry": "in", "wet": "ducked" } }
  },
  "out": "mixer"
}
