spatial audio tools catalogue
p5.spatial.js

p5.spatial.js extends p5.sound.js with multichannel spatial audio output in the browser. It adds a p5.AudioSource workflow for moving sound objects across custom loudspeaker layouts, including quad, octophonic, and 5.1-style setups. The library is designed for creative coding projects that need interactive spatial sound without leaving the p5.js ecosystem. The p5.AudioSource class follows the same connect()/disconnect() audio-graph pattern already familiar from vanilla p5.sound.js, so sketches simply chain their existing source nodes into it. Getting it running requires selecting the connected multichannel audio interface as the system's default output device, and the library itself is distributed via a CDN link included in the page after the standard p5.js and p5.sound.js script tags.

tech specs

technology:
quad/octophonic/5.1/custom layouts
license:
free open source lgpl-2.1
control:
javascript api
tool type:
external library
last update:
2025-08-06 (v0.6 release)

history

+–

p5.spatial.js was documented in an academic paper, "p5.spatial.js: Accessible Multichannel Sound Composition in the Browser," presented at the Web Audio Conference (WAC), the international conference dedicated to web audio technologies held since 2015 at venues including IRCAM in Paris, Georgia Tech, Queen Mary University of London, TU Berlin, NTNU Trondheim and Universitat Pompeu Fabra Barcelona. The library was explicitly designed to be accessible to the wider p5.js community of artists and designers, intended to serve both newcomers to spatial sound and experienced computer music composers alike, extending an ecosystem already widely used in educational settings.

back to tools