Examples / music-sequencer

music-sequencer.json

targets v0.41.0 3 entities 5 schemas

A transport (120 bpm) with a 96-tick clock, a four-step minor bass pattern (steps are nested rig.music.step cells), and a sequencer pointing at both.

Speaks

rig.meta.named · rig.music.clock · rig.music.pattern · rig.music.sequencer · rig.music.transport

Document

Validates under npm run check — raw file · open in RigPlayer — drop it in, press play, remix it, share the link.

{
  "rig": "0.41.0",
  "document": {
    "title": "Music sequencer",
    "defaultUnit": "px"
  },
  "entities": [
    {
      "id": "transport",
      "components": {
        "rig.meta.named": {
          "name": "Transport",
          "stableId": "transport"
        },
        "rig.music.transport": {
          "bpm": 120
        },
        "rig.music.clock": {
          "ticksPerQuarter": 96
        }
      }
    },
    {
      "id": "bass-pattern",
      "components": {
        "rig.meta.named": {
          "name": "Bass pattern",
          "stableId": "bass-pattern"
        },
        "rig.music.pattern": {
          "steps": [
            {
              "active": true,
              "pitch": 36,
              "intervals": [
                12
              ]
            },
            {
              "active": false
            },
            {
              "active": true,
              "pitch": 36
            },
            {
              "active": true,
              "pitch": 39,
              "velocity": 96
            }
          ],
          "rootNote": 36,
          "scale": "minor",
          "lane": 0
        }
      }
    },
    {
      "id": "bass-sequencer",
      "components": {
        "rig.meta.named": {
          "name": "Bass sequencer",
          "stableId": "bass-sequencer"
        },
        "rig.music.sequencer": {
          "pattern": "bass-pattern",
          "clock": "transport"
        }
      }
    }
  ]
}