(Interactive – click on letters to activate, then use your keyboard. Works best with headphones.)
I wanted the ability to pan sounds for the game I’m working on. I wrote a quick note to Joe Berkovitz, who developed the Audio library I’m using. He suggested I write the filter myself
I’ve never extended a library before, but he included great example filters and assured me it wouldn’t be hard, so I gave it a try. What do you know – it wasn’t bad at all. So I’m happy to give my teensy contribution back – you can download my PanFilter below and drop it in your StandingWave2 Filters directory.
It works just like the Gain filter, taking in one Number between -1 (hard left pan) and 1 (hard right pan). Zero will give you centered audio, and you can use any float in between -1 and 1 for some subtle effects.

See interactive movie at top of page for a hands-on example (sounds pan from left to right as you move left to right across keyboard).
