I made a polyphonic panning manager!

Hi friends! As a part of my current plugin (a polyphonic synth), I wanted to make it simple for the user to set a global “stereo width” parameter and have the synth automatically space its voices evenly throughout the specified stereo field. I created a PanningManager class to do this, and I’ve made the source code available on GitHub if you’d like to use it!

It has the following features:

  • Adjustable stereo width
  • Adjustable number of polyphonic voices (ie, # of midiPan values evenly spaced throughout the stereo field)
  • Very easy to retrieve the next midiPan value in the queue – it’s as simple as getNextPanVal()!
  • Panning values assigned from the “center out”
  • Onboard function getClosestNewPanValFromOld to help maintain the continuity of the stereo field when stereo width is updated

The source code is available on Github here – I welcome any and all bug reports, suggestions, and feedback, as I am still working on testing it myself!

I hope you find this useful. Happy holidays!
Ben