{
  "$type": "at.atmosynth.module",
  "descriptionVersion": 1,
  "moduleId": "envelope",
  "versionKey": "2",
  "name": "Envelope",
  "description": "A shape a note makes, on its own, for something else to follow: it rises to one over the attack, falls to the sustain level, holds while the key is held and returns to nothing over the release. Each time is how long its own stage lasts, and the release falls away exponentially unless its curve is set to linear. It makes no sound. Patch it into a modulation input — a filter's Cutoff, an oscillator's Detune, a level — and how far it moves what it arrives at is set there. The amplitude envelope shapes what passes through it; this one shapes anything.",
  "audioInputs": [],
  "audioOutputs": [
    {
      "id": "out",
      "label": "Out"
    }
  ],
  "midiInputs": [
    {
      "id": "midi",
      "label": "Note"
    }
  ],
  "nodes": [
    {
      "id": "note",
      "kind": "midiInput",
      "options": {
        "midiInput": "midi"
      }
    },
    {
      "id": "shape",
      "kind": "constantSource",
      "options": {}
    },
    {
      "id": "out",
      "kind": "moduleOutput",
      "options": {
        "output": "out"
      }
    }
  ],
  "connections": [
    {
      "from": {
        "node": "shape",
        "output": 0
      },
      "to": {
        "node": "out",
        "input": 0
      }
    }
  ],
  "automation": [
    {
      "id": "env",
      "label": "Shape",
      "target": {
        "node": "shape",
        "param": "offset"
      },
      "breakpoints": [
        {
          "time": 0,
          "value": "0",
          "curve": "step"
        },
        {
          "time": 10,
          "value": "1",
          "curve": "linear"
        },
        {
          "time": 200,
          "value": "0.5",
          "curve": "linear"
        },
        {
          "time": 400,
          "value": "0",
          "curve": "exponential"
        }
      ],
      "sustainAt": 2
    }
  ],
  "parameters": [
    {
      "id": "attack",
      "label": "Attack (ms)",
      "range": {
        "min": "0",
        "max": "4000"
      },
      "default": "10",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 1,
          "field": "duration"
        }
      ]
    },
    {
      "id": "decay",
      "label": "Decay (ms)",
      "range": {
        "min": "0",
        "max": "8000"
      },
      "default": "190",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 2,
          "field": "duration"
        }
      ]
    },
    {
      "id": "sustain",
      "label": "Sustain level",
      "range": {
        "min": "0",
        "max": "1"
      },
      "default": "0.5",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 2,
          "field": "value"
        }
      ]
    },
    {
      "id": "release",
      "label": "Release (ms)",
      "range": {
        "min": "0",
        "max": "12000"
      },
      "default": "200",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 3,
          "field": "duration"
        }
      ]
    },
    {
      "id": "releaseCurve",
      "label": "Release curve",
      "values": [
        "exponential",
        "linear"
      ],
      "default": "exponential",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 3,
          "field": "curve"
        }
      ]
    }
  ],
  "sampleSlots": [],
  "createdAt": "2026-10-17T00:00:00.000Z"
}