{
  "fonts": [
    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk.ttf" },
    { "family": "JetBrains Mono", "path": "fonts/JetBrainsMono.ttf" }
  ],
  "compositions": [{
    "id": "meters", "description": "The four audio variables as live meters: amp, bass and beat as bars, beats as a counter (sound on)",
    "width": 1280, "height": 720, "fps": 30, "duration": "4s",
    "background": "#f4f1ea",
    "layers": [
      { "id": "music", "type": "audio", "src": "assets/music.mp3" },
      { "id": "title", "type": "text", "text": "the soundtrack, as numbers", "font": "Schibsted Grotesk", "fontWeight": 860,
        "fontSize": 60, "letterSpacing": -2.8, "fill": "#161412", "y": 120 },
      { "id": "name", "type": "text", "text": "${pick(i, ['amp', 'bass', 'beat'])}", "font": "JetBrains Mono", "fontSize": 22,
        "fill": "#161412", "anchor": "left", "x": 180, "y": 340, "repeat": { "count": 3, "layout": "column", "spacing": 110 } },
      { "id": "track", "type": "rect", "anchor": "left", "x": 340, "y": 340, "width": 640, "height": 14,
        "fill": "#e9e4d8", "repeat": { "count": 3, "layout": "column", "spacing": 110 } },
      { "id": "level", "type": "rect", "anchor": "left", "x": 340, "y": 340, "height": 14,
        "repeat": { "count": 3, "layout": "column", "spacing": 110 },
        "width": "=14 + 626 * pick(i, [amp, bass, beat])", "fill": "=pick(i, ['#161412', '#4a4640', '#c92a26'])" },
      { "id": "readout", "type": "text", "text": "${pick(i, [amp, bass, beat]):2}", "font": "JetBrains Mono", "fontSize": 22,
        "fill": "#8a857a", "anchor": "right", "x": 1100, "y": 340, "repeat": { "count": 3, "layout": "column", "spacing": 110 } },
      { "id": "beats-name", "type": "text", "text": "beats", "font": "JetBrains Mono", "fontSize": 22, "fill": "#161412",
        "anchor": "left", "x": 180, "y": 560 },
      { "id": "pip", "type": "ellipse", "width": 22, "x": 500, "y": 560, "repeat": { "count": 8, "layout": "row", "spacing": 44 },
        "fill": "=i < beats ? lerp('#161412', '#c92a26', beat * (i == beats - 1)) : '#e9e4d8'" },
      { "id": "beats-count", "type": "text", "text": "${beats}", "font": "JetBrains Mono", "fontSize": 22, "fill": "#8a857a",
        "anchor": "right", "x": 1100, "y": 560 }
    ]
  }]
}
