Skip to content

Mixing Studio Project File ​

The Mixing Studio saves its whole mix state as libsonare-mix-project.json: tracks with their clips, strips, sends, outputs, and automation, the two aux buses, the two subgroup buses, the master, VCA gains, and the loop range. The file excludes decoded audio. Use Save project JSON to write it and Open project JSON to read it back; the tracks come back waiting for audio, and each file you add attaches to the track with the same name, otherwise to the next one in order. For the app architecture and source files, see Build a Browser Mixer.

This is not the mixer scene format

A scene describes a whole mixer graph (strips, buses, VCA groups, and connections) and round-trips through Mixer.toJson() / Mixer.fromJson(); see Mixing Scene JSON. The project file is the state of a fixed-layout console, read only by the browser demo. The engine's Mixer.fromJson(...) does not accept it, and the demo rejects a scene file.

Fixed layout ​

Every track has the same strip: six EQ bands, then six insert slots in order (trim, gate, comp, deess, duck, width) and two sends, to the reverb and delay buses. The master has two slots, glue and limiter. A bypassed slot stays in the file, so slot positions never change. Positions in the file are seconds; the engine runs at 60 bpm, so one second is one quarter note.

Shape ​

The example is abbreviated: a real file lists all six EQ bands and every slot parameter.

json
{
  "version": 3,
  "tracks": [
    {
      "id": 1,
      "name": "Lead Vocal",
      "sourceDurationSec": 42.5,
      "clip": { "startSec": 1.5, "trimStartSec": 0, "lengthSec": null, "fadeInSec": 0.02, "fadeOutSec": 0.5 },
      "faderDb": -3,
      "pan": 0,
      "panLaw": "const3Db",
      "panMode": "balance",
      "dualPanLeft": -1,
      "dualPanRight": 1,
      "channelDelayMs": 0,
      "polarityLeft": false,
      "polarityRight": false,
      "muted": false,
      "soloed": false,
      "soloSafe": false,
      "vcaGroup": null,
      "outputBus": null,
      "eq": [
        { "type": "highPass", "frequencyHz": 30, "gainDb": 0, "q": 0.707, "enabled": false }
      ],
      "slots": {
        "trim": { "bypassed": false, "params": { "levelDb": 0 } },
        "comp": { "bypassed": true, "params": { "thresholdDb": -18, "ratio": 2 } },
        "width": { "bypassed": false, "params": { "width": 1 } }
      },
      "duckKeyTrackId": null,
      "sends": {
        "reverb": { "levelDb": -18, "timing": "postFader" },
        "delay": { "levelDb": -60, "timing": "postFader" }
      },
      "automation": {
        "fader": [{ "id": "p1", "timeSec": 8, "value": -6, "curve": "linear" }],
        "pan": [],
        "width": []
      }
    }
  ],
  "buses": {
    "reverb": { "gainDb": 0, "params": { "decay": 0.566, "damping": 0.5, "preDelayMs": 20, "dryWet": 1 } },
    "delay": { "gainDb": 0, "params": { "delayTimeLMs": 250, "delayTimeRMs": 250, "feedback": 0.25, "pingPong": 0, "dryWet": 1 } }
  },
  "groups": { "group1": { "gainDb": 0 }, "group2": { "gainDb": 0 } },
  "master": {
    "faderDb": 0,
    "slots": {
      "glue": { "bypassed": true, "params": {} },
      "limiter": { "bypassed": false, "params": { "ceilingDbtp": -1, "releaseMs": 50 } }
    }
  },
  "vcaGains": { "A": 0, "B": 0, "C": 0 },
  "loop": { "enabled": false, "startSec": 0, "endSec": 0 }
}
  • id is a positive integer, unique within the file. A send at or below -60 dB is not routed. lengthSec: null plays the rest of the source.
  • eq has exactly six bands. type is one of the engine's EQ band types (peak, lowShelf, highShelf, lowPass, highPass, bandPass, notch, tiltShelf, flatTilt, allPass). panLaw is const3Db, const4.5Db, const6Db, or linear0Db, panMode is balance, stereoPan, or dualPan, and a send's timing is preFader or postFader.
  • curve is linear, exponential, hold, or sCurve, and shapes the segment up to the next point. Each lane is fader (dB), pan, or width.
  • outputBus is "group1", "group2", or null for the master; any other value is rejected. groups holds each subgroup bus's gainDb (default 0). A subgroup bus is a summing fader with no inserts. Both are optional, so a file saved without them still opens, with every track on the master.
  • vcaGroup is "A", "B", "C", or null. duckKeyTrackId names the track whose signal keys the duck slot, or null to key it from the track's own input.
  • A file holds at most eight tracks.

Omitted fields take the demo's defaults. A present field of the wrong type, a slot parameter the slot does not have, a duplicate track id, a duckKeyTrackId that names no track or that keys a track from itself through a chain of keys, an eq array that is not six bands, or a value outside a closed set such as panLaw rejects the whole file before anything changes. Numeric values must be finite numbers; a string such as "-6" is rejected.

Opening a file replaces the whole project, undoably.