Sample of how to write Web Audio API AudioWorklet within one file
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
loop.wav
overdrive-proc.js
test-worklet0.html
test-worklet0.png
test-worklet1.html
test-worklet2.html
test-worklet3.html

README.md

audioworklet-in-one-file

[ Web Audio API ] Several methods of how to code AudioWorklet within one file

GITHUB REPOSITORY

LIVE DEMO

1. separated files

As usual divide it into main program and file for processor
test-worklet0.html

2. load from JavaScript string

Embed code for processor in string
test-worklet1.html

3. load from special-type script

Embed in HTML as a special type of script
test-worklet2.html

4. load from class-object

Define as normal JavaScript class object and extract from it
test-worklet3.html