Schemas / Synth

rig.synth.envelope

v1.4.0 · stable maturity: draft 6 fields 0 required

Fields

FieldTypeMeaning
attackSeconds number0 – * optional Optional. Seconds from 0 to full when the gate opens. Absent = 0
decaySeconds number0 – * optional Optional. Seconds from full to sustain while the gate holds. Absent = 0
sustain number0 – 1 optional Optional. 0-1 level held while the gate stays open. Absent = 1
releaseSeconds number0 – * optional Optional. Seconds from the held level to 0 when the gate closes. Absent = 0
curve enumlinear · exponential optional Optional. linear or exponential. Absent = linear
gate entity optional Optional. Entity that opens this envelope. Absent = the host's playing note

Attack, decay, sustain, release. Format when present.

The running level is 0 to 1. 0 is closed. 1 is the peak at the end of the attack. That level is host cache. Bind it with rig.mod.binding: depth 1 onto an amplifier gain opens the voice; a larger depth onto a filter cutoffHertz sweeps the corner.

A gate that opens again during release restarts the attack. curve linear moves each stage in even steps. exponential spends more of the stage at the start, the RC shape.

gate names the jack, the sequencer, or the note entity that opens this envelope. The voltage on that jack stays host cache. rig.mod.trigger is a show event, a different component.

All four times at 0 and sustain 1 hold full while the gate is open and drop when it closes.

Fulfillment

Hosts advance the stage in Update. The stage name and the running level stay a runtime cache.

JSON Schema

Resolves at https://rig.works/schemas/rig.synth.envelope.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.synth.envelope.schema.json",
  "title": "rig.synth.envelope",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "attackSeconds": {
      "type": "number",
      "minimum": 0
    },
    "decaySeconds": {
      "type": "number",
      "minimum": 0
    },
    "sustain": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "releaseSeconds": {
      "type": "number",
      "minimum": 0
    },
    "curve": {
      "type": "string",
      "enum": [
        "linear",
        "exponential"
      ]
    },
    "gate": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    }
  },
  "x-rig-maturity": "draft"
}

Seen in

synth-voice.json