examples: update

This commit is contained in:
jean-emmanuel 2019-04-02 09:37:23 +02:00
parent 675cfc3cdd
commit 0c961bce3c
5 changed files with 3203 additions and 3151 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,156 +1,168 @@
[
{
"type": "root",
"tabs": [
{
"type": "tab",
"id": "tab_1",
"label": "auto",
"color": "auto",
"css": "",
"layout": "",
"spacing": 0,
"value": "",
"precision": 0,
"address": "/tab_1",
"preArgs": [],
"target": [],
"variables": "@{parent.variables}",
"widgets": [
{
"type": "keys",
"top": 300,
"left": 0,
"id": "keys_1",
"width": "auto",
"height": "auto",
"label": "auto",
"color": "auto",
"css": "",
"binding": [
"r",
"f"
],
"keydown": "#{\nx = key == \"r\" ? 0.1 : -0.1;\n@{fader_1} + x\n}",
"repeat": true,
"keyup": "",
"linkId": ">> A"
{
"type": "root",
"tabs": [
{
"type": "tab",
"id": "tab_1",
"label": "auto",
"color": "auto",
"css": "",
"value": "",
"precision": 0,
"address": "/tab_1",
"preArgs": [],
"target": [],
"variables": "@{parent.variables}",
"widgets": [
{
"type": "keys",
"top": 300,
"left": 0,
"id": "keys_1",
"width": "auto",
"height": "auto",
"label": "auto",
"color": "auto",
"css": "",
"binding": [
"r",
"f"
],
"keydown": "#{\nx = key == \"r\" ? 0.1 : -0.1;\n@{fader_1} + x\n}",
"repeat": true,
"keyup": "",
"linkId": ">> A",
"default": "",
"value": "",
"precision": 2,
"address": "/keys_1",
"preArgs": "",
"target": "",
"bypass": false
},
{
"type": "fader",
"top": 0,
"left": 0,
"id": "fader_1",
"linkId": "<< A",
"width": "auto",
"height": "auto",
"label": "auto",
"color": "auto",
"css": "",
"horizontal": false,
"alignRight": false,
"pips": true,
"input": true,
"meter": false,
"compact": false,
"dashed": false,
"snap": false,
"spring": false,
"doubleTap": false,
"range": {
"min": 0,
"max": 1
},
{
"type": "fader",
"top": 0,
"left": 0,
"id": "fader_1",
"linkId": "<< A",
"width": "auto",
"height": "auto",
"label": "auto",
"color": "auto",
"css": "",
"horizontal": false,
"alignRight": false,
"pips": true,
"input": true,
"meter": false,
"compact": false,
"dashed": false,
"snap": false,
"spring": false,
"doubleTap": false,
"range": {
"min": 0,
"max": 1
},
"logScale": false,
"unit": "",
"origin": "auto",
"value": "",
"precision": 2,
"address": "/fader_1",
"touchAddress": "",
"meterAddress": "",
"preArgs": [],
"target": [],
"default": "",
"bypass": false
"logScale": false,
"unit": "",
"origin": "auto",
"value": "",
"precision": 2,
"address": "/fader_1",
"touchAddress": "",
"meterAddress": "",
"preArgs": [],
"target": [],
"default": "",
"bypass": false,
"steps": ""
},
{
"type": "xy",
"top": 50,
"left": 170,
"id": "xy_1",
"linkId": "<< B",
"width": 210,
"height": 220,
"label": "auto",
"color": "auto",
"css": "",
"input": true,
"pips": true,
"pointSize": 20,
"snap": false,
"spring": false,
"doubleTap": false,
"rangeX": {
"min": 0,
"max": 1
},
{
"type": "xy",
"top": 50,
"left": 170,
"id": "xy_1",
"linkId": "<< B",
"width": 210,
"height": 220,
"label": "auto",
"color": "auto",
"css": "",
"input": true,
"pips": true,
"pointSize": 20,
"snap": false,
"spring": false,
"doubleTap": false,
"rangeX": {
"min": 0,
"max": 1
},
"rangeY": {
"min": 0,
"max": 1
},
"logScaleX": false,
"logScaleY": false,
"value": "",
"precision": 2,
"address": "/xy_1",
"touchAddress": "",
"preArgs": [],
"split": false,
"target": [],
"default": "",
"bypass": false
"rangeY": {
"min": 0,
"max": 1
},
{
"type": "keys",
"top": 270,
"left": 170,
"id": "keys_2",
"width": 210,
"height": "auto",
"label": "auto",
"color": "auto",
"css": "",
"binding": [
"g",
"t"
],
"keydown": "#{\nx = key == \"t\" ? 0.1 : -0.1;\n@{xy_1}[0] + x\n@{xy_1}[1] + x\n}",
"keyup": "",
"repeat": false,
"linkId": ">> B"
}
],
"tabs": [],
"linkId": "",
"default": "",
"bypass": false,
"scroll": true
}
],
"color": "auto",
"css": "",
"value": "",
"precision": 0,
"address": "/root",
"preArgs": [],
"target": [],
"variables": {},
"id": "root",
"linkId": "",
"default": "",
"bypass": false,
"scroll": true,
"label": false
}
]
"logScaleX": false,
"logScaleY": false,
"value": "",
"precision": 2,
"address": "/xy_1",
"touchAddress": "",
"preArgs": [],
"split": false,
"target": [],
"default": "",
"bypass": false
},
{
"type": "keys",
"top": 270,
"left": 170,
"id": "keys_2",
"width": 210,
"height": "auto",
"label": "auto",
"color": "auto",
"css": "",
"binding": [
"g",
"t"
],
"keydown": "#{\nx = key == \"t\" ? 0.1 : -0.1;\n@{xy_1}[0] + x\n@{xy_1}[1] + x\n}",
"keyup": "",
"repeat": false,
"linkId": ">> B",
"default": "",
"value": "",
"precision": 2,
"address": "/keys_2",
"preArgs": "",
"target": "",
"bypass": false
}
],
"tabs": [],
"linkId": "",
"default": "",
"bypass": false,
"scroll": true
}
],
"color": "auto",
"css": "",
"value": "",
"precision": 0,
"address": "/root",
"preArgs": [],
"target": [],
"variables": {},
"id": "root",
"linkId": "",
"default": "",
"bypass": false,
"traversing": false,
"scroll": true,
"label": false
}

View file

@ -1,89 +1,88 @@
[
{
"type": "root",
"tabs": [
{
"type": "tab",
"id": "tab_1",
"linkId": "",
"label": "Rgb Levels",
"color": "auto",
"css": "",
"layout": "",
"spacing": 0,
"default": "",
"value": "",
"precision": 0,
"address": "/tab_1",
"preArgs": [],
"target": [],
"bypass": false,
"variables": "@{parent.variables}",
"widgets": [
{
"type": "svg",
"top": 150,
"left": 0,
"id": "rgb_svg",
"linkId": "",
"width": "100%",
"height": 190,
"label": "auto",
"color": "auto",
"css": "path {\n fill:none;\n stroke-width:3rem\n}",
"svg": "#{\n\n# build the data array\n# [ [r,g,b], [r,g,b], [r,g,b], etc ]\ndata = @{rgb_matrix};\n\n# extract channels and convert to relative y-axis coordinates\n# assuming the y-range is 0-255\n# 96 - val * 94 for padding and y-axis reversal\n# we add a small offset to make sure the 3 lines are always visible\n\nred = 96 - flatten(data[0:end,0]) / 255 * 94 + 2;\ngreen = 96 - flatten(data[0:end,1]) / 255 * 94;\nblue = 96 - flatten(data[0:end,2]) / 255 * 94 - 2;\n\n# build the x-axis relative coordinates array\n\nlength = size(red)[0]\nxaxis = (0:length) / (length-1) * 100;\n\n\n# convert coords to svg path string\nsvgCoords(color) = map(color, f(c,i)=print(\"L$0%x $1%y\", [xaxis[i], c]));\n\n# svg path first command must be \"M\", not \"L\" \nsvgString(color) = concat(\"M\", unpack(svgCoords(color))[1:end]);\n\n}\n\n\n<path stroke=\"red\" d=\"#{svgString(red)}\" />\n<path stroke=\"lime\" d=\"#{svgString(green)}\" />\n<path stroke=\"blue\" d=\"#{svgString(blue)}\" />",
"preArgs": [],
"address": "/rgb_svg"
{
"type": "root",
"tabs": [
{
"type": "tab",
"id": "tab_1",
"linkId": "",
"label": "Rgb Levels",
"color": "auto",
"css": "",
"default": "",
"value": "",
"precision": 0,
"address": "/tab_1",
"preArgs": [],
"target": [],
"bypass": false,
"variables": "@{parent.variables}",
"widgets": [
{
"type": "svg",
"top": 150,
"left": 0,
"id": "rgb_svg",
"linkId": "",
"width": "100%",
"height": 190,
"label": "auto",
"css": "path {\n fill:none;\n stroke-width:3rem\n}",
"svg": "#{\n\n# build the data array\n# [ [r,g,b], [r,g,b], [r,g,b], etc ]\ndata = @{rgb_matrix};\n\n# extract channels and convert to relative y-axis coordinates\n# assuming the y-range is 0-255\n# 96 - val * 94 for padding and y-axis reversal\n# we add a small offset to make sure the 3 lines are always visible\n\nred = 96 - flatten(data[0:end,0]) / 255 * 94 + 2;\ngreen = 96 - flatten(data[0:end,1]) / 255 * 94;\nblue = 96 - flatten(data[0:end,2]) / 255 * 94 - 2;\n\n# build the x-axis relative coordinates array\n\nlength = size(red)[0]\nxaxis = (0:length) / (length-1) * 100;\n\n\n# convert coords to svg path string\nsvgCoords(color) = map(color, f(c,i)=print(\"L$0%x $1%y\", [xaxis[i], c]));\n\n# svg path first command must be \"M\", not \"L\" \nsvgString(color) = concat(\"M\", unpack(svgCoords(color))[1:end]);\n\n}\n\n\n<path stroke=\"red\" d=\"#{svgString(red)}\" />\n<path stroke=\"lime\" d=\"#{svgString(green)}\" />\n<path stroke=\"blue\" d=\"#{svgString(blue)}\" />",
"preArgs": [],
"address": "/rgb_svg",
"default": "",
"value": ""
},
{
"type": "matrix",
"top": 0,
"left": 0,
"id": "rgb_matrix",
"width": "100.60%",
"height": 150,
"label": "auto",
"color": "auto",
"css": "",
"widgetType": "rgb",
"matrix": [
8,
1
],
"start": 0,
"spacing": 0,
"traversing": false,
"props": {
"input": false,
"label": false
},
{
"type": "matrix",
"top": 0,
"left": 0,
"id": "rgb_matrix",
"width": "100.60%",
"height": 150,
"label": "auto",
"color": "auto",
"css": "",
"widgetType": "rgb",
"matrix": [
8,
1
],
"start": 0,
"spacing": 0,
"traversing": false,
"borders": false,
"props": {
"input": false,
"label": false
},
"default": "",
"value": "",
"precision": 2,
"address": "/matrix_1",
"preArgs": [],
"target": [],
"bypass": false
}
],
"tabs": [],
"scroll": true
}
],
"id": "root",
"linkId": "",
"color": "auto",
"css": "",
"default": "",
"value": "",
"precision": 0,
"address": "/root",
"preArgs": [],
"target": [],
"bypass": false,
"variables": {},
"scroll": true,
"label": false
}
]
"default": "",
"value": "",
"precision": 2,
"address": "/matrix_1",
"preArgs": [],
"target": [],
"bypass": false,
"linkId": "",
"border": true
}
],
"tabs": [],
"scroll": true
}
],
"id": "root",
"linkId": "",
"color": "auto",
"css": "",
"default": "",
"value": "",
"precision": 0,
"address": "/root",
"preArgs": [],
"target": [],
"bypass": false,
"variables": {},
"traversing": false,
"scroll": true,
"label": false
}

View file

@ -1,90 +1,102 @@
[
{
"type": "root",
"tabs": [
{
"type": "root",
"tabs": [
{
"type": "tab",
"id": "tab_1",
"label": "Sysex Example",
"color": "auto",
"css": "",
"layout": "",
"spacing": 0,
"value": "",
"precision": 0,
"address": "/tab_1",
"preArgs": [],
"target": [],
"variables": "@{parent.variables}",
"widgets": [
{
"type": "push",
"top": 10,
"left": 20,
"id": "push_1",
"linkId": "",
"width": 200,
"height": "auto",
"label": "Send Device Inquiry",
"color": "auto",
"css": "",
"on": "f0 7e 7f 06 01 f7",
"norelease": true,
"precision": 0,
"address": "/sysex",
"target": [
"midi:osc"
],
"preArgs": [],
"off": 0
},
{
"type": "text",
"top": 80,
"left": 20,
"id": "text_1",
"width": 200,
"height": 60,
"label": "Device Inquiry Response",
"color": "auto",
"css": "",
"widgetId": "",
"vertical": false,
"preArgs": [],
"address": "/sysex",
"value": ""
},
{
"type": "text",
"top": 150,
"left": 20,
"id": "text_2",
"width": 200,
"height": 240,
"label": "^info-circle",
"color": "auto",
"css": "",
"widgetId": "",
"preArgs": [],
"address": "/text_2",
"vertical": false,
"value": ""
}
],
"tabs": [],
"scroll": true
}
],
"color": "auto",
"css": "",
"value": "",
"precision": 0,
"address": "/root",
"preArgs": [],
"target": [],
"variables": {},
"id": "root",
"scroll": true,
"label": false
"type": "tab",
"id": "tab_1",
"label": "Sysex Example",
"color": "auto",
"css": "",
"value": "",
"precision": 0,
"address": "/tab_1",
"preArgs": [],
"target": [],
"variables": "@{parent.variables}",
"widgets": [
{
"type": "push",
"top": 10,
"left": 20,
"id": "push_1",
"linkId": "",
"width": 200,
"height": "auto",
"label": "Send Device Inquiry",
"color": "auto",
"css": "",
"on": "f0 7e 7f 06 01 f7",
"norelease": true,
"precision": 0,
"address": "/sysex",
"target": [
"midi:osc"
],
"preArgs": [],
"off": 0,
"doubleTap": false,
"value": "",
"bypass": false
},
{
"type": "text",
"top": 80,
"left": 20,
"id": "text_1",
"width": 200,
"height": 60,
"label": "Device Inquiry Response",
"color": "auto",
"css": "",
"vertical": false,
"preArgs": [],
"address": "/sysex",
"value": "",
"linkId": "",
"wrap": false,
"align": "",
"default": ""
},
{
"type": "text",
"top": 150,
"left": 20,
"id": "text_2",
"width": 200,
"height": 240,
"label": "^info-circle",
"color": "auto",
"css": "",
"preArgs": [],
"address": "/text_2",
"vertical": false,
"value": "",
"linkId": "",
"wrap": false,
"align": "",
"default": ""
}
],
"tabs": [],
"linkId": "",
"default": "",
"bypass": false,
"scroll": true
}
]
],
"color": "auto",
"css": "",
"value": "",
"precision": 0,
"address": "/root",
"preArgs": [],
"target": [],
"variables": {},
"id": "root",
"linkId": "",
"default": "",
"bypass": false,
"traversing": false,
"scroll": true,
"label": false
}

File diff suppressed because it is too large Load diff