{
  "version": "0.1",
  "title": "System sound token",
  "updated": "2026-12-05",
  "changelog": [
    {
      "version": "0.1",
      "date": "2026-12-05",
      "summary": "First draft. Roles, when sound plays, levels, feel, switches, source and loop rules, and how apps may deviate."
    }
  ],
  "roles": [
    { "id": "tap", "label": "Tap", "use": "A confirmable tap or select." },
    { "id": "toggle", "label": "Toggle", "use": "A switch or option changing state." },
    { "id": "save", "label": "Save", "use": "Something was saved." },
    { "id": "success", "label": "Success", "use": "A meaningful success." },
    { "id": "notify", "label": "Notify", "use": "A notice that needs attention." },
    { "id": "celebrate", "label": "Celebrate", "use": "A rare celebration, allowed to last longer than other effects." },
    { "id": "card", "label": "Card", "use": "A card is placed." },
    { "id": "shuffle", "label": "Shuffle", "use": "A deck is shuffled." },
    { "id": "win", "label": "Win", "use": "A game is won." },
    { "id": "launch", "label": "Launch", "use": "Something is launched." },
    { "id": "ambience", "label": "Ambience", "use": "A shared pool of slow ambient music in the romantic apps, not one unique bed per app, and never in games." }
  ],
  "when": {
    "title": "When sound plays",
    "rule": "Only on meaningful moments. Never on scroll, navigation, or typing."
  },
  "levels": {
    "title": "Levels",
    "effectsLufs": -16,
    "bedsLufs": -24,
    "duckDb": 8,
    "peakCapDb": -1.5,
    "rule": "Effects play at about −16 LUFS. Beds sit under them at about −24 LUFS, and duck when an effect plays."
  },
  "feel": {
    "title": "Feel",
    "effectMaxSeconds": 0.4,
    "effectMaxSecondsExcept": ["celebrate"],
    "vary": 0.05,
    "bedFadeIn": 1.5,
    "bedFadeOut": 0.85,
    "rule": "Effects stay under about 0.4 s, except celebrate. Each play gets a few percent of pitch and volume variation. Beds fade in about 1.5 s and out in under 1 s."
  },
  "switches": {
    "title": "Switches",
    "master": { "id": "sound", "label": "Sound", "default": true },
    "effects": { "id": "effects", "label": "Effects", "default": true },
    "ambience": { "id": "ambience", "label": "Ambience", "default": true },
    "ambienceApps": ["Yes, Yes, Yes!", "Afterglow", "Bloom", "Crescendo", "We Win"],
    "rule": "Sound is the master. Under it are Effects and Ambience, both on by default. Ambience is only in the romantic apps — Yes, Afterglow, Bloom, Crescendo, and We Win. Games have no ambience switch."
  },
  "source": {
    "title": "Source",
    "rule": "CC0 or public domain only, served same-origin, with a license manifest."
  },
  "loop": {
    "title": "Loops",
    "rule": "Beds use sample-accurate loopStart and loopEnd, with a crossfaded seam. They pause when the page is hidden and fade back in when it returns. That prevents the old static-loop and click bugs."
  },
  "deviation": {
    "title": "Deviation",
    "rule": "Apps may swap or add sounds for their own reasons, but they keep the shared player, levels, and switches, and they note why."
  }
}
