(event)
| 33 | } |
| 34 | |
| 35 | onmessage(event) { |
| 36 | if (event.type == "move") { |
| 37 | //console.log("processor move 2", event.x, event.y); |
| 38 | this.wasm.exports.vox_x_axis(this.dsp, event.x); |
| 39 | this.wasm.exports.vox_y_axis(this.dsp, 1.0 - event.y); |
| 40 | } else if (event.type == "off") { |
| 41 | //console.log("proc up 2"); |
| 42 | this.wasm.exports.vox_gate(this.dsp, 0.0); |
| 43 | } else if (event.type == "on") { |
| 44 | console.log("proc down 2"); |
| 45 | this.wasm.exports.vox_gate(this.dsp, 1.0); |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | registerProcessor('trio', TrioProcessor); |