[
  {
    "id": "beatdb0000tab001",
    "type": "tab",
    "label": "Beat & downbeats",
    "disabled": false,
    "info": "Two things from one Beat node: a 1-2-3-4 counter on every beat, and a\npulse on every downbeat.\n\nThe Beat node emits once per beat while a deck plays. Each message carries\nbeatInMeasure (1-4), bpm, pitch, a running beat counter and the track\nposition.\n\n- 'Send beat in measure' forwards beatInMeasure to /time-line/beat.\n  Use it for a 4-step light chase.\n- 'Only downbeats' passes beat 1 only and pulses /time-line/downbeat.\n\nTEST\nClick the test buttons - no deck needed. Watch Protokol (127.0.0.1:8000)\nand the debug sidebar.\n\nREAL GEAR\nChange the Server (pencil icon in an OSC output) and the addresses.\n",
    "env": []
  },
  {
    "id": "beatdb0000grp001",
    "type": "group",
    "z": "beatdb0000tab001",
    "name": "Every beat + every downbeat",
    "style": {
      "label": true
    },
    "nodes": [
      "beatdb0000bea001",
      "beatdb0000fna001",
      "beatdb0000fnb001",
      "beatdb0000out001",
      "beatdb0000out002",
      "beatdb0000dbg001"
    ],
    "x": 54,
    "y": 39,
    "w": 812,
    "h": 262
  },
  {
    "id": "beatdb0000grp002",
    "type": "group",
    "z": "beatdb0000tab001",
    "name": "No deck playing? Test with these",
    "style": {
      "label": true
    },
    "nodes": [
      "beatdb0000inj001",
      "beatdb0000inj002"
    ],
    "x": 54,
    "y": 339,
    "w": 322,
    "h": 142
  },
  {
    "id": "beatdb0000bea001",
    "type": "tl-beat",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp001",
    "name": "",
    "x": 160,
    "y": 200,
    "wires": [
      [
        "beatdb0000fna001",
        "beatdb0000fnb001"
      ]
    ]
  },
  {
    "id": "beatdb0000fna001",
    "type": "function",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp001",
    "name": "Send beat in measure",
    "func": "msg.payload = msg.payload.beatInMeasure;\nreturn msg;",
    "outputs": 1,
    "timeout": 0,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 400,
    "y": 160,
    "wires": [
      [
        "beatdb0000out001",
        "beatdb0000dbg001"
      ]
    ]
  },
  {
    "id": "beatdb0000fnb001",
    "type": "function",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp001",
    "name": "Only downbeats",
    "func": "if (msg.payload.beatInMeasure === 1) {\n    msg.payload = 1;\n    return msg;\n}\nreturn null;",
    "outputs": 1,
    "timeout": 0,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 400,
    "y": 240,
    "wires": [
      [
        "beatdb0000out002",
        "beatdb0000dbg001"
      ]
    ]
  },
  {
    "id": "beatdb0000out001",
    "type": "tl-output",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp001",
    "name": "Beat 1-4",
    "protocol": "osc",
    "server": "beatdb0000srv001",
    "address": "/time-line/beat",
    "message": "",
    "vizType": "text",
    "textSuffix": "",
    "progressMin": 0,
    "progressMax": 1,
    "progressStartLabel": "",
    "progressEndLabel": "",
    "x": 660,
    "y": 160,
    "wires": []
  },
  {
    "id": "beatdb0000out002",
    "type": "tl-output",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp001",
    "name": "Downbeat",
    "protocol": "osc",
    "server": "beatdb0000srv001",
    "address": "/time-line/downbeat",
    "message": "",
    "vizType": "led",
    "textSuffix": "",
    "progressMin": 0,
    "progressMax": 1,
    "progressStartLabel": "",
    "progressEndLabel": "",
    "x": 660,
    "y": 240,
    "wires": []
  },
  {
    "id": "beatdb0000dbg001",
    "type": "debug",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp001",
    "name": "what was sent",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 660,
    "y": 80,
    "wires": []
  },
  {
    "id": "beatdb0000inj001",
    "type": "inject",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp002",
    "name": "test: beat 1 (downbeat)",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": 0.1,
    "topic": "",
    "payload": "{\"beatInMeasure\":1,\"bpm\":128}",
    "payloadType": "json",
    "x": 200,
    "y": 380,
    "wires": [
      [
        "beatdb0000fna001",
        "beatdb0000fnb001"
      ]
    ]
  },
  {
    "id": "beatdb0000inj002",
    "type": "inject",
    "z": "beatdb0000tab001",
    "g": "beatdb0000grp002",
    "name": "test: beat 2",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": 0.1,
    "topic": "",
    "payload": "{\"beatInMeasure\":2,\"bpm\":128}",
    "payloadType": "json",
    "x": 200,
    "y": 440,
    "wires": [
      [
        "beatdb0000fna001",
        "beatdb0000fnb001"
      ]
    ]
  },
  {
    "id": "beatdb0000srv001",
    "type": "tl-output-server",
    "name": "Protokol",
    "protocol": "osc",
    "host": "127.0.0.1",
    "port": 8000,
    "udpFamily": "udp4"
  }
]
