-
Notifications
You must be signed in to change notification settings - Fork 0
/
LAS.json
247 lines (247 loc) · 13.1 KB
/
LAS.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
{
"createdWith": "Open Stage Control",
"version": "1.26.1",
"type": "session",
"content": {
"type": "root",
"lock": false,
"id": "root",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"colorText": "#ffffff",
"colorWidget": "#282928",
"alphaFillOn": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "#282928",
"layout": "default",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"hideMenu": true,
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [
{
"type": "button",
"lock": false,
"id": "SelectedTrack",
"comments": "",
"value": "OSC{/trkName,0}",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"top": "2.5%",
"left": "2%",
"visible": true,
"interaction": false,
"width": "70%",
"height": "10%",
"expand": "false",
"colorText": "auto",
"colorWidget": "#4d4d4e",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": 1,
"alphaFillOn": 1,
"lineWidth": 0,
"borderRadius": 0,
"padding": 0,
"html": "<!-- div> Test Message </div>",
"css": "\nfont-family:\"Helvetica\"; font-size: 220%; text-shadow: .1em .1em .1em #1b1b1b; border-radius:.3em; \n",
"colorTextOn": "auto",
"label": "OSC{/trkName,\"\"}",
"vertical": false,
"wrap": false,
"on": 1,
"off": 0,
"mode": "toggle",
"doubleTap": false,
"decoupled": false
},
{
"type": "switch",
"top": "15%",
"left": "2%",
"lock": false,
"id": "LAS",
"visible": true,
"interaction": true,
"comments": "v1.2",
"width": "96%",
"height": "83%",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "OSC{/alphaFillOff,0.7}",
"alphaFillOn": "OSC{/alphaFillOn,0.5}",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "<div style='font-size:100%; text-align:left; line-height:130%;'>\n <p style=\"text-align:center; -webkit-text-size-adjust:none; text-size-adjust:none;\">OSC{/message0,\"\"}OSC{/message1,\"\"}OSC{/message2,\"\"}OSC{/message3,\"\"}OSC{/message4,\"\"}OSC{/message5,\"\"}OSC{/message6,\"\"}OSC{/message7,\"\"}OSC{/message8,\"\"}OSC{/message9,\"\"}OSC{/message10,\"\"}</p>\n <!--div>Debug: /switchesObjectArray:OSC{/switchesObjectArray,0}\n </br>Debug: /trkName:OSC{/trkName,0} | /picName:OSC{/picName,0} | /artNewInt:OSC{/artNewInt,0} | /g_midiCh:OSC{/g_midiCh,0} | /g_octaveOffset:OSC{/g_octaveOffset,0} | /alphaFillOff:OSC{/alphaFillOff,\"\"}\n </br>Debug: /artColors:OSC{/artColors,0}\n </br>Debug: /artList:OSC{/artList,0}\n </br>Debug: /artMode:OSC{/artMode,0}\n </div-->\n</div>",
"css": "\nJS{{\nvar colRAW = OSC{/artColors,0}\n//console.log(colRAW);\nvar colors=colRAW.split(\",\");\n//console.log(colors);\n\nvar css = 'value {border-radius:.3em; font-family:\"Helvetica\"; font-size:160%; line-height:1.25; border:1px solid #000000; text-shadow: .1em .1em .1em #1b1b1b; }\\n'\nfor (var i = 0; i <= colors.length; i++) {\n css += \"value:nth-child(\" + (i) + \"){border-radius:.3em; --color-fill:\" + colors[i-1] + \"; font-size:160%; border:1px solid #000000; text-shadow:.1em .1em .1em #1b1b1b; }\\n\"\n css += \"value.on:nth-child(\" + (i) + \"){border-radius:.3em; --color-fill:\" + colors[i-1] + \"; font-size:160%; border:1px solid #ffffff; text-shadow: .1em .1em .1em #1b1b1b; color: #ffffff; }\\n\"\n}\n\n//style single active state\nvar curArt = OSC{/artNewInt,0}\n//console.log(curArt);\n\ncss += \"value:nth-child(\" + curArt + \"){border-radius:.3em; background-color: var(--color-fill); border:1px solid #ffffff; font-size:160%; text-shadow: .1em .1em .1em #1b1b1b; }\\n\"\ncss += \".marquee {-webkit-text-size-adjust:none;text-size-adjust:none;position: absolute;height: 100%;width:100%;margin: 0;text-align: left;-moz-transform: translateX(50%);-webkit-transform: translateX(50%);transform: translateX(50%);-moz-animation: bouncing-text 3s linear infinite alternate;-webkit-animation: bouncing-text 3s linear infinite alternate;animation: bouncing-text 10s linear infinite alternate;}@-moz-keyframes bouncing-text {0% {-moz-transform: translateX(50%);}100% {-moz-transform: translateX(-50%);}}@-webkit-keyframes bouncing-text {0% {-webkit-transform: translateX(50%);}100% {-webkit-transform: translateX(-50%);}}@keyframes bouncing-text {0% {-moz-transform: translateX(50%);-webkit-transform: translateX(50%);transform: translateX(50%);}100% {-moz-transform: translateX(-50%);-webkit-transform: translateX(-50%);transform: translateX(-50%);}}\\n\"\n\nreturn css\n}}\n\n",
"value": -1,
"default": 0,
"linkId": "",
"address": "auto",
"preArgs": "",
"target": "",
"onCreate": "",
"onValue": "// send button number to MidiPipe for editing articulation on\n// individual notes in Logic's piano roll via UI AppleScript\nvar midiPipeChannel = 16\nvar midiPipecc = 110\nvar buttonNumber\nvar values = getProp(this, 'values')\nif (Array.isArray(values)) {\n // if values is written as an array ([\"a\", \"b\"])\n buttonNumber = values.indexOf(value)\n} else {\n // if values is written as an object ({\"label a\": \"a\", \"label b\": \"b\"})\n // +3 to bring 0 index to start at 3 for Logic menu UI (1:\"-\", 2:divider line)\n buttonNumber = Object.values(values).indexOf(value) + 3\n}\n//console.log('value pressed buttonNumber ' + buttonNumber)\nsend('midi:OSC-Midi', '/control', midiPipeChannel, midiPipecc, buttonNumber)\n\n\n\n\n// switch's onValue property\n// since the message is sent here we could set bypass to true\n// to prevent sending the default messages based on\n// address, preArgs and target\n\n// send midi switches to Logic\n// set switches to come from either the Switches or Output tabs in Logis's articulation switcher\nvar artMode = JSON.parse(get('artMode'))\n\n// lookup additional properties tied to value\nvar oscObj = JSON.parse(get('switchesObjectArray'))\n//console.log('type: ' + typeof oscObj)\nvar type = oscObj[value][0]\n//console.log(type)\nvar selector = oscObj[value][1]\n//console.log(selector)\nvar valueStart = oscObj[value][2]\n//console.log(valueStart)\nvar outputType = oscObj[value][3]\n//console.log(outputType)\nvar outputSelector = oscObj[value][4]\n//console.log(outputSelector)\nvar outputValueStart = oscObj[value][5]\n//console.log(outputValueStart)\n\n// get global properties from artSet.plist\nvar g_channel = get('g_midiCh')\n//console.log(g_channel)\n//var g_octaveOffset = get('g_octaveOffset')\n//console.log(g_octaveOffset)\n\nif (artMode === 0) {\n // send proper switch to Logic\n if (type === 'Note On') { //NoteOn in Logic Studio instruments\n if (valueStart === null) { //Babylon Waves note on arts don't set values\n send('midi:OSC-Midi', '/note', g_channel, selector, 127)\n } else {\n send('midi:OSC-Midi', '/note', g_channel, selector, valueStart)\n }\n send('midi:OSC-Midi', '/note', g_channel, selector, 0)\n } else if (outputType === 'Controller') {\n send('midi:OSC-Midi', '/control', g_channel, selector, valueStart)\n } else if (outputType === 'Poly Aftertouch') { //pressure is legacy name\n send('midi:OSC-Midi', '/key_pressure', g_channel, selector, valueStart)\n } else if (type === 'Program') {\n send('midi:OSC-Midi', '/program', g_channel, (valueStart - 1)) //-1 since Logic value 0 based\n } else if (type === 'Pitch Bend') {\n send('midi:OSC-Midi', '/pitch', g_channel, valueStart)\n } else if (type === 'Aftertouch') {\n send('midi:OSC-Midi', '/channel_pressure', g_channel, valueStart)\n } else if (type === 'Note Off') {\n send('midi:OSC-Midi', '/note_off', g_channel, selector, 0)\n //} else if (type === 'Velocity') {\n //send('midi:OSC-Midi', '/???', g_channel, valueStart)\n }\n} else if (artMode === 1) {\n // send proper switch to Logic\n if (outputType === 'Note On') { //NoteOn in Logic Studio instruments\n if (outputValueStart === null) { //Babylon Waves note on arts don't set values\n } else {\n send('midi:OSC-Midi', '/note', g_channel, outputSelector, outputValueStart)\n }\n send('midi:OSC-Midi', '/note', g_channel, outputSelector, 0)\n } else if (outputType === 'Controller') {\n send('midi:OSC-Midi', '/control', g_channel, outputSelector, outputValueStart)\n } else if (outputType === 'Poly Aftertouch') { //pressure is legacy name\n send('midi:OSC-Midi', '/key_pressure', g_channel, outputSelector, outputValueStart)\n } else if (type === 'Program') {\n send('midi:OSC-Midi', '/program', g_channel, (outputValueStart - 1)) //-1 since Logic value 0 based\n } else if (type === 'Pitch Bend') {\n send('midi:OSC-Midi', '/pitch', g_channel, outputValueStart)\n } else if (type === 'Aftertouch') {\n send('midi:OSC-Midi', '/channel_pressure', g_channel, outputValueStart)\n } else if (type === 'Note Off') {\n send('midi:OSC-Midi', '/note_off', g_channel, outputSelector, 0)\n //} else if (type === 'Velocity') {\n //send('midi:OSC-Midi', '/???', g_channel, valueStart)\n }\n}\n\n// enable multiple taps\nsetTimeout(reset, 500)\nfunction reset() {\n set(\"this\", -1, {send:false})\n}",
"layout": "grid",
"gridTemplate": 4,
"typeTags": "",
"decimals": 2,
"ignoreDefaults": false,
"bypass": false,
"colorTextOn": 7,
"wrap": "soft",
"values": "OSC{/artList,0}",
"mode": "tap"
},
{
"type": "image",
"lock": false,
"id": "LibPics",
"comments": "",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"target": "",
"onCreate": "",
"onValue": "",
"top": "1%",
"left": "73%",
"visible": true,
"interaction": true,
"width": "25%",
"height": "13%",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": 0,
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "\nJS{{\n var picName = OSC{/picName,0}\n var css = 'background-image:url(\"./LibPics/' + picName + '.png\"), url(\"./LibPics/' + picName + '.jpg\"), url(\"./LibPics/missing.png\"); height:100%; background-position:center; background-repeat:no-repeat; background-size:contain; \\n'\n //console.log(css);\nreturn css\n}}\n\n",
"size": "contain",
"position": "center",
"repeat": "no-repeat",
"cache": false
},
{
"type": "variable",
"lock": false,
"id": "g_midiCh",
"comments": "0-15",
"value": "OSC{/g_midiCh, 0}",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
},
{
"type": "variable",
"lock": false,
"id": "g_octaveOffset",
"comments": "",
"value": "OSC{/g_octaveOffset,0}",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
},
{
"type": "variable",
"lock": false,
"id": "switchesObjectArray",
"comments": "",
"value": "OSC{/switchesObjectArray,0}",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
},
{
"type": "variable",
"lock": false,
"id": "artMode",
"comments": "",
"value": "OSC{/artMode,0}",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
}
],
"tabs": [],
"tabsPosition": "top",
"onPreload": ""
}
}