From 15afbe01edbd6ec86960409c6d0c3e3c8a513fce Mon Sep 17 00:00:00 2001 From: mwinter Date: Mon, 3 Jul 2023 19:36:26 +0200 Subject: [PATCH] adding tempo control, tabbed windows, and checking tempo and part order for each pieces --- openstagecontrol/mixer_transport.json | 1127 ++++++++++++++----------- supercollider/live_utilities.scd | 32 +- 2 files changed, 668 insertions(+), 491 deletions(-) diff --git a/openstagecontrol/mixer_transport.json b/openstagecontrol/mixer_transport.json index 62b9140..def1587 100644 --- a/openstagecontrol/mixer_transport.json +++ b/openstagecontrol/mixer_transport.json @@ -42,173 +42,17 @@ "onCreate": "", "onValue": "", "widgets": [ - { - "type": "matrix", - "top": 240, - "left": 40, - "lock": false, - "id": "mixer/hdp/pan", - "visible": true, - "interaction": true, - "comments": "", - "width": 570, - "height": 50, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": "", - "colorBg": "auto", - "layout": "horizontal", - "justify": "start", - "gridTemplate": "", - "contain": true, - "scroll": true, - "innerPadding": true, - "tabsPosition": "top", - "variables": "@{parent.variables}", - "traversing": false, - "widgetType": "knob", - "quantity": 6, - "props": {}, - "value": "", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 2, - "target": "", - "ignoreDefaults": false, - "bypass": false, - "onCreate": "", - "onValue": "", - "widgets": [], - "tabs": [] - }, - { - "type": "matrix", - "top": 20, - "left": 40, - "lock": false, - "id": "mixer/hdp/volume", - "visible": true, - "interaction": true, - "comments": "", - "width": 570, - "height": 220, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": "", - "colorBg": "auto", - "layout": "horizontal", - "justify": "start", - "gridTemplate": "", - "contain": true, - "scroll": true, - "innerPadding": true, - "tabsPosition": "top", - "variables": "@{parent.variables}", - "traversing": false, - "widgetType": "fader", - "quantity": 6, - "props": {}, - "value": "", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 2, - "target": "", - "ignoreDefaults": false, - "bypass": false, - "onCreate": "", - "onValue": "", - "widgets": [], - "tabs": [] - }, - { - "type": "matrix", - "top": 290, - "left": 40, - "lock": false, - "id": "mixer/hdp/mute", - "visible": true, - "interaction": true, - "comments": "", - "width": 570, - "height": 40, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": "", - "colorBg": "auto", - "layout": "horizontal", - "justify": "start", - "gridTemplate": "", - "contain": true, - "scroll": true, - "innerPadding": true, - "tabsPosition": "top", - "variables": "@{parent.variables}", - "traversing": false, - "widgetType": "button", - "quantity": 6, - "props": {}, - "value": "", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 2, - "target": "", - "ignoreDefaults": false, - "bypass": false, - "onCreate": "", - "onValue": "", - "widgets": [], - "tabs": [] - }, { "type": "panel", - "top": 20, - "left": 610, + "top": 0, + "left": 0, "lock": false, - "id": "mixer/string/master_panel", + "id": "main_panel", "visible": true, "interaction": true, "comments": "", - "width": 60, - "height": 310, + "width": "100%", + "height": "100%", "expand": "false", "colorText": "auto", "colorWidget": "auto", @@ -244,48 +88,33 @@ "bypass": false, "onCreate": "", "onValue": "", - "widgets": [ + "widgets": [], + "tabs": [ { - "type": "fader", - "top": 0, - "left": 0, + "type": "tab", "lock": false, - "id": "mixer/hdp/volume/master", + "id": "metronome_tab", "visible": true, "interaction": true, "comments": "", - "width": "auto", - "height": 300, - "expand": "false", "colorText": "auto", "colorWidget": "auto", - "colorStroke": "auto", "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", "borderRadius": "auto", "padding": "auto", "html": "", "css": "", - "design": "default", - "knobSize": "auto", - "horizontal": false, - "pips": false, - "dashed": false, - "gradient": [], - "snap": false, - "spring": false, - "doubleTap": false, - "range": { - "min": 0, - "max": 1 - }, - "logScale": false, - "sensitivity": 1, - "steps": "", - "origin": "auto", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "label": "metronome/transport", + "variables": "@{parent.variables}", + "traversing": false, "value": "", "default": "", "linkId": "", @@ -298,320 +127,652 @@ "bypass": false, "onCreate": "", "onValue": "", - "onTouch": "" - } - ], - "tabs": [] - }, - { - "type": "button", - "top": 520, - "left": 40, - "lock": false, - "id": "transport", - "visible": true, - "interaction": true, - "comments": "", - "width": 80, - "height": 30, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": "", - "colorTextOn": "auto", - "label": "#{@{this} == 0 ? \"play\" : \"stop\"}", - "vertical": false, - "wrap": false, - "on": 1, - "off": 0, - "mode": "toggle", - "doubleTap": false, - "decoupled": false, - "value": "", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 0, - "target": "", - "ignoreDefaults": false, - "bypass": true, - "onCreate": "", - "onValue": "if(value === 1){\n send(false, \"/transport\", 1, get(\"piece\"), get(\"measure\"), get(\"beat\"));\n} else {\n send(false, \"/transport\", 0, get(\"piece\"), get(\"measure\"), get(\"beat\"));\n}" - }, - { - "type": "panel", - "top": 330, - "left": 40, - "lock": false, - "id": "metronome", - "visible": true, - "interaction": true, - "comments": "", - "width": 630, - "height": 190, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": "", - "colorBg": "auto", - "layout": "default", - "justify": "start", - "gridTemplate": "", - "contain": true, - "scroll": true, - "innerPadding": true, - "tabsPosition": "top", - "variables": "@{parent.variables}", - "traversing": false, - "value": "", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 2, - "target": "", - "ignoreDefaults": false, - "bypass": false, - "onCreate": "", - "onValue": "", - "widgets": [ - { - "type": "input", - "top": 0, - "left": 0, - "lock": false, - "id": "measure", - "visible": true, - "interaction": true, - "comments": "", - "width": 250, - "height": 180, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": 0, - "html": "", - "css": ":host {\n font-size: 120rem;\n}", - "align": "center", - "unit": "", - "asYouType": false, - "numeric": false, - "validation": "", - "maxLength": "", - "value": 1, - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 0, - "target": "", - "ignoreDefaults": false, - "bypass": false, - "onCreate": "", - "onValue": "" - }, - { - "type": "text", - "top": 10, - "left": 250, - "lock": false, - "id": "text_3", - "visible": true, - "comments": "", - "width": 50, - "height": 130, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": ":host {\n font-size: 120rem;\n}", - "vertical": false, - "wrap": false, - "align": "center", - "value": ":", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "decimals": 2, - "target": "", - "onCreate": "", - "onValue": "" + "widgets": [ + { + "type": "text", + "top": "20%", + "left": "40%", + "lock": false, + "id": "colon", + "visible": true, + "comments": "", + "width": 50, + "height": "40%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": ":host {\n font-size: 120rem;\n}", + "vertical": false, + "wrap": false, + "align": "center", + "value": ":", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "decimals": 2, + "target": "", + "onCreate": "", + "onValue": "" + }, + { + "type": "input", + "top": 0, + "left": 0, + "lock": false, + "id": "measure", + "visible": true, + "interaction": true, + "comments": "", + "width": "40%", + "height": "80%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": 0, + "html": "", + "css": "canvas {\n height: 150rem\n}\n:host {\n font-size: 150rem;\n}", + "align": "center", + "unit": "", + "asYouType": false, + "numeric": false, + "validation": "", + "maxLength": "", + "value": 1, + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 0, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "" + }, + { + "type": "input", + "top": 0, + "left": "calc(40% + 50px)", + "lock": false, + "id": "beat", + "visible": true, + "interaction": true, + "comments": "", + "width": "15%", + "height": "80%", + "expand": false, + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "canvas {\n height: 150rem\n}\n:host {\n font-size: 150rem;\n}", + "align": "center", + "unit": "", + "asYouType": false, + "numeric": true, + "validation": "", + "maxLength": "", + "value": 1, + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 0, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "" + }, + { + "type": "led", + "top": 0, + "left": "calc(55% + 50px)", + "lock": false, + "id": "visual_click", + "visible": true, + "comments": "", + "width": "25%", + "height": "80%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "mode": "intensity", + "range": { + "min": 0, + "max": 1 + }, + "alphaRange": { + "min": 0, + "max": 1 + }, + "logScale": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "target": "", + "onCreate": "", + "onValue": "var fallTime = 0.3,\nfps = 24,\nmaxValue = 1,\nstep = maxValue / fps / fallTime\n\nsetTimeout(()=>{\n if (value <= 0) clearTimeout()\n set(\"this\", value - step)\n}, 1000 / fps)" + }, + { + "type": "switch", + "top": "85%", + "left": 0, + "lock": false, + "id": "piece", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "15%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": ":host{\n font-size: 15rem\n}", + "colorTextOn": "auto", + "layout": "horizontal", + "gridTemplate": "", + "wrap": false, + "values": { + "Berger": "berger", + "Robinson": "robinson", + "Penrose": "penrose", + "Ammann": "ammann", + "Kari": "kari", + "Jaendel": "jaendel" + }, + "mode": "tap", + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "var quantity = 6\nif(value === 'berger') {quantity = 6}\nelse if(value === 'robinson') {quantity = 8}\nelse if(value === 'penrose') {quantity = 6}\n\nsetVar('mixer/hdp/volume', 'quantity', quantity)\nsetVar('mixer/hdp/pan', 'quantity', quantity)\nsetVar('mixer/hdp/mute', 'quantity', quantity)" + }, + { + "type": "input", + "top": "10%", + "left": "calc(80% + 50px)", + "lock": false, + "id": "tempo", + "visible": true, + "interaction": true, + "comments": "", + "width": "calc(20% - 50px)", + "height": "15%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": ":host{\n font-size: 20rem\n}", + "align": "center", + "unit": "", + "asYouType": false, + "numeric": true, + "validation": "", + "maxLength": "", + "value": "", + "default": 60, + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "" + }, + { + "type": "text", + "top": 0, + "left": "calc(80% + 50px)", + "lock": false, + "id": "tempo_label", + "visible": true, + "comments": "", + "width": "calc(20% - 50px)", + "height": "10%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": ":host{\n font-size: 15rem\n}", + "value": "tempo", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "target": "", + "onCreate": "", + "onValue": "", + "vertical": false, + "wrap": false, + "align": "center", + "decimals": 2 + }, + { + "type": "button", + "top": "30%", + "left": "calc(80% + 50px)", + "lock": false, + "id": "transport", + "visible": true, + "interaction": true, + "comments": "", + "width": "calc(20% - 50px)", + "height": "50%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": ":host{\n font-size: 20rem\n}", + "colorTextOn": "auto", + "label": "#{@{this} == 0 ? \"play\" : \"stop\"}", + "vertical": false, + "wrap": false, + "on": 1, + "off": 0, + "mode": "toggle", + "doubleTap": false, + "decoupled": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 0, + "target": "", + "ignoreDefaults": false, + "bypass": true, + "onCreate": "", + "onValue": "if(value === 1){\n send(false, \"/transport\", 1, get(\"piece\"), get(\"measure\"), get(\"beat\"), get(\"tempo\"));\n} else {\n send(false, \"/transport\", 0, get(\"piece\"), get(\"measure\"), get(\"beat\"), get(\"tempo\"));\n}" + } + ], + "tabs": [] }, { - "type": "input", - "top": 0, - "left": 300, + "type": "tab", "lock": false, - "id": "beat", + "id": "mixer_tab", "visible": true, "interaction": true, "comments": "", - "width": 120, - "height": 180, - "expand": false, "colorText": "auto", "colorWidget": "auto", - "colorStroke": "auto", "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", "borderRadius": "auto", "padding": "auto", "html": "", - "css": ":host {\n font-size: 120rem;\n}", - "align": "center", - "unit": "", - "asYouType": false, - "numeric": true, - "validation": "", - "maxLength": "", - "value": 1, + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "label": "mixer", + "variables": "@{parent.variables}", + "traversing": false, + "value": "", "default": "", "linkId": "", "address": "auto", "preArgs": "", "typeTags": "", - "decimals": 0, + "decimals": 2, "target": "", "ignoreDefaults": false, "bypass": false, "onCreate": "", - "onValue": "" - }, - { - "type": "led", - "top": 10, - "left": 430, - "lock": false, - "id": "visual_click", - "visible": true, - "comments": "", - "width": 180, - "height": 160, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": "", - "mode": "intensity", - "range": { - "min": 0, - "max": 1 - }, - "alphaRange": { - "min": 0, - "max": 1 - }, - "logScale": false, - "value": "", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "target": "", - "onCreate": "", - "onValue": "var fallTime = 0.3,\nfps = 24,\nmaxValue = 1,\nstep = maxValue / fps / fallTime\n\nsetTimeout(()=>{\n if (value <= 0) clearTimeout()\n set(\"this\", value - step)\n}, 1000 / fps)" + "onValue": "", + "widgets": [ + { + "type": "matrix", + "top": "70%", + "left": 0, + "lock": false, + "id": "mixer/hdp/pan", + "visible": true, + "interaction": true, + "comments": "", + "width": "90%", + "height": "15%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "horizontal", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "variables": "@{parent.variables}", + "traversing": false, + "widgetType": "knob", + "quantity": "VAR{quantity, 6}", + "props": {}, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [] + }, + { + "type": "matrix", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer/hdp/volume", + "visible": true, + "interaction": true, + "comments": "", + "width": "90%", + "height": "70%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "horizontal", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "variables": "@{parent.variables}", + "traversing": false, + "widgetType": "fader", + "quantity": "VAR{quantity, 6}", + "props": {}, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [] + }, + { + "type": "matrix", + "top": "85%", + "left": 0, + "lock": false, + "id": "mixer/hdp/mute", + "visible": true, + "interaction": true, + "comments": "", + "width": "90%", + "height": "15%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "horizontal", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "variables": "@{parent.variables}", + "traversing": false, + "widgetType": "button", + "quantity": "VAR{quantity, 6}", + "props": {}, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [] + }, + { + "type": "panel", + "top": 0, + "left": "90%", + "lock": false, + "id": "mixer/string/master_panel", + "visible": true, + "interaction": true, + "comments": "", + "width": "10%", + "height": "100%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "variables": "@{parent.variables}", + "traversing": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [ + { + "type": "fader", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer/hdp/volume/master", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "colorText": "auto", + "colorWidget": "auto", + "colorStroke": "auto", + "colorFill": "auto", + "alphaStroke": "auto", + "alphaFillOff": "auto", + "alphaFillOn": "auto", + "lineWidth": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "design": "default", + "knobSize": "auto", + "horizontal": false, + "pips": false, + "dashed": false, + "gradient": [], + "snap": false, + "spring": false, + "doubleTap": false, + "range": { + "min": 0, + "max": 1 + }, + "logScale": false, + "sensitivity": 1, + "steps": "", + "origin": "auto", + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "onTouch": "" + } + ], + "tabs": [] + } + ], + "tabs": [] } - ], - "tabs": [] - }, - { - "type": "switch", - "top": 20, - "left": 690, - "lock": false, - "id": "piece", - "visible": true, - "interaction": true, - "comments": "", - "width": "auto", - "height": 300, - "expand": "false", - "colorText": "auto", - "colorWidget": "auto", - "colorStroke": "auto", - "colorFill": "auto", - "alphaStroke": "auto", - "alphaFillOff": "auto", - "alphaFillOn": "auto", - "lineWidth": "auto", - "borderRadius": "auto", - "padding": "auto", - "html": "", - "css": "", - "colorTextOn": "auto", - "layout": "vertical", - "gridTemplate": "", - "wrap": false, - "values": { - "Berger": "berger", - "Robinson": "robinson", - "Penrose": "penrose", - "Ammann": "ammann", - "Kari": "kari", - "Jaendel": "jaendel" - }, - "mode": "tap", - "value": "", - "default": "", - "linkId": "", - "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 2, - "target": "", - "ignoreDefaults": false, - "bypass": false, - "onCreate": "", - "onValue": "" + ] } ], "tabs": [] diff --git a/supercollider/live_utilities.scd b/supercollider/live_utilities.scd index f90b319..4478906 100644 --- a/supercollider/live_utilities.scd +++ b/supercollider/live_utilities.scd @@ -84,7 +84,8 @@ Event.addEventType(\osc, { //create patterns ~bergerCreatePatternsForLive = {arg seqs, group; - var pBinds; + var pBinds, cleanSeqs; + cleanSeqs = [seqs[5], seqs[6], seqs[7], seqs[0], seqs[1], seqs[2]]; pBinds = seqs.collect({arg r, i; Pbind(\instrument, \berger, //\buf, Pseq((i - ((0..(r.slice(nil, 2).flat.size - 1)) / 10).trunc.asInteger) % 8), @@ -109,9 +110,9 @@ Event.addEventType(\osc, { \group, group, \out, ~hdpBusArray[i], \freq, Pseq(12.midicps * r.slice(nil, 1)), - \dur, Pseq(r.slice(nil, 0) * 0.25 * (3/4)), - \sustain, Pseq(r.slice(nil, 0) * 0.25 * (3/4)), - \amp, Pseq(r.slice(nil, 2)) + \dur, Pseq(r.slice(nil, 0) * 0.25 /* * (3/4)*/), + \sustain, Pseq(r.slice(nil, 0) * 0.25 /* * (3/4)*/), + \amp, Pseq(r.slice(nil, 2) * 2) ) }); }; @@ -125,8 +126,8 @@ Event.addEventType(\osc, { \out, ~hdpBusArray[i], //\freq, Pseq((24.midicps * r[1]).cpsmidi.round(0.5).midicps), \freq, Pseq((24.midicps * r[1])), - \dur, Pseq(r[0] * 0.125), - \sustain, Pseq(r[0] * 0.125), + \dur, Pseq(r[0] * 0.25 /* * 0.125*/), + \sustain, Pseq(r[0] * 0.25 /* * 0.125*/), \amp, Pseq(((r[2] * 0.25) / pow(1.5, ((i % 6) + 1)))) ) }); @@ -246,7 +247,9 @@ SynthDef(\mixer, {arg freq, gate = 1, sustain, amp, dur, out; ( -var createTransportData, createTransportPattern, group, berger, mixer, measureLengths, seqs, transportData, playbackData, player; +var createTransportData, createTransportPattern, group, berger, mixer, measureLengths, seqs, transportData, playbackData, tempoClock, player; + +~dir = thisProcess.nowExecutingPath.dirname; createTransportData = {arg measureLengths; measureLengths.collect({arg dur, measure; @@ -306,6 +309,7 @@ measureLengths = seqs[1].sum.collect({4}); playbackData.add(\robinson -> [~robinsonCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); seqs = File.readAllString((~dir +/+ "music_data" +/+ "penrose.txt").standardizePath).interpret; +~seqs = seqs; measureLengths = seqs[1].sum.collect({4}); playbackData.add(\penrose -> [~penroseCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); @@ -346,7 +350,8 @@ OSCdef(\transport, {arg msg, time, addr, port; terminationStream = Routine({addr.sendMsg("/transport", 0)}); player = EventStreamPlayer(offsetStream ++ stream ++ terminationStream); - player.play; + tempoClock = TempoClock(msg[5]/60.0); + player.play(tempoClock); }); }, \transport); @@ -367,3 +372,14 @@ TODOs: ~patterns.play ~bergerMusic[0][6].collect({arg beats, measure; beats.asInteger.collect({arg beat; [measure + 1, beat + 1]})}).flatten; */ + +~seqs[0][1][0] +[seqs[5], seqs[6], seqs[7], seqs[0], seqs[1], seqs[2]] + +0.25 * (3/4) * 16 + +0.25 * 16 + +4/0.25 + +9 * 0.125 \ No newline at end of file