{
  "$type": "at.atmosynth.module",
  "descriptionVersion": 1,
  "moduleId": "envelope",
  "versionKey": "1",
  "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. 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": "linear"
        }
      ],
      "sustainAt": 2
    }
  ],
  "parameters": [
    {
      "id": "attack",
      "label": "Attack",
      "range": {
        "min": "0",
        "max": "4000"
      },
      "default": "10",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 1,
          "field": "time"
        }
      ]
    },
    {
      "id": "decay",
      "label": "Decay reaches sustain at",
      "range": {
        "min": "0",
        "max": "8000"
      },
      "default": "200",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 2,
          "field": "time"
        }
      ]
    },
    {
      "id": "sustain",
      "label": "Sustain level",
      "range": {
        "min": "0",
        "max": "1"
      },
      "default": "0.5",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 2,
          "field": "value"
        }
      ]
    },
    {
      "id": "release",
      "label": "Release ends at",
      "range": {
        "min": "0",
        "max": "12000"
      },
      "default": "400",
      "targets": [
        {
          "automation": "env",
          "breakpoint": 3,
          "field": "time"
        }
      ]
    }
  ],
  "sampleSlots": [],
  "createdAt": "2026-08-29T00:00:00.000Z"
}