Brave Audio Filters

It’s always darkest before the dawn

It's not very often that you feel you have to do something that nobody else has ever done before. Especially when talking about programming; there are so many fine programmers in this world, a lot of ground is covered.

However, about a year ago, I had that feeling. I was asked to create an iOS app that was basically built around a 10-band equalizer, improving the audio of the microphone in realtime. In love with audio and challenged by the task I agreed upon doing this.

After Googling the subject a bit, I quickly discovered creating an EQ was not quite a simple task — especially for iOS. Apple's documentation covered a undocumented 3-band EQ API and a vague page about DSP (Digital Signal Processing).

Like many programmers facing a tough problem, I created a SO post. The first response I got was this:

It looks like there are ~0 people who have used it on the whole internet. Good luck. — Adam Shiemke about Apple's DSP docs

For a second I felt like quitting. I already had spent quite some days figuring out the DSP methods provided by Apple and this comment even made my mood darker.

However, this was also the first time ever I was really on my own, not relying on someone else's work. It really challenged me and it ended up giving me more spirit to continue than ever.

After a while I got an answer to my SO post of Alex Wiltschko — the very fine creator of Novocaine. He pointed me to the right method to use, called vDSP_deq22, but I still had to figure out how to use it exactly.

It seemed like every step forward also pushed the goal a bit further away. Another SO post that just resulted in a new one. Hours of me trying things and looking into remote places of the internet were still required to figure out what was really going on. Parameters had to be set correctly and buffers initialised properly.

When finally the audio did not crack or hiss and everything just worked I turned up the volume and felt true bliss.

The resulting code is not something that I'll probably have to use again, nor will many other people. However, the road I travelled and the lessons I learnt along the way are really valuable to me.

Just before I had it all working I still had that creepy feeling that it might not ever start working. It's strange to look back and see that you were so close to the solution but you just didn't see it coming. I also learnt that a tough challenge is really awarding and worth the countless hours of watching your screen, thinking you've tried it all.

The project is called NVDSP and available on Github.