Last active
October 23, 2017 15:06
-
-
Save automata/04847249319d2326fa92 to your computer and use it in GitHub Desktop.
Assembly Demo. Theremin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "properties": { | |
| "name": "ASM2", | |
| "id": "04847249319d2326fa92", | |
| "environment": { | |
| "type": "noflo-browser", | |
| "content": "<canvas id=\"canvas\" width=\"200\" height=\"200\"></canvas>" | |
| } | |
| }, | |
| "inports": {}, | |
| "outports": {}, | |
| "groups": [ | |
| { | |
| "name": "drawing", | |
| "nodes": [ | |
| "circle", | |
| "color", | |
| "div_m0ubq", | |
| "draw", | |
| "point", | |
| "stroke" | |
| ], | |
| "metadata": { | |
| "description": "" | |
| } | |
| }, | |
| { | |
| "name": "playing", | |
| "nodes": [ | |
| "div", | |
| "div_6bct0", | |
| "gain", | |
| "mul", | |
| "play", | |
| "sinusoid" | |
| ], | |
| "metadata": { | |
| "description": "" | |
| } | |
| }, | |
| { | |
| "name": "interacting", | |
| "nodes": [ | |
| "mouse", | |
| "mousex", | |
| "mousey" | |
| ], | |
| "metadata": { | |
| "description": "" | |
| } | |
| } | |
| ], | |
| "processes": { | |
| "mouse": { | |
| "component": "dom/Listen", | |
| "metadata": { | |
| "label": "mouse", | |
| "x": 252, | |
| "y": 720 | |
| } | |
| }, | |
| "draw": { | |
| "component": "canvas/Draw", | |
| "metadata": { | |
| "label": "draw", | |
| "x": 1008, | |
| "y": 360 | |
| } | |
| }, | |
| "circle": { | |
| "component": "canvas/MakeCircle", | |
| "metadata": { | |
| "label": "circle", | |
| "x": 720, | |
| "y": 144 | |
| } | |
| }, | |
| "stroke": { | |
| "component": "canvas/Stroke", | |
| "metadata": { | |
| "label": "stroke", | |
| "x": 864, | |
| "y": 396 | |
| } | |
| }, | |
| "canvas": { | |
| "component": "dom/GetElement", | |
| "metadata": { | |
| "label": "canvas", | |
| "x": 72, | |
| "y": 360 | |
| } | |
| }, | |
| "mousex": { | |
| "component": "objects/GetObjectKey", | |
| "metadata": { | |
| "label": "mousex", | |
| "x": 360, | |
| "y": 720 | |
| } | |
| }, | |
| "mousey": { | |
| "component": "objects/GetObjectKey", | |
| "metadata": { | |
| "label": "mousey", | |
| "x": 360, | |
| "y": 576 | |
| } | |
| }, | |
| "point": { | |
| "component": "canvas/MakePoint", | |
| "metadata": { | |
| "label": "point", | |
| "x": 576, | |
| "y": 144 | |
| } | |
| }, | |
| "div_m0ubq": { | |
| "component": "math/Divide", | |
| "metadata": { | |
| "label": "div", | |
| "x": 576, | |
| "y": 288 | |
| } | |
| }, | |
| "color": { | |
| "component": "canvas/MakeColor", | |
| "metadata": { | |
| "label": "color", | |
| "x": 720, | |
| "y": 360 | |
| } | |
| }, | |
| "play": { | |
| "component": "webaudio/Play", | |
| "metadata": { | |
| "label": "play", | |
| "x": 1044, | |
| "y": 612 | |
| } | |
| }, | |
| "sinusoid": { | |
| "component": "webaudio/Oscillator", | |
| "metadata": { | |
| "label": "sinusoid", | |
| "x": 828, | |
| "y": 576 | |
| } | |
| }, | |
| "gain": { | |
| "component": "webaudio/Gain", | |
| "metadata": { | |
| "label": "gain", | |
| "x": 936, | |
| "y": 612 | |
| } | |
| }, | |
| "div_6bct0": { | |
| "component": "math/Divide", | |
| "metadata": { | |
| "label": "div", | |
| "x": 828, | |
| "y": 720 | |
| } | |
| }, | |
| "div": { | |
| "component": "math/Divide", | |
| "metadata": { | |
| "label": "div", | |
| "x": 576, | |
| "y": 576 | |
| } | |
| }, | |
| "mul": { | |
| "component": "math/Multiply", | |
| "metadata": { | |
| "label": "mul", | |
| "x": 720, | |
| "y": 576 | |
| } | |
| } | |
| }, | |
| "connections": [ | |
| { | |
| "src": { | |
| "process": "canvas", | |
| "port": "element" | |
| }, | |
| "tgt": { | |
| "process": "mouse", | |
| "port": "element" | |
| }, | |
| "metadata": { | |
| "route": 5 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mouse", | |
| "port": "event" | |
| }, | |
| "tgt": { | |
| "process": "mousex", | |
| "port": "in" | |
| }, | |
| "metadata": { | |
| "route": 5 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mouse", | |
| "port": "event" | |
| }, | |
| "tgt": { | |
| "process": "mousey", | |
| "port": "in" | |
| }, | |
| "metadata": { | |
| "route": 5 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "canvas", | |
| "port": "element" | |
| }, | |
| "tgt": { | |
| "process": "draw", | |
| "port": "canvas" | |
| }, | |
| "metadata": { | |
| "route": 5 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "point", | |
| "port": "point" | |
| }, | |
| "tgt": { | |
| "process": "circle", | |
| "port": "center" | |
| }, | |
| "metadata": { | |
| "route": 2 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "circle", | |
| "port": "circle" | |
| }, | |
| "tgt": { | |
| "process": "stroke", | |
| "port": "items" | |
| }, | |
| "metadata": { | |
| "route": 2 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "stroke", | |
| "port": "stroke" | |
| }, | |
| "tgt": { | |
| "process": "draw", | |
| "port": "commands" | |
| }, | |
| "metadata": { | |
| "route": 2 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mousey", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "point", | |
| "port": "y" | |
| }, | |
| "metadata": { | |
| "route": 7 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mousex", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "point", | |
| "port": "x" | |
| }, | |
| "metadata": { | |
| "route": 6 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mousex", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "div_m0ubq", | |
| "port": "dividend" | |
| }, | |
| "metadata": { | |
| "route": 6 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "div_m0ubq", | |
| "port": "quotient" | |
| }, | |
| "tgt": { | |
| "process": "circle", | |
| "port": "radius" | |
| }, | |
| "metadata": { | |
| "route": 6 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "color", | |
| "port": "color" | |
| }, | |
| "tgt": { | |
| "process": "stroke", | |
| "port": "strokestyle" | |
| }, | |
| "metadata": { | |
| "route": 2 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mousey", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "color", | |
| "port": "lightness" | |
| }, | |
| "metadata": { | |
| "route": 7 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "gain", | |
| "port": "gain" | |
| }, | |
| "tgt": { | |
| "process": "play", | |
| "port": "audionodes" | |
| }, | |
| "metadata": { | |
| "route": 3 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "sinusoid", | |
| "port": "oscillator" | |
| }, | |
| "tgt": { | |
| "process": "gain", | |
| "port": "audionodes" | |
| }, | |
| "metadata": { | |
| "route": 3 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mousey", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "div_6bct0", | |
| "port": "dividend" | |
| }, | |
| "metadata": { | |
| "route": 7 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "div_6bct0", | |
| "port": "quotient" | |
| }, | |
| "tgt": { | |
| "process": "gain", | |
| "port": "gain" | |
| }, | |
| "metadata": { | |
| "route": 7 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mousex", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "div", | |
| "port": "dividend" | |
| }, | |
| "metadata": { | |
| "route": 6 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "div", | |
| "port": "quotient" | |
| }, | |
| "tgt": { | |
| "process": "mul", | |
| "port": "multiplicand" | |
| }, | |
| "metadata": { | |
| "route": 6 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "mul", | |
| "port": "product" | |
| }, | |
| "tgt": { | |
| "process": "sinusoid", | |
| "port": "frequency" | |
| }, | |
| "metadata": { | |
| "route": 6 | |
| } | |
| }, | |
| { | |
| "data": "#canvas", | |
| "tgt": { | |
| "process": "canvas", | |
| "port": "selector" | |
| } | |
| }, | |
| { | |
| "data": "mousemove", | |
| "tgt": { | |
| "process": "mouse", | |
| "port": "type" | |
| } | |
| }, | |
| { | |
| "data": "clientX", | |
| "tgt": { | |
| "process": "mousex", | |
| "port": "key" | |
| } | |
| }, | |
| { | |
| "data": true, | |
| "tgt": { | |
| "process": "draw", | |
| "port": "drawevery" | |
| } | |
| }, | |
| { | |
| "data": 10, | |
| "tgt": { | |
| "process": "circle", | |
| "port": "radius" | |
| } | |
| }, | |
| { | |
| "data": "#fff", | |
| "tgt": { | |
| "process": "stroke", | |
| "port": "strokestyle" | |
| } | |
| }, | |
| { | |
| "data": 2, | |
| "tgt": { | |
| "process": "stroke", | |
| "port": "linewidth" | |
| } | |
| }, | |
| { | |
| "data": "clientY", | |
| "tgt": { | |
| "process": "mousey", | |
| "port": "key" | |
| } | |
| }, | |
| { | |
| "data": 5, | |
| "tgt": { | |
| "process": "div_m0ubq", | |
| "port": "divisor" | |
| } | |
| }, | |
| { | |
| "data": 100, | |
| "tgt": { | |
| "process": "color", | |
| "port": "saturation" | |
| } | |
| }, | |
| { | |
| "data": 80, | |
| "tgt": { | |
| "process": "color", | |
| "port": "lightness" | |
| } | |
| }, | |
| { | |
| "data": 200, | |
| "tgt": { | |
| "process": "color", | |
| "port": "hue" | |
| } | |
| }, | |
| { | |
| "data": 0.1, | |
| "tgt": { | |
| "process": "color", | |
| "port": "alpha" | |
| } | |
| }, | |
| { | |
| "data": false, | |
| "tgt": { | |
| "process": "draw", | |
| "port": "clearevery" | |
| } | |
| }, | |
| { | |
| "data": "sine", | |
| "tgt": { | |
| "process": "sinusoid", | |
| "port": "waveform" | |
| } | |
| }, | |
| { | |
| "data": 0, | |
| "tgt": { | |
| "process": "sinusoid", | |
| "port": "start" | |
| } | |
| }, | |
| { | |
| "data": 200, | |
| "tgt": { | |
| "process": "div_6bct0", | |
| "port": "divisor" | |
| } | |
| }, | |
| { | |
| "data": 200, | |
| "tgt": { | |
| "process": "div", | |
| "port": "divisor" | |
| } | |
| }, | |
| { | |
| "data": 1000, | |
| "tgt": { | |
| "process": "mul", | |
| "port": "multiplier" | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mousex/y GetObjectKey components don't work in ff with x/y. Should be clientX/Y.