OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 </head> |
| 5 <body> |
| 6 <h1>AudioWorklet Test</h1> |
| 7 <script> |
| 8 let context; |
| 9 window.audioWorklet.addModule('processors.js').then(() => { |
| 10 context = new AudioContext(); |
| 11 |
| 12 let osc = new OscillatorNode(context); |
| 13 let bypass = new AudioWorkletNode(context, 'bypass'); |
| 14 let noise = new AudioWorkletNode(context, 'noise'); |
| 15 let onepole = new AudioWorkletNode(context, 'onepole'); |
| 16 |
| 17 osc.type = 'sawtooth'; |
| 18 osc.connect(bypass).connect(onepole); |
| 19 osc.connect(noise).connect(onepole); |
| 20 onepole.connect(context.destination); |
| 21 osc.start(); |
| 22 }); |
| 23 </script> |
| 24 </body> |
| 25 </html> |
OLD | NEW |