you might also be interested in Glicol (https://glicol.org/)
especially this example: https://glicol.org/tour#meta2
it's rhai in rust -> wasm -> sab -> audioworklet