{
  "fonts": [
    { "family": "Schibsted Grotesk", "path": "fonts/SchibstedGrotesk.ttf" },
    { "family": "JetBrains Mono", "path": "fonts/JetBrainsMono.ttf" }
  ],
  "compositions": [{
    "id": "visualizer", "description": "A music visualizer: 96 bars driven by bass and noise, a disc that pulses on beat, and a beat counter (sound on)",
    "width": 1280, "height": 720, "fps": 30, "duration": "6s",
    "background": "#131210", "grain": 0.04,
    "layers": [
      { "id": "music", "type": "audio", "src": "assets/music.mp3", "fadeOut": "0.6s" },
      { "id": "bloom", "type": "ellipse", "width": 900, "height": 900, "opacity": "=0.25 + 0.75 * bass",
        "fill": { "type": "radial", "stops": ["#f05a4e30", "#f05a4e00"] } },
      { "id": "ring", "type": "group", "rotation": "=t * 10", "chromaticAberration": "=6 * beat",
        "children": [
          { "id": "bar", "type": "rect", "width": 5, "height": 30, "anchor": "bottom",
            "repeat": { "count": 96, "layout": "radial", "radius": 178, "rotate": true },
            "scaleY": "=0.4 + 5 * bass * (0.35 + 0.65 * noise2(i * 0.4, t * 1.5))",
            "fill": "=lerp('#efebe2', '#f05a4e', clamp(bass * noise2(i * 0.4, t * 1.5) * 1.6, 0, 1))" }
        ] },
      { "id": "disc", "type": "ellipse", "width": 300, "scale": "=1 + 0.07 * beat",
        "fill": { "type": "radial", "center": [0.5, 0.35], "stops": ["#1d1b18", "#131210"] },
        "stroke": "#efebe255", "strokeWidth": 1.5, "glow": { "radius": 30, "strength": "=0.4 + beat", "color": "#f05a4e" } },
      { "id": "count", "type": "text", "text": "${pad(beats, 2)}", "font": "Schibsted Grotesk", "fontWeight": 860, "fontSize": 120,
        "letterSpacing": -5, "fill": "=lerp('#efebe2', '#f05a4e', beat)", "y": "47%", "scale": "=1 + 0.07 * beat" },
      { "id": "unit", "type": "text", "text": "beats", "font": "JetBrains Mono", "fontSize": 13, "letterSpacing": 2.4, "uppercase": true,
        "fill": "#8f8a7f", "y": "59%" },
      { "id": "floor", "type": "waveform", "src": "assets/music.mp3", "mode": "mirror", "bars": 120, "gap": 0.5,
        "width": 1280, "height": 70, "y": 680, "fill": "#efebe2", "opacity": 0.35 }
    ]
  }]
}
