{
  "$type": "at.atmosynth.module",
  "descriptionVersion": 1,
  "moduleId": "amp-envelope",
  "versionKey": "2",
  "name": "Amplitude envelope",
  "description": "Shapes the level of whatever passes through it: attack, decay, sustain and release. Each time is how long its own stage lasts, so a longer decay leaves the release as long as it was. The release falls away exponentially, the way a struck string or a room dies out; set its curve to linear for a straight-line fade.",
  "audioInputs": [
    {
      "id": "in",
      "label": "In"
    }
  ],
  "audioOutputs": [
    {
      "id": "out",
      "label": "Out"
    }
  ],
  "midiInputs": [
    {
      "id": "midi",
      "label": "Note"
    }
  ],
  "nodes": [
    {
      "id": "note",
      "kind": "midiInput",
      "options": {
        "midiInput": "midi"
      }
    },
    {
      "id": "in",
      "kind": "moduleInput",
      "options": {
        "input": "in"
      }
    },
    {
      "id": "vca",
      "kind": "gain",
      "options": {}
    },
    {
      "id": "out",
      "kind": "moduleOutput",
      "options": {
        "output": "out"
      }
    }
  ],
  "connections": [
    {
      "from": {
        "node": "in",
        "output": 0
      },
      "to": {
        "node": "vca",
        "input": 0
      }
    },
    {
      "from": {
        "node": "vca",
        "output": 0
      },
      "to": {
        "node": "out",
        "input": 0
      }
    }
  ],
  "automation": [
    {
      "id": "amp",
      "label": "Amplitude",
      "target": {
        "node": "vca",
        "param": "gain"
      },
      "breakpoints": [
        {
          "time": 0,
          "value": "0",
          "curve": "step"
        },
        {
          "time": 10,
          "value": "1",
          "curve": "linear"
        },
        {
          "time": 90,
          "value": "0.6",
          "curve": "linear"
        },
        {
          "time": 290,
          "value": "0",
          "curve": "exponential"
        }
      ],
      "sustainAt": 2
    }
  ],
  "parameters": [
    {
      "id": "attack",
      "label": "Attack (ms)",
      "range": {
        "min": "0",
        "max": "4000"
      },
      "default": "10",
      "targets": [
        {
          "automation": "amp",
          "breakpoint": 1,
          "field": "duration"
        }
      ]
    },
    {
      "id": "decay",
      "label": "Decay (ms)",
      "range": {
        "min": "0",
        "max": "8000"
      },
      "default": "80",
      "targets": [
        {
          "automation": "amp",
          "breakpoint": 2,
          "field": "duration"
        }
      ]
    },
    {
      "id": "sustain",
      "label": "Sustain level",
      "range": {
        "min": "0",
        "max": "1"
      },
      "default": "0.6",
      "targets": [
        {
          "automation": "amp",
          "breakpoint": 2,
          "field": "value"
        }
      ]
    },
    {
      "id": "release",
      "label": "Release (ms)",
      "range": {
        "min": "0",
        "max": "12000"
      },
      "default": "200",
      "targets": [
        {
          "automation": "amp",
          "breakpoint": 3,
          "field": "duration"
        }
      ]
    },
    {
      "id": "releaseCurve",
      "label": "Release curve",
      "values": [
        "exponential",
        "linear"
      ],
      "default": "exponential",
      "targets": [
        {
          "automation": "amp",
          "breakpoint": 3,
          "field": "curve"
        }
      ]
    }
  ],
  "sampleSlots": [],
  "createdAt": "2026-10-17T00:00:00.000Z"
}