{
  "$type": "at.atmosynth.module",
  "descriptionVersion": 1,
  "moduleId": "osc-square",
  "versionKey": "3",
  "name": "Square oscillator",
  "description": "A square wave, pitched by the note played. The simplest sound source there is. What is patched into Detune can move the pitch by up to four octaves, enough for an envelope to drop it from a click to a boom in the first moments of the note. The Detune knob sets the pitch up to four octaves either side of the note, so a sub-bass or a whistle is a setting rather than something to patch.",
  "audioInputs": [
    {
      "id": "detune",
      "label": "Detune"
    }
  ],
  "audioOutputs": [
    {
      "id": "out",
      "label": "Out"
    }
  ],
  "midiInputs": [
    {
      "id": "midi",
      "label": "Note"
    }
  ],
  "nodes": [
    {
      "id": "note",
      "kind": "midiInput",
      "options": {
        "midiInput": "midi"
      }
    },
    {
      "id": "osc",
      "kind": "oscillator",
      "options": {
        "type": "square"
      }
    },
    {
      "id": "out",
      "kind": "moduleOutput",
      "options": {
        "output": "out"
      }
    },
    {
      "id": "detunein",
      "kind": "moduleInput",
      "options": {
        "input": "detune"
      }
    },
    {
      "id": "detunedepth",
      "kind": "gain"
    }
  ],
  "connections": [
    {
      "from": {
        "node": "osc",
        "output": 0
      },
      "to": {
        "node": "out",
        "input": 0
      }
    },
    {
      "from": {
        "node": "detunein",
        "output": 0
      },
      "to": {
        "node": "detunedepth",
        "input": 0
      }
    },
    {
      "from": {
        "node": "detunedepth",
        "output": 0
      },
      "to": {
        "node": "osc",
        "param": "detune"
      }
    }
  ],
  "automation": [],
  "parameters": [
    {
      "id": "detune",
      "label": "Detune (cents)",
      "range": {
        "min": "-4800",
        "max": "4800"
      },
      "default": "0",
      "targets": [
        {
          "node": "osc",
          "param": "detune"
        }
      ]
    },
    {
      "id": "detuneAmount",
      "label": "Detune amount (cents)",
      "range": {
        "min": "0",
        "max": "4800"
      },
      "default": "50",
      "targets": [
        {
          "node": "detunedepth",
          "param": "gain"
        }
      ]
    }
  ],
  "sampleSlots": [],
  "createdAt": "2026-09-21T00:00:00.000Z"
}