0

I recently got a job programming the audio system for a new virtual reality room at my school. My first task is to provide a panning algorithm for a sound system with an arbitrary number of speakers. So if there are 20 speakers, it needs to be able to pan sound across a one dimensional array of 20 speakers, where the minimum value of the pan knob would be in the 1st speaker, and the max would be in the 20th speaker, and as you gradually increase the knob, it should pass the audio through each speaker consecutively.

I got this to work in SuperCollider ( http://doc.sccode.org/Classes/PanX.html ) but they need the audio system to be in Javascript. Are there any API's or npm packages I should utilize? I've been considering just using a channel slitter and in the web audio api ( https://developer.mozilla.org/en-US/docs/Web/API/ChannelSplitterNode ) and just modifying the gain of all of the channels with respect to the pan knobs position, but this feels like a naive approach. Has anyone found any packages or apis in javascript that provide tools for working with arbitrary numbers of channels? I've looked but can't seem to find anything. I've found ambisonics tools in javascript too but the system is not going to have a spherical speaker setup so this is not ideal.

Thanks! Sean

  • Do you want something like a pseudo-normal distribution of gain values distributed between the speakers centered at a floating "index" in the range of speakers, or do you just want a linear tweening between just the two adjacent speakers as the floating index changes? – Patrick Roberts Jun 07 '18 at 19:16
  • The first one - an equal power pan across an array of speakers. – Sean Walker Jun 07 '18 at 19:51

0 Answers0