39 lines
1.2 KiB
JSON
39 lines
1.2 KiB
JSON
{
|
|
"source": "JSON",
|
|
"data": "BLOCK",
|
|
"version": "0.0.1",
|
|
"type": "javascript.MIDI.stripmidi",
|
|
"language": "javascript",
|
|
"extension": "webaudio",
|
|
"help": "Strip Midi",
|
|
"label": "Strip Midi",
|
|
"color": "#24D3C1",
|
|
"group": "MIDI",
|
|
"codes": [
|
|
{
|
|
"name": "declaration",
|
|
"code": "\n// block_$id$ = $label$\nvar $port[note]$ = [];\nvar $port[velocity]$ = [];\n\nvar $port[midi_value]$ = function(value){\n for (var i = 0; i < $port[note]$.length ; i++){\n $port[note]$[i](value[0]);\n }\n for (var i = 0; i < $port[note]$.length ; i++){\n $port[velocity]$[i](value[1]);\n }\n return true;\n };\n"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"ports": [
|
|
{
|
|
"conn_type": "input",
|
|
"name": "midi_value",
|
|
"label": "Midi Value",
|
|
"type": "javascript.midi"
|
|
},
|
|
{
|
|
"conn_type": "output",
|
|
"name": "note",
|
|
"label": "Note",
|
|
"type": "javascript.float"
|
|
},
|
|
{
|
|
"conn_type": "output",
|
|
"name": "velocity",
|
|
"label": "Velocity",
|
|
"type": "javascript.float"
|
|
}
|
|
]
|
|
} |