{
  "format": "forge.graph/0",
  "name": "Classic Tremolo",
  "author": "Chirp",
  "license": "CC-BY-4.0",
  "remixed_from": null,
  "description": "Amp-style tremolo: the volume rises and falls with a smooth, triangle or choppy square wave.",
  "tags": ["tremolo", "modulation"],
  "face": {
    "display": { "kind": "trace", "label": "Wave", "source": "shape", "range": [-1, 1] },
    "knobs": [
      { "id": "rate", "label": "Rate", "default": 0.45,
        "controls": [ { "target": "lfo.rate", "from": 1, "to": 12, "curve": "exp" } ] },
      { "id": "depth", "label": "Depth", "default": 0.6,
        "controls": [ { "target": "amp.amount", "from": 1, "to": 0.5 },
                      { "target": "mods.trem", "from": 0, "to": 0.5 } ] },
      { "id": "level", "label": "Level", "default": 0.55,
        "controls": [ { "target": "level.amount", "from": 0.5, "to": 1.5 } ] }
    ],
    "menus": [
      { "id": "shape", "label": "Shape", "options": ["Smooth", "Triangle", "Square"], "default": 0,
        "controls": [ { "target": "shape.choice" } ] }
    ]
  },
  "nodes": {
    "lfo": { "block": "lfo", "mono": true },
    "square": { "block": "formula", "mono": true, "set": { "expr": "clamp(a * 4, -1, 1)" }, "in": { "a": "lfo:sine" } },
    "shape": { "block": "select", "mono": true, "in": { "a": "lfo:sine", "b": "lfo:tri", "c": "square" } },
    "amp": { "block": "gain", "in": { "x": "in" } },
    "level": { "block": "gain", "in": { "x": "amp" } }
  },
  "mods": {
    "trem": { "from": "shape", "target": "amp.amount", "amount": 0 }
  },
  "out": "level"
}
