{
  "format": "forge.graph/0",
  "name": "Pitch Whammy",
  "author": "Chirp",
  "license": "CC-BY-4.0",
  "remixed_from": null,
  "description": "The pitch-bending pedal: Position sweeps the note from where you played it up to an octave (or down, or a fifth, or a dive two octaves down), gliding as fast as Glide lets it. In Manual, Position is where the bend is: put it on an expression pedal. Rise bends up once a beat and Wobble sways up and back in time, as far as Position says.",
  "tags": ["pitch", "whammy", "expression", "tempo"],
  "face": {
    "display": { "kind": "trace", "label": "Pedal", "source": "ease", "range": [0, 1] },
    "knobs": [
      { "id": "position", "label": "Bend", "default": 0.6,
        "controls": [ { "target": "pos.v", "from": 0, "to": 1 } ] },
      { "id": "glide", "label": "Glide", "default": 0.5,
        "controls": [ { "target": "speed.v", "from": 0.002, "to": 0.00005, "curve": "exp" } ] },
      { "id": "mix", "label": "Mix", "default": 1,
        "controls": [ { "target": "mixer.mix", "from": 0, "to": 1 } ] },
      { "id": "level", "label": "Level", "default": 0.5,
        "controls": [ { "target": "level.amount", "from": 0.6, "to": 1.6 } ] }
    ],
    "menus": [
      { "id": "interval", "label": "Interval", "options": ["Oct up", "Oct down", "Fifth up", "Dive"], "default": 0,
        "controls": [ { "target": "mods.bend", "values": [1, -0.5, 0.5, -0.75] } ] },
      { "id": "mode", "label": "Mode", "options": ["Manual", "Rise", "Wobble"], "default": 1,
        "controls": [ { "target": "shape.choice" },
                      { "target": "beat.rate", "unit": "per_beat", "values": [1, 1, 1] },
                      { "target": "sway.rate", "unit": "per_beat", "values": [0.5, 0.5, 0.5] } ] }
    ]
  },
  "nodes": {
    "pos": { "block": "value", "mono": true },
    "beat": { "block": "rhythm", "mono": true, "set": { "steps": 1, "pattern": 1 } },
    "sway": { "block": "lfo", "mono": true },
    "sway01": { "block": "formula", "mono": true, "set": { "expr": "a * 0.5 + 0.5" }, "in": { "a": "sway:sine" } },
    "one": { "block": "value", "mono": true, "set": { "v": 1 } },
    "shape": { "block": "select", "mono": true, "in": { "a": "one", "b": "beat:ramp", "c": "sway01" } },
    "source": { "block": "formula", "mono": true, "set": { "expr": "a * b" }, "in": { "a": "shape", "b": "pos" } },
    "speed": { "block": "value", "mono": true },
    "ease": { "block": "formula", "mono": true, "set": { "expr": "b + (a - b) * c" }, "in": { "a": "source", "b": "ease_mem", "c": "speed" } },
    "ease_mem": { "block": "history", "mono": true, "in": { "x": "ease" } },
    "shift": { "block": "pitch", "set": { "ratio": 1, "window": 0.04 }, "in": { "x": "in" } },
    "mixer": { "block": "blend", "in": { "dry": "in", "wet": "shift" } },
    "level": { "block": "gain", "in": { "x": "mixer" } }
  },
  "mods": {
    "bend": { "from": "ease", "target": "shift.ratio", "amount": 1 }
  },
  "out": "level"
}
