diff --git a/openstagecontrol/custom_module_hdp_sync.js b/openstagecontrol/custom_module_hdp_sync.js index 7d1adbb..a07d865 100644 --- a/openstagecontrol/custom_module_hdp_sync.js +++ b/openstagecontrol/custom_module_hdp_sync.js @@ -110,12 +110,12 @@ module.exports = { var {host, port, address, args} = data if (address === '/playing') { - receive("/measure", args[0].value) - receive("/beat", args[1].value) - receive("/visual_click", 1) - //receiveSync("/measure", args[0].value) - //receiveSync("/beat", args[1].value) - //receiveSync("/visual_click", 1) + //receive("/measure", args[0].value) + //receive("/beat", args[1].value) + //receive("/visual_click", 1) + receiveSync("/measure", args[0].value) + receiveSync("/beat", args[1].value) + receiveSync("/visual_click", 1) } return @@ -136,11 +136,16 @@ module.exports = { if (address.substring(1, 6) == 'mixer') { tokens = address.split('/') - ins = tokens[2] + //piece = tokens[2] type = tokens[3] - index = tokens[4] val = args[0].value - args = [{'type': 's', 'value': ins}, {'type': 's', 'value': type}, {'type': 's', 'value': index}, {'type': 'f', 'value': val}] + if(type != "volume_master") { + index = tokens[4] + args = [{'type': 's', 'value': type}, {'type': 's', 'value': index}, {'type': 'f', 'value': val}] + } else { + args = [{'type': 's', 'value': type}, {'type': 'f', 'value': val}] + } + //args = [{'type': 's', 'value': piece}, {'type': 's', 'value': type}, {'type': 's', 'value': index}, {'type': 'f', 'value': val}] //console.log(data) address = '/mixer' return {host, port, address, args} diff --git a/openstagecontrol/hdp.config b/openstagecontrol/hdp.config index 8b82d21..a77154f 100644 --- a/openstagecontrol/hdp.config +++ b/openstagecontrol/hdp.config @@ -1 +1 @@ -{"send":["127.0.0.1:57120"],"custom-module":"/home/mwinter/Portfolio/a_history_of_the_domino_problem/a_history_of_the_domino_problem_source/openstagecontrol/custom_module_hdp.js","load":"/home/mwinter/Portfolio/a_history_of_the_domino_problem/a_history_of_the_domino_problem_source/openstagecontrol/mixer_transport.json"} \ No newline at end of file +{"send":["127.0.0.1:57120"],"custom-module":"/home/mwinter/Portfolio/a_history_of_the_domino_problem/a_history_of_the_domino_problem_source/openstagecontrol/custom_module_hdp_sync.js","load":"/home/mwinter/Portfolio/a_history_of_the_domino_problem/a_history_of_the_domino_problem_source/openstagecontrol/mixer_transport.json","port":9080} \ No newline at end of file diff --git a/openstagecontrol/mixer.json b/openstagecontrol/mixer.json new file mode 100644 index 0000000..45fe378 --- /dev/null +++ b/openstagecontrol/mixer.json @@ -0,0 +1,318 @@ +{ + "version": "1.24.0", + "createdWith": "Open Stage Control", + "type": "fragment", + "content": { + "type": "panel", + "top": 0, + "left": 0, + "lock": false, + "id": "@{parent.variables.piece}/mixer", + "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": "", + "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": "matrix", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer/@{parent.variables.piece}/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": "@{parent.variables.quantity}", + "props": { + "value": 0.75 + }, + "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": "@{parent.variables.piece}/mixer/hdp/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/@{parent.variables.piece}/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": 0.75, + "default": 1, + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "onTouch": "" + } + ], + "tabs": [] + }, + { + "type": "matrix", + "top": "70%", + "left": 0, + "lock": false, + "id": "mixer/@{parent.variables.piece}/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": "@{parent.variables.quantity}", + "props": "JS{{\nvar props = {}\nvar labels = @{parent.variables.labels}\nif(@{parent.variables.piece} == \"jaendel\"){\n props.value = $ % 2\n} else {\n props.value = $/(@{parent.variables.quantity}-1)\n}\nprops.label = labels[$]\nreturn props\n}}", + "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/@{parent.variables.piece}/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": "@{parent.variables.quantity}", + "props": "JS{{\nvar props = {}\nvar labels = @{parent.variables.labels}\nprops.value = 1\nprops.label = labels[$] \nreturn props\n}}", + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [] + } + ], + "tabs": [] + } +} \ No newline at end of file diff --git a/openstagecontrol/mixer_transport.json b/openstagecontrol/mixer_transport.json index 0246722..539deaf 100644 --- a/openstagecontrol/mixer_transport.json +++ b/openstagecontrol/mixer_transport.json @@ -93,7 +93,7 @@ { "type": "tab", "lock": false, - "id": "metronome_tab", + "id": "control_tab", "visible": true, "interaction": true, "comments": "", @@ -112,7 +112,7 @@ "scroll": true, "innerPadding": true, "tabsPosition": "top", - "label": "metronome/transport", + "label": "Berger", "variables": "@{parent.variables}", "traversing": false, "value": "", @@ -127,208 +127,385 @@ "bypass": false, "onCreate": "", "onValue": "", - "widgets": [ + "widgets": [], + "tabs": [ { - "type": "text", - "top": "20%", - "left": "40%", + "type": "tab", "lock": false, - "id": "colon", + "id": "metronome_tab", "visible": true, + "interaction": 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": ":", + "css": "", + "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": "", "address": "auto", "preArgs": "", + "typeTags": "", "decimals": 2, "target": "", + "ignoreDefaults": false, + "bypass": false, "onCreate": "", - "onValue": "" + "onValue": "", + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "transport", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "transport.json", + "fallback": "", + "props": { + "variables": { + "piece": "berger", + "tempo": 60 + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] }, { - "type": "input", - "top": 0, - "left": 0, + "type": "tab", "lock": false, - "id": "measure", + "id": "mixer_tab", "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, + "padding": "auto", "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, + "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": "" - }, + "onValue": "", + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "mixer.json", + "fallback": "", + "props": { + "variables": { + "piece": "berger", + "quantity": 6, + "labels": [ + "a", + "b", + "d" + ] + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] + } + ] + }, + { + "type": "tab", + "lock": false, + "id": "control_tab", + "visible": true, + "interaction": true, + "comments": "", + "colorText": "auto", + "colorWidget": "auto", + "colorFill": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "label": "Robinson", + "variables": "@{parent.variables}", + "traversing": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [ { - "type": "input", - "top": 0, - "left": "calc(40% + 50px)", + "type": "tab", "lock": false, - "id": "beat", + "id": "metronome_tab", "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, + "css": "", + "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": "", "address": "auto", "preArgs": "", "typeTags": "", - "decimals": 0, + "decimals": 2, "target": "", "ignoreDefaults": false, "bypass": false, "onCreate": "", - "onValue": "" + "onValue": "", + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "transport", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "transport.json", + "fallback": "", + "props": { + "variables": { + "piece": "robinson", + "tempo": 60 + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] }, { - "type": "led", - "top": 0, - "left": "calc(55% + 50px)", + "type": "tab", "lock": false, - "id": "visual_click", + "id": "mixer_tab", "visible": true, + "interaction": 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, + "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": 2, "target": "", + "ignoreDefaults": false, + "bypass": false, "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": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "mixer.json", + "fallback": "", + "props": { + "variables": { + "piece": "robinson", + "quantity": 8, + "labels": [ + "a", + "b", + "d" + ] + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] + } + ] + }, + { + "type": "tab", + "lock": false, + "id": "control_tab", + "visible": true, + "interaction": true, + "comments": "", + "colorText": "auto", + "colorWidget": "auto", + "colorFill": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "label": "Penrose", + "variables": "@{parent.variables}", + "traversing": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [ { - "type": "switch", - "top": "85%", - "left": 0, + "type": "tab", "lock": false, - "id": "piece", + "id": "metronome_tab", "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", + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", "gridTemplate": "", - "wrap": false, - "values": { - "Berger": "berger", - "Robinson": "robinson", - "Penrose": "penrose", - "Ammann": "ammann", - "Kari": "kari", - "Jaendel": "jaendel" - }, - "mode": "tap", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "label": "metronome/transport", + "variables": "@{parent.variables}", + "traversing": false, "value": "", "default": "", "linkId": "", @@ -340,40 +517,62 @@ "ignoreDefaults": false, "bypass": false, "onCreate": "", - "onValue": "var quantity = 6\nvar tempo = 60\nif(value === 'berger') {\n quantity = 6\n tempo = 60\n} else if(value === 'robinson') {\n quantity = 8\n tempo = 60\n} else if(value === 'penrose') {\n quantity = 6\n tempo = 120\n} else if(value === 'ammann') {\n quantity = 8\n tempo = 60\n} else if(value === 'kari') {\n quantity = 7\n tempo = 45\n} else if(value === 'jaendel') {\n quantity = 32\n tempo = 60\n}\n\nsetVar('mixer/hdp/volume', 'quantity', quantity)\nsetVar('mixer/hdp/pan', 'quantity', quantity)\nsetVar('mixer/hdp/mute', 'quantity', quantity)\nset('tempo', tempo)" + "onValue": "", + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "transport", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "transport.json", + "fallback": "", + "props": { + "variables": { + "piece": "penrose", + "tempo": 120 + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] }, { - "type": "input", - "top": "10%", - "left": "calc(80% + 50px)", + "type": "tab", "lock": false, - "id": "tempo", + "id": "mixer_tab", "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": "", + "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": 60, + "default": "", "linkId": "", "address": "auto", "preArgs": "", @@ -383,97 +582,222 @@ "ignoreDefaults": false, "bypass": false, "onCreate": "", - "onValue": "" - }, + "onValue": "", + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "mixer.json", + "fallback": "", + "props": { + "variables": { + "piece": "penrose", + "quantity": 6, + "labels": [ + "a", + "b", + "d" + ] + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] + } + ] + }, + { + "type": "tab", + "lock": false, + "id": "control_tab", + "visible": true, + "interaction": true, + "comments": "", + "colorText": "auto", + "colorWidget": "auto", + "colorFill": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "label": "Ammann", + "variables": "@{parent.variables}", + "traversing": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [ { - "type": "text", - "top": 0, - "left": "calc(80% + 50px)", + "type": "tab", "lock": false, - "id": "tempo_label", + "id": "metronome_tab", "visible": true, + "interaction": 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", + "css": "", + "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": "", "address": "auto", "preArgs": "", + "typeTags": "", + "decimals": 2, "target": "", + "ignoreDefaults": false, + "bypass": false, "onCreate": "", "onValue": "", - "vertical": false, - "wrap": false, - "align": "center", - "decimals": 2 + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "transport", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "transport.json", + "fallback": "", + "props": { + "variables": { + "piece": "ammann", + "tempo": 60 + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] }, { - "type": "button", - "top": "30%", - "left": "calc(80% + 50px)", + "type": "tab", "lock": false, - "id": "transport", + "id": "mixer_tab", "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, + "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": true, + "bypass": false, "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}" + "onValue": "", + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "mixer.json", + "fallback": "", + "props": { + "variables": { + "piece": "ammann", + "quantity": 8, + "labels": [ + "a", + "b", + "d" + ] + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], + "tabs": [] } - ], - "tabs": [] + ] }, { "type": "tab", "lock": false, - "id": "mixer_tab", + "id": "control_tab", "visible": true, "interaction": true, "comments": "", @@ -492,7 +816,7 @@ "scroll": true, "innerPadding": true, "tabsPosition": "top", - "label": "mixer", + "label": "Kari", "variables": "@{parent.variables}", "traversing": false, "value": "", @@ -507,44 +831,33 @@ "bypass": false, "onCreate": "", "onValue": "", - "widgets": [ + "widgets": [], + "tabs": [ { - "type": "matrix", - "top": "70%", - "left": 0, + "type": "tab", "lock": false, - "id": "mixer/hdp/pan", + "id": "metronome_tab", "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", + "layout": "default", "justify": "start", "gridTemplate": "", "contain": true, "scroll": true, "innerPadding": true, "tabsPosition": "top", + "label": "metronome/transport", "variables": "@{parent.variables}", "traversing": false, - "widgetType": "knob", - "quantity": "VAR{quantity, 6}", - "props": "{\"value\": #{$/(VAR{quantity, 6}-1)}}", "value": "", "default": "", "linkId": "", @@ -557,48 +870,59 @@ "bypass": false, "onCreate": "", "onValue": "", - "widgets": [], + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "transport", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "transport.json", + "fallback": "", + "props": { + "variables": { + "piece": "kari", + "tempo": 45 + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], "tabs": [] }, { - "type": "matrix", - "top": 0, - "left": 0, + "type": "tab", "lock": false, - "id": "mixer/hdp/volume", + "id": "mixer_tab", "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", + "layout": "default", "justify": "start", "gridTemplate": "", "contain": true, "scroll": true, "innerPadding": true, "tabsPosition": "top", + "label": "mixer", "variables": "@{parent.variables}", "traversing": false, - "widgetType": "fader", - "quantity": "VAR{quantity, 6}", - "props": { - "value": 1 - }, "value": "", "default": "", "linkId": "", @@ -611,48 +935,105 @@ "bypass": false, "onCreate": "", "onValue": "", - "widgets": [], + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "mixer", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "mixer.json", + "fallback": "", + "props": { + "variables": { + "piece": "kari", + "quantity": 7, + "labels": [ + "a", + "b", + "d" + ] + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], "tabs": [] - }, + } + ] + }, + { + "type": "tab", + "lock": false, + "id": "control_tab", + "visible": true, + "interaction": true, + "comments": "", + "colorText": "auto", + "colorWidget": "auto", + "colorFill": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "label": "Jaendal", + "variables": "@{parent.variables}", + "traversing": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [], + "tabs": [ { - "type": "matrix", - "top": "85%", - "left": 0, + "type": "tab", "lock": false, - "id": "mixer/hdp/mute", + "id": "metronome_tab", "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", + "layout": "default", "justify": "start", "gridTemplate": "", "contain": true, "scroll": true, "innerPadding": true, "tabsPosition": "top", + "label": "metronome/transport", "variables": "@{parent.variables}", "traversing": false, - "widgetType": "button", - "quantity": "VAR{quantity, 6}", - "props": { - "value": 1 - }, "value": "", "default": "", "linkId": "", @@ -665,29 +1046,44 @@ "bypass": false, "onCreate": "", "onValue": "", - "widgets": [], + "widgets": [ + { + "type": "fragment", + "top": 0, + "left": 0, + "lock": false, + "id": "transport", + "visible": true, + "interaction": true, + "comments": "", + "width": "100%", + "height": "100%", + "expand": "false", + "css": "", + "file": "transport.json", + "fallback": "", + "props": { + "variables": { + "piece": "kari", + "tempo": 60 + } + }, + "address": "auto", + "variables": "@{parent.variables}" + } + ], "tabs": [] }, { - "type": "panel", - "top": 0, - "left": "90%", + "type": "tab", "lock": false, - "id": "mixer/string/master_panel", + "id": "mixer_tab", "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": "", @@ -700,6 +1096,7 @@ "scroll": true, "innerPadding": true, "tabsPosition": "top", + "label": "mixer", "variables": "@{parent.variables}", "traversing": false, "value": "", @@ -716,65 +1113,38 @@ "onValue": "", "widgets": [ { - "type": "fader", + "type": "fragment", "top": 0, "left": 0, "lock": false, - "id": "mixer/hdp/volume/master", + "id": "mixer", "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 + "file": "mixer.json", + "fallback": "", + "props": { + "variables": { + "piece": "jaendel", + "quantity": 32, + "labels": [ + "a", + "b", + "d" + ] + } }, - "logScale": false, - "sensitivity": 1, - "steps": "", - "origin": "auto", - "value": 1, - "default": 1, - "linkId": "", "address": "auto", - "preArgs": "", - "typeTags": "", - "decimals": 2, - "target": "", - "ignoreDefaults": false, - "bypass": false, - "onCreate": "", - "onValue": "", - "onTouch": "" + "variables": "@{parent.variables}" } ], "tabs": [] } - ], - "tabs": [] + ] } ] } diff --git a/openstagecontrol/mixer_transport_legacy.json b/openstagecontrol/mixer_transport_legacy.json new file mode 100644 index 0000000..0246722 --- /dev/null +++ b/openstagecontrol/mixer_transport_legacy.json @@ -0,0 +1,784 @@ +{ + "createdWith": "Open Stage Control", + "version": "1.24.0", + "type": "session", + "content": { + "type": "root", + "lock": false, + "id": "root", + "visible": true, + "interaction": true, + "comments": "", + "width": "auto", + "height": "auto", + "colorText": "auto", + "colorWidget": "auto", + "alphaFillOn": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "colorBg": "auto", + "layout": "default", + "justify": "start", + "gridTemplate": "", + "contain": true, + "scroll": true, + "innerPadding": true, + "tabsPosition": "top", + "hideMenu": false, + "variables": "@{parent.variables}", + "traversing": false, + "value": "", + "default": "", + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "widgets": [ + { + "type": "panel", + "top": 0, + "left": 0, + "lock": false, + "id": "main_panel", + "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": "", + "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": [], + "tabs": [ + { + "type": "tab", + "lock": false, + "id": "metronome_tab", + "visible": true, + "interaction": true, + "comments": "", + "colorText": "auto", + "colorWidget": "auto", + "colorFill": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "css": "", + "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": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "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\nvar tempo = 60\nif(value === 'berger') {\n quantity = 6\n tempo = 60\n} else if(value === 'robinson') {\n quantity = 8\n tempo = 60\n} else if(value === 'penrose') {\n quantity = 6\n tempo = 120\n} else if(value === 'ammann') {\n quantity = 8\n tempo = 60\n} else if(value === 'kari') {\n quantity = 7\n tempo = 45\n} else if(value === 'jaendel') {\n quantity = 32\n tempo = 60\n}\n\nsetVar('mixer/hdp/volume', 'quantity', quantity)\nsetVar('mixer/hdp/pan', 'quantity', quantity)\nsetVar('mixer/hdp/mute', 'quantity', quantity)\nset('tempo', tempo)" + }, + { + "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": "tab", + "lock": false, + "id": "mixer_tab", + "visible": true, + "interaction": true, + "comments": "", + "colorText": "auto", + "colorWidget": "auto", + "colorFill": "auto", + "borderRadius": "auto", + "padding": "auto", + "html": "", + "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": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "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\": #{$/(VAR{quantity, 6}-1)}}", + "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": 1 + }, + "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": 1 + }, + "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": 1, + "default": 1, + "linkId": "", + "address": "auto", + "preArgs": "", + "typeTags": "", + "decimals": 2, + "target": "", + "ignoreDefaults": false, + "bypass": false, + "onCreate": "", + "onValue": "", + "onTouch": "" + } + ], + "tabs": [] + } + ], + "tabs": [] + } + ] + } + ], + "tabs": [] + } +} \ No newline at end of file diff --git a/openstagecontrol/transport.json b/openstagecontrol/transport.json new file mode 100644 index 0000000..28229f2 --- /dev/null +++ b/openstagecontrol/transport.json @@ -0,0 +1,344 @@ +{ + "version": "1.24.0", + "createdWith": "Open Stage Control", + "type": "fragment", + "content": { + "type": "panel", + "top": 0, + "left": 0, + "lock": false, + "id": "transport_panel", + "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": "", + "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": "text", + "top": "27%", + "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": "100%", + "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": "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": "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": "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": "", + "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": "input", + "top": "10%", + "left": "calc(80% + 50px)", + "lock": false, + "id": "tempo/@{parent.variables.piece}", + "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": "@{parent.variables.tempo}", + "default": "", + "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": "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": ":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": "console.log(\"tempo/\" + getProp(\"parent\", \"variables\").piece)\nif(value === 1){\n send(false, \"/transport\", 1, getProp(\"parent\", \"variables\").piece, get(\"measure\"), get(\"beat\"), get(\"tempo/\" + getProp(\"parent\", \"variables\").piece));\n} else {\n send(false, \"/transport\", 0, getProp(\"parent\", \"variables\").piece, get(\"measure\"), get(\"beat\"), get(\"tempo/\" + getProp(\"parent\", \"variables\").piece));\n}" + } + ], + "tabs": [] + } +} \ No newline at end of file diff --git a/supercollider/live_utilities.scd b/supercollider/live_utilities.scd index 6fb53af..2a6e8a2 100644 --- a/supercollider/live_utilities.scd +++ b/supercollider/live_utilities.scd @@ -1,362 +1,395 @@ ( -var createTransportPattern; -~hdpBusArray = 16.collect({Bus.audio(s, 1)}); +// MAIN LAUNCH (loads necessary files and definitions) -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~msg.postln; - //~addr.sendMsg(~path, *~msg); - ~addr.sendBundle(1, [~path] ++ ~msg); +var appEnvironment; + +//push new environment +appEnvironment = Environment.make; +appEnvironment.push; + +s.waitForBoot({ + + var hdpBusArray, + bergerCreateSynthsForLive, robinsonCreateSynthsForLive, penroseCreateSynthsForLive, ammannCreateSynthsForLive, kariCreateSynthsForLive, jaendelCreateSynthsForLive, + bergerCreatePatternsForLive, robinsonCreatePatternsForLive, penroseCreatePatternsForLive, ammannCreatePatternsForLive, kariCreatePatternsForLive, jaendelCreatePatternsForLive, + createTransportData, createTransportPattern, dir, group, berger, mixer, measureLengths, seqs, transportData, playbackData, tempoClock, player; + + c = Condition.new; + + hdpBusArray = 32.collect({Bus.audio(s, 1)}); + + Event.addEventType(\osc, { + if (~addr.postln.notNil) { + ~msg.postln; + //~addr.sendMsg(~path, *~msg); + ~addr.sendBundle(1, [~path] ++ ~msg); + }; + }); + + + //create synth defs + bergerCreateSynthsForLive = {var b; + // this creates a different waveform for each sonification of each part + Buffer.freeAll(s); + b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); + + SynthDef(\berger, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; + Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(0.05, sustain, 0.25, 0.1), gate, 1, 0, 1, doneAction: 2)); + }).add; }; -}); + robinsonCreateSynthsForLive = {var b; + Buffer.freeAll(s); + b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); -//create synth defs -~bergerCreateSynthsForLive = {var b; - // this creates a different waveform for each sonification of each part - Buffer.freeAll(s); - b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); + SynthDef(\robinson, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; + Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.sine(sustain + 0.01), gate, 1, 0, 1, doneAction: 2)); + }).add; + }; - SynthDef(\berger, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; - Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(0.05, sustain, 0.25, 0.1), gate, 1, 0, 1, doneAction: 2)); - }).add; -}; + penroseCreateSynthsForLive = {var b; + Buffer.freeAll(s); + b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); -~robinsonCreateSynthsForLive = {var b; - Buffer.freeAll(s); - b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); + SynthDef(\penrose_ins, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; + Out.ar(out /*10 + buf*/, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(1, sustain - 0.3, 0.7, 0.5), gate, 1, 0, 1, doneAction: 2)); + }).add; - SynthDef(\robinson, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; - Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.sine(sustain + 0.01), gate, 1, 0, 1, doneAction: 2)); - }).add; -}; + SynthDef(\penrose_fades, {arg subSeqLength, gate = 1, ins = 0, out = 0; + Out.ar(out, In.ar(10 + ins) * EnvGen.kr(Env.new([0.4, 0.8, 0.8, 0.4, 0], [3, subSeqLength - 6, 3, 0.1], \sine), gate, 1, 0, 1, doneAction: 2)); + }).add; + }; -~penroseCreateSynthsForLive = {var b; - Buffer.freeAll(s); - b = 8.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); + ammannCreateSynthsForLive = {var b; + Buffer.freeAll(s); + b = 6.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); - SynthDef(\penrose_ins, {arg freq, amp = 0.2, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; - Out.ar(out /*10 + buf*/, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(1, sustain - 0.3, 0.7, 0.5), gate, 1, 0, 1, doneAction: 2)); - }).add; + SynthDef(\ammann, {arg freq, amp, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; + Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(0.05, sustain, 0.5, 0.1), gate, 1, 0, 1, doneAction: 2)); + }).add; + }; - SynthDef(\penrose_fades, {arg subSeqLength, gate = 1, ins = 0, out = 0; - Out.ar(out, In.ar(10 + ins) * EnvGen.kr(Env.new([0.4, 0.8, 0.8, 0.4, 0], [3, subSeqLength - 6, 3, 0.1], \sine), gate, 1, 0, 1, doneAction: 2)); - }).add; -}; + kariCreateSynthsForLive = { + SynthDef(\kariEnsemble, {arg freq = 110, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0; + Out.ar(out, SinOsc.ar(freq, 0, 0.1) * + pow(EnvGen.kr(Env.sine(sustain, amp / 5), gate, 1, 0, 1, doneAction: 2), 0.5) * 0.25); + }).add; + + SynthDef(\kariBass, {arg freq = 110, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0; + Out.ar(out, SinOsc.ar(freq, 0, 0.1) * + EnvGen.kr(Env.adsr(1, dur - 1.3, 0.25, 0.3, 1), gate, doneAction: 2) * 1); + }).add; + + SynthDef(\kariNoise, {arg snd = 0, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0; + Out.ar(out, Select.ar(snd, [WhiteNoise.ar(0.5), DC.ar(0), BrownNoise.ar(0.7)]) * + EnvGen.kr(Env.asr(dur, amp / 5, 3), gate, doneAction: 2) * 0.3); + }).add; + }; -~ammannCreateSynthsForLive = {var b; - Buffer.freeAll(s); - b = 6.collect({var buf = Buffer.alloc(s, 512, 1); buf.sine1(1.0 / 5.collect({arg i; pow(i + 1, 5.0.rand + 1)}), true, true, true)}); + //sine tones for sonification + jaendelCreateSynthsForLive = { + SynthDef(\jaendel, {arg freq, col, attack, sustain, decay, del = 5, gate = 1, pan = 0, pIndex = 0; + var env; + env = EnvGen.kr(Env.new([0, 1, 1, 0], [attack, sustain, decay], \sin), 1, 1, 0, 1, doneAction: 2); + //color is mapped to panning similar to the score which maps to different ways of playing the same note + Out.ar(pIndex * 2, SinOsc.ar(freq, 0, (((col >= 1) * (col <= 1)) + (col >= 3)).lag(0.3) * env * 0.05)); + Out.ar(pIndex * 2 + 1, SinOsc.ar(freq, 0, (col >= 2).lag(0.3) * env * 0.05)); + }).add; + }; - SynthDef(\ammann, {arg freq, amp, del = 5, gate = 1, sustain = 1, buf = 0, out = 0; - Out.ar(out, Osc.ar(Select.kr(buf, b), freq, 0, amp) * EnvGen.kr(Env.adsr(0.05, sustain, 0.5, 0.1), gate, 1, 0, 1, doneAction: 2)); - }).add; -}; -~kariCreateSynthsForLive = { - SynthDef(\kariEnsemble, {arg freq = 110, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0; - Out.ar(out, SinOsc.ar(freq, 0, 0.1) * - pow(EnvGen.kr(Env.sine(sustain, amp / 5), gate, 1, 0, 1, doneAction: 2), 0.5) * 0.25); - }).add; + //create patterns + bergerCreatePatternsForLive = {arg seqs, group; + 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), + \group, group, + \buf, i, + \out, hdpBusArray[i], + //\freq, Pseq(55 * r[1]), + \freq, Pseq((55 * r[1]).cpsmidi.round(0.5).midicps), + \dur, Pseq(r[0]), + \sustain, Pseq(r[0]), + \amp, Pseq(r[2] / 1) //4) + ) + }); + }; - SynthDef(\kariBass, {arg freq = 110, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0; - Out.ar(out, SinOsc.ar(freq, 0, 0.1) * - EnvGen.kr(Env.adsr(1, dur - 1.3, 0.25, 0.3, 1), gate, doneAction: 2) * 1); - }).add; + robinsonCreatePatternsForLive = {arg seqs, group; + var pBinds; + pBinds = seqs[0].collect({arg r, i; + Pbind(\instrument, \robinson, + \buf, i, + \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) * 2) + ) + }); + }; - SynthDef(\kariNoise, {arg snd = 0, amp = 1, gate = 1, sustain = 1, dur = 1, out = 0; - Out.ar(out, Select.ar(snd, [WhiteNoise.ar(0.5), DC.ar(0), BrownNoise.ar(0.7)]) * - EnvGen.kr(Env.asr(dur, amp / 5, 3), gate, doneAction: 2) * 0.3); - }).add; -}; - -//sine tones for sonification -~jaendelCreateSynthsForLive = { - SynthDef(\jaendel, {arg freq, col, attack, sustain, decay, del = 5, gate = 1, pan = 0, pIndex = 0; - var env; - env = EnvGen.kr(Env.new([0, 1, 1, 0], [attack, sustain, decay], \sin), 1, 1, 0, 1, doneAction: 2); - //color is mapped to panning similar to the score which maps to different ways of playing the same note - Out.ar(pIndex * 2, SinOsc.ar(freq, 0, (((col >= 1) * (col <= 1)) + (col >= 3)).lag(0.3) * env * 0.05)); - Out.ar(pIndex * 2 + 1, SinOsc.ar(freq, 0, (col >= 2).lag(0.3) * env * 0.05)); - }).add; -}; - - -//create patterns -~bergerCreatePatternsForLive = {arg seqs, group; - 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), - \group, group, - \buf, i, - \out, ~hdpBusArray[i], - //\freq, Pseq(55 * r[1]), - \freq, Pseq((55 * r[1]).cpsmidi.round(0.5).midicps), - \dur, Pseq(r[0]), - \sustain, Pseq(r[0]), - \amp, Pseq(r[2] / 1) //4) - ) - }); -}; - -~robinsonCreatePatternsForLive = {arg seqs, group; - var pBinds; - seqs = File.readAllString((~dir +/+ "music_data" +/+ "robinson.txt").standardizePath).interpret; - pBinds = seqs[0].collect({arg r, i; - Pbind(\instrument, \robinson, - \buf, i, - \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) * 2) - ) - }); -}; - -~penroseCreatePatternsForLive = {arg seqs, group; - var finSeqs, finFades; - finSeqs = seqs[0].collect({arg r, i; - Pbind(\instrument, \penrose_ins, - \group, group, - \buf, i, - \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.25 /* * 0.125*/), - \sustain, Pseq(r[0] * 0.25 /* * 0.125*/), - \amp, Pseq(((r[2] * 0.25) / pow(1.5, ((i % 6) + 1)))) - ) - }); + penroseCreatePatternsForLive = {arg seqs, group; + var finSeqs, finFades; + finSeqs = seqs[0].collect({arg r, i; + Pbind(\instrument, \penrose_ins, + \group, group, + \buf, i, + \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.25 /* * 0.125*/), + \sustain, Pseq(r[0] * 0.25 /* * 0.125*/), + \amp, Pseq(((r[2] * 0.25) / pow(1.5, ((i % 6) + 1)))) + ) + }); - /* - finFades = seqs[2].collect({ arg r, i; + /* + finFades = seqs[2].collect({ arg r, i; Pbind(\instrument, \penrose_fades, - \group, group, - \out, ~hdpBusArray[i], - \dur, Pseq(r * 0.125), - \subSeqLength, Pseq(r * 0.125), - \ins, i + \group, group, + \out, hdpBusArray[i], + \dur, Pseq(r * 0.125), + \subSeqLength, Pseq(r * 0.125), + \ins, i ) - }); - */ - - finSeqs /*++ finFades*/; -}; - -~ammannCreatePatternsForLive = {arg seqs, group; - var finSeqs; - finSeqs = seqs.reverse.collect({arg r, i; - Pbind(\instrument, \ammann, - //\buf, Pseq((i - ((0..(r.slice(nil, 2).flat.size - 1)) / 10).trunc.asInteger) % 8), - \group, group, - \buf, i, - \out, ~hdpBusArray[i], - \freq, Pseq((55 * r.slice(nil, 2).flatten).cpsmidi.round(0.5).midicps), - \dur, Pseq(r.slice(nil, 0).flat), - - //this is a bit tricky it makes it so that each note goes to the next - //(ignoring the old sustain value) - //but the rests are kept to make it clear where the note falls in each measure - //for the transcriber - - \sustain, Pseq( - [r.slice(nil, 0).flat.drop(1).clump(2).size.collect({Rest(1)}), - r.slice(nil, 0).flat.drop(1).clump(2).collect({arg item; item.sum})].flop.flat - ), - - //\sustain, Pseq(r.slice(nil, 1).flat ), - \amp, Pseq(r.slice(nil, 3).flat /** 0.5*/) - ) - }); + }); + */ - finSeqs; -}; - -~kariCreatePatternsForLive = {arg dirs, group; - [ - Pbind(\instrument, \kariNoise, - \group, group, - \out, 0, - \dur, Pseq(dirs[0].slice(nil, 1) /* * 1.2*/), - \snd, Pseq(dirs[0].slice(nil, 0))), - Pbind(\instrument, \kariBass, - \group, group, - \out, 1, - \dur, Pseq(dirs[1].slice(nil, 1) /* * 1.2*/), - \freq, Pseq((dirs[1].slice(nil, 0).collect({arg elem; [Rest(0), 36.midicps, 43.midicps][elem]})))), - ] ++ - - dirs.drop(2).reverse.collect({arg row, i; - Pbind(\instrument, \kariEnsemble, - \group, group, - \out, i + 2, - \dur, Pseq(row.slice(nil, 1) /* * 1.2*/), - //\sustain, Pseq(row.slice(nil, 1) * 1.2), - \freq, Pseq(row.slice(nil, 0).collect({arg val; if(val == 5, {Rest(0)}, {(60 + (val.trunc * 7)).midicps})})), - \amp, 1)}) -}; - -~jaendelCreatePatternsForLive = {arg colors, version = 0 /*0 is full; 1 is reduced*/, startHarm = 1 /*must be odd*/, fund = 55, group; - //generate patterns - colors.collect({arg row, r; - var durUnit, del, eDur, start, stop, harms, fade, pIndex; - durUnit = 1 / 6; // 90 bpm - // 2 measures for full version, 1 for reduced version - del = if(version == 0, {(32 * (r % 16)) + (512 * (r / 16).asInteger)}, {(32 * (r % 8)) + (512 * (r / 8).asInteger)}); - pIndex = if(version == 0, {(r % 16)}, {(r % 8)}); - eDur = if(version == 0, {512 - 64}, {512 - 16}); // 32 - 4 measures for full version, 16 - 1 for reduced version - start = del - r; // this skews the tiling - stop = (start + eDur) - 1; - harms = ((0..(if(version == 0, {15}, {7}))) * 2).reverse + startHarm; - fade = if(version == 0, {64}, {64}); - Pmono(\jaendel, - \group, group, - \pIndex, pIndex, - \dur, Pseq([Rest(del * durUnit), Pseq([durUnit], inf)]), - \freq, fund * harms[r % if(version == 0, {16}, {8})], - \col, Pseq([0, Pseq(row[start..stop])]), - \attack, fade * durUnit, - \sustain, (eDur - (fade * 2)) * durUnit, - \decay, fade * durUnit, - ) - }); -}; + finSeqs /*++ finFades*/; + }; + ammannCreatePatternsForLive = {arg seqs, group; + var finSeqs; + finSeqs = seqs.reverse.collect({arg r, i; + Pbind(\instrument, \ammann, + //\buf, Pseq((i - ((0..(r.slice(nil, 2).flat.size - 1)) / 10).trunc.asInteger) % 8), + \group, group, + \buf, i, + \out, hdpBusArray[i], + \freq, Pseq((55 * r.slice(nil, 2).flatten).cpsmidi.round(0.5).midicps), + \dur, Pseq(r.slice(nil, 0).flat), + + //this is a bit tricky it makes it so that each note goes to the next + //(ignoring the old sustain value) + //but the rests are kept to make it clear where the note falls in each measure + //for the transcriber + + \sustain, Pseq( + [r.slice(nil, 0).flat.drop(1).clump(2).size.collect({Rest(1)}), + r.slice(nil, 0).flat.drop(1).clump(2).collect({arg item; item.sum})].flop.flat + ), + + //\sustain, Pseq(r.slice(nil, 1).flat ), + \amp, Pseq(r.slice(nil, 3).flat /** 0.5*/) + ) + }); -SynthDef(\mixer, {arg freq, gate = 1, sustain, amp, dur, out; - var nameSpaces, sigs; + finSeqs; + }; - sigs = [~hdpBusArray].collect({arg busArray, i; - var nameSpace, sig; - nameSpace = ['hdp'][i]; - sig = busArray.collect({arg bus, c; In.ar(bus, 1) * NamedControl.kr(\ ++ nameSpace ++ '_volume_' ++ c, 1, 0.1)}); - sig = sig.collect({arg channel, c; Pan2.ar(channel, NamedControl.kr(\ ++ nameSpace ++ '_pan_' ++ c, i / (busArray.size - 1), 0.1) * 2 - 1)}); - sig = sig.collect({arg channel, c; channel * NamedControl.kr(\ ++ nameSpace ++ '_mute_' ++ c, 1, 0.1)}); - sig = Mix.ar(sig) * pow(NamedControl.kr(\ ++ nameSpace ++ '_volume_master', 1, 0.5), 2); - }); + kariCreatePatternsForLive = {arg dirs, group; + [ + Pbind(\instrument, \kariNoise, + \group, group, + \out, 0, + \dur, Pseq(dirs[0].slice(nil, 1) /* * 1.2*/), + \snd, Pseq(dirs[0].slice(nil, 0))), + Pbind(\instrument, \kariBass, + \group, group, + \out, 1, + \dur, Pseq(dirs[1].slice(nil, 1) /* * 1.2*/), + \freq, Pseq((dirs[1].slice(nil, 0).collect({arg elem; [Rest(0), 36.midicps, 43.midicps][elem]})))), + ] ++ + + dirs.drop(2).reverse.collect({arg row, i; + Pbind(\instrument, \kariEnsemble, + \group, group, + \out, i + 2, + \dur, Pseq(row.slice(nil, 1) /* * 1.2*/), + //\sustain, Pseq(row.slice(nil, 1) * 1.2), + \freq, Pseq(row.slice(nil, 0).collect({arg val; if(val == 5, {Rest(0)}, {(60 + (val.trunc * 7)).midicps})})), + \amp, 1)}) + }; - sigs = Mix.ar(sigs / 6); - Out.ar(0, sigs) -}).add; + jaendelCreatePatternsForLive = {arg colors, version = 0 /*0 is full; 1 is reduced*/, startHarm = 1 /*must be odd*/, fund = 55, group; + //generate patterns + colors.collect({arg row, r; + var durUnit, del, eDur, start, stop, harms, fade, pIndex; + durUnit = 1 / 6; // 90 bpm + // 2 measures for full version, 1 for reduced version + del = if(version == 0, {(32 * (r % 16)) + (512 * (r / 16).asInteger)}, {(32 * (r % 8)) + (512 * (r / 8).asInteger)}); + pIndex = if(version == 0, {(r % 16)}, {(r % 8)}); + eDur = if(version == 0, {512 - 64}, {512 - 16}); // 32 - 4 measures for full version, 16 - 1 for reduced version + start = del - r; // this skews the tiling + stop = (start + eDur) - 1; + harms = ((0..(if(version == 0, {15}, {7}))) * 2).reverse + startHarm; + fade = if(version == 0, {64}, {64}); + Pmono(\jaendel, + \group, group, + \pIndex, pIndex, + \dur, Pseq([Rest(del * durUnit), Pseq([durUnit], inf)]), + \freq, fund * harms[r % if(version == 0, {16}, {8})], + \col, Pseq([0, Pseq(row[start..stop])]), + \attack, fade * durUnit, + \sustain, (eDur - (fade * 2)) * durUnit, + \decay, fade * durUnit, + ) + }); + }; -) -( + SynthDef(\mixer_old, {arg freq, gate = 1, sustain, amp, dur, out; + var nameSpaces, sigs; + + sigs = [hdpBusArray].collect({arg busArray, i; + var nameSpace, sig; + nameSpace = ['hdp'][i]; + sig = busArray.collect({arg bus, c; In.ar(bus, 1) * NamedControl.kr(\ ++ nameSpace ++ '_volume_' ++ c, 1, 0.1)}); + sig = sig.collect({arg channel, c; Pan2.ar(channel, NamedControl.kr(\ ++ nameSpace ++ '_pan_' ++ c, i / (busArray.size - 1), 0.1) * 2 - 1)}); + sig = sig.collect({arg channel, c; channel * NamedControl.kr(\ ++ nameSpace ++ '_mute_' ++ c, 1, 0.1)}); + sig = Mix.ar(sig) * pow(NamedControl.kr(\ ++ nameSpace ++ '_volume_master', 1, 0.5), 2); + }); + + sigs = Mix.ar(sigs / 6); + Out.ar(0, sigs) + }).add; + + SynthDef(\mixer, { + var sig; + + sig = hdpBusArray.collect({arg bus, index; In.ar(bus, 1) * NamedControl.kr(\volume_ ++ index, 0.75, 0.1)}); + sig = sig.collect({arg channel, index; Pan2.ar(channel, NamedControl.kr(\pan_ ++ index, 0.5, 0.1) * 2 - 1)}); + sig = sig.collect({arg channel, index; channel * NamedControl.kr(\mute_ ++ index, 1, 0.1)}); + sig = Mix.ar(sig) * pow(NamedControl.kr(\volume_master, 0.75, 0.5), 2); + + Out.ar(0, sig) + }).add; + + s.sync(c); + + dir = thisProcess.nowExecutingPath.dirname; + + createTransportData = {arg measureLengths; + measureLengths.collect({arg dur, measure; + var beats; + if(dur.round(0.5) % 1 == 0, { + dur.asInteger.collect({arg beat; + [measure + 1, beat + 1, 1] + }) + }, { + var eigths, beatDurs; + eigths = (dur / 0.5).round(0.5).asInteger; + beatDurs = case + {eigths <= 3} {[dur]} + {eigths == 5} {[1, 1.5]} + {eigths == 7} {[1, 1, 1.5]} + {eigths == 9} {[1, 1, 1, 1.5]} + {eigths == 11} {[1, 1, 1, 1, 1.5]} + {eigths == 13} {[1, 1, 1, 1, 1, 1.5]} + {eigths == 15} {[1, 1, 1, 1, 1, 1, 1.5]}; + + beatDurs.collect({arg bDur, beat; + [measure + 1, beat + 1, bDur] + }) + }); + }).flatten; + }; -var createTransportData, createTransportPattern, group, berger, mixer, measureLengths, seqs, transportData, playbackData, tempoClock, player; + createTransportPattern = {arg addr, transportData; + Pbind( + \type, \osc, + \addr, addr, + \path, "/playing", + \msg, Pseq(8.collect({arg i; ["-", (i % 4) + 1]}) ++ transportData.collect({arg item; [item[0], item[1]]}), 1), + \dur, Pseq(8.collect({arg i; 1}) ++ transportData.collect({arg item; item[2]}), 1), + ); + }; + + bergerCreateSynthsForLive.value; + robinsonCreateSynthsForLive.value; + penroseCreateSynthsForLive.value; + ammannCreateSynthsForLive.value; + kariCreateSynthsForLive.value; + jaendelCreateSynthsForLive.value; + + group = Group.new; + berger = Synth.tail(group, \berger); + mixer = Synth.tail(group, \mixer); + + playbackData = Dictionary.new(n: 6); + + seqs = File.readAllString((dir +/+ "music_data" +/+ "berger.txt").standardizePath).interpret; + measureLengths = seqs[0][6]; + playbackData.add(\berger -> [bergerCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); + + seqs = File.readAllString((dir +/+ "music_data" +/+ "robinson.txt").standardizePath).interpret; + 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; + measureLengths = seqs[1].sum.collect({4}); + playbackData.add(\penrose -> [penroseCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); + + seqs = File.readAllString((dir +/+ "music_data" +/+ "ammann.txt").standardizePath).interpret; + measureLengths = seqs[0].collect({arg item; item[0].sum}); + playbackData.add(\ammann -> [ammannCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); + + seqs = File.readAllString((dir +/+ "music_data" +/+ "kari.txt").standardizePath).interpret; + measureLengths = seqs[0].collect({arg item; item.last}).flatten; + playbackData.add(\kari -> [kariCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); + + seqs = File.readAllString((dir +/+ "music_data" +/+ "jaendel.txt").standardizePath).interpret; + measureLengths = 284.collect({4}); + playbackData.add(\jaendel -> [jaendelCreatePatternsForLive.value(seqs, 0, 1, 55, group), createTransportData.value(measureLengths), measureLengths]); -~dir = thisProcess.nowExecutingPath.dirname; -createTransportData = {arg measureLengths; - measureLengths.collect({arg dur, measure; - var beats; - if(dur.round(0.5) % 1 == 0, { - dur.asInteger.collect({arg beat; - [measure + 1, beat + 1, 1] - }) + OSCdef(\mixer, {arg msg, time, addr, port; + [msg, time, addr, port].postln; + if(msg[1] != "volume_master", { + mixer.set((msg[1] ++ '_' ++ msg[2]), msg[3]) }, { - var eigths, beatDurs; - eigths = (dur / 0.5).round(0.5).asInteger; - beatDurs = case - {eigths <= 3} {[dur]} - {eigths == 5} {[1, 1.5]} - {eigths == 7} {[1, 1, 1.5]} - {eigths == 9} {[1, 1, 1, 1.5]} - {eigths == 11} {[1, 1, 1, 1, 1.5]} - {eigths == 13} {[1, 1, 1, 1, 1, 1.5]} - {eigths == 15} {[1, 1, 1, 1, 1, 1, 1.5]}; - - beatDurs.collect({arg bDur, beat; - [measure + 1, beat + 1, bDur] - }) + mixer.set(msg[1], msg[2]) }); - }).flatten; -}; - -createTransportPattern = {arg addr, transportData; - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(transportData.collect({arg item; [item[0], item[1]]}), 1), - \dur, Pseq(transportData.collect({arg item; item[2]}), 1), - ); -}; - -~bergerCreateSynthsForLive.value; -~robinsonCreateSynthsForLive.value; -~penroseCreateSynthsForLive.value; -~ammannCreateSynthsForLive.value; -~kariCreateSynthsForLive.value; -~jaendelCreateSynthsForLive.value; - -group = Group.new; -berger = Synth.tail(group, \berger); -mixer = Synth.tail(group, \mixer); - -playbackData = Dictionary.new(n: 6); - -seqs = File.readAllString((~dir +/+ "music_data" +/+ "berger.txt").standardizePath).interpret; -measureLengths = seqs[0][6]; -playbackData.add(\berger -> [~bergerCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); - -seqs = File.readAllString((~dir +/+ "music_data" +/+ "robinson.txt").standardizePath).interpret; -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; -measureLengths = seqs[1].sum.collect({4}); -playbackData.add(\penrose -> [~penroseCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); - -seqs = File.readAllString((~dir +/+ "music_data" +/+ "ammann.txt").standardizePath).interpret; -measureLengths = seqs[0].collect({arg item; item[0].sum}); -playbackData.add(\ammann -> [~ammannCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); - -seqs = File.readAllString((~dir +/+ "music_data" +/+ "kari.txt").standardizePath).interpret; -~seqs = seqs; -measureLengths = seqs[0].collect({arg item; item.last}).flatten; -playbackData.add(\kari -> [~kariCreatePatternsForLive.value(seqs, group), createTransportData.value(measureLengths), measureLengths]); - -seqs = File.readAllString((~dir +/+ "music_data" +/+ "jaendel.txt").standardizePath).interpret; -measureLengths = 284.collect({4}); -playbackData.add(\jaendel -> [~jaendelCreatePatternsForLive.value(seqs, 0, 1, 55, group), createTransportData.value(measureLengths), measureLengths]); - - -OSCdef(\mixer, {arg msg, time, addr, port; - [msg, time, addr, port].postln; - mixer.set((msg[1] ++ '_' ++ msg[2] ++ '_' ++ msg[3]), msg[4]) -}, \mixer); - -OSCdef(\transport, {arg msg, time, addr, port; - [msg, time, addr, port].postln; - if(msg[1] == 0, { - //need some work here to make sure all synths are getting cutoff correctly - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - var pbinds, transportData, measureLengths, patterns, stream, offset, offsetStream, terminationStream; - # pbinds, transportData, measureLengths = playbackData[msg[2]]; - patterns = Ppar(pbinds.postln.add(createTransportPattern.value(addr, transportData).postln)); - - stream = patterns.asStream; - offset = stream.fastForward(measureLengths.keep(msg[3].asInteger - 1).sum); - - offsetStream = Routine({offset.wait}); - terminationStream = Routine({addr.sendMsg("/transport", 0)}); - - player = EventStreamPlayer(offsetStream ++ stream ++ terminationStream); - tempoClock = TempoClock(msg[5]/60.0); - player.play(tempoClock); - //player.play(tempoClock, quant: Quant.new(0, 0, -2)); - }); -}, \transport); + }, \mixer); + + OSCdef(\transport, {arg msg, time, addr, port; + [msg, time, addr, port].postln; + if(msg[1] == 0, { + //need some work here to make sure all synths are getting cutoff correctly + group.set(\release, 2); + group.set(\gate, 0); + player.stop; + }, { + var pbinds, transportData, measureLengths, patterns, stream, offset, offsetStream, terminationStream; + # pbinds, transportData, measureLengths = playbackData[msg[2]]; + //patterns = Ppar(pbinds.postln.add(createTransportPattern.value(addr, transportData).postln)); + patterns = Ptpar([0, createTransportPattern.value(addr, transportData), 9, Ppar(pbinds)]); + + stream = patterns.asStream; + if(msg[3] == 1, { + offset = stream.fastForward(measureLengths.keep(msg[3].asInteger - 1).sum); + }, { + offset = stream.fastForward(measureLengths.keep(msg[3].asInteger - 1).sum + 8); + }); + + offsetStream = Routine({offset.wait}); + terminationStream = Routine({addr.sendMsg("/transport", 0)}); + + player = EventStreamPlayer(offsetStream ++ stream ++ terminationStream); + tempoClock = TempoClock(msg[5]/60.0); + player.play(tempoClock); + //player.play(tempoClock, quant: Quant.new(0, 0, -2)); + }); + }, \transport); + "ready".postln; +}); +appEnvironment.pop; ) /* @@ -375,13 +408,3 @@ TODOs: ~bergerMusic[0][6].collect({arg beats, measure; beats.asInteger.collect({arg beat; [measure + 1, beat + 1]})}).flatten; */ -~seqs[7] -[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