- kernel
- -
- storage
- -
- work items
- -
- input
- -
- output
- -
- pbo
- -
The compute graph applies pitch and multi-tap delay to every waveform sample.
A TSL compute function transforms a typed waveform in a storage buffer, reads the result back with getArrayBufferAsync(), and feeds a live visualizer and optional AudioContext output. WebGL2 stays honest with a direct CPU DSP reference.
Creating the waveform buffer, compute graph, and visualizer.
The compute graph applies pitch and multi-tap delay to every waveform sample.
Readback becomes a playable mono AudioBuffer and a red-channel DataTexture visualizer.
The compute/readback contract is WebGPU-only here; WebGL2 runs the same DSP policy on the CPU.
Deterministic local waveforms keep the exercise repeatable and offline.
One storage-buffer element maps to one TSL compute invocation.
The transformed samples cross the GPU/CPU boundary explicitly.
RMS bins become a live red-channel texture and bar field.
A user gesture can schedule the processed mono buffer.
Run the transform, then measure the active visualizer submission path over thirty frames.
This is a deterministic adaptation of the official audio-processing example: generated local signals replace external MP3 input, while the TSL compute, storage-buffer, PBO readback, AudioBuffer, and visualizer contracts remain executable.
Sources: official audio-processing example · TSL · Renderer · StorageBufferNode