46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"source": "JSON",
|
|
"data": "BLOCK",
|
|
"version": "0.0.1",
|
|
"type": "char2float",
|
|
"language": "javascript",
|
|
"extension": "webaudio",
|
|
"help": "Char to Float",
|
|
"label": "Char 2 Float",
|
|
"color": "200:200:25:150",
|
|
"group": "Conversion",
|
|
"codes": {
|
|
"declaration": "\n// block_$id$ = Char 2 Float\nvar $port[float_output]$ = [];\nvar $port[char_input]$ = function(value){\n if (value != '$prop[char]$')\n return true;\n for (var i = 0; i < $port[float_output]$.length ; i++){\n $port[float_output]$[i]($prop[float]$);\n }\n return true;\n };\n"
|
|
},
|
|
"properties": [
|
|
{
|
|
"name": "float",
|
|
"label": "Output float",
|
|
"type": "Float",
|
|
"lower": 0,
|
|
"upper": 20000,
|
|
"step": 1,
|
|
"value": 60
|
|
},
|
|
{
|
|
"name": "char",
|
|
"label": "Input Char",
|
|
"type": "String",
|
|
"value": "a"
|
|
}
|
|
],
|
|
"ports": [
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.char",
|
|
"label": "Char Input",
|
|
"conn_type": "Input",
|
|
"name": "char_input"
|
|
},
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.float",
|
|
"label": "Float Output",
|
|
"conn_type": "Output",
|
|
"name": "float_output"
|
|
}
|
|
]
|
|
} |