views:

529

answers:

2

I want to make a simple audio equalizer for the iPhone, but I don't know how to start. The equalizer should be really simple and just change bass, high, distortion and maybe echo and chorus. How can I start? Maybe a sample code would be helpful.

+1  A: 

Firstly you're getting confused in your terminology.

An equalizer just changes the frequency response of an audio channel. It usually has a fixed number of frequency bands, whose individual gains can be controlled by the user.

Distortion, echo, chorus, etc are effects - in the digital domain they are simply algorithms that are applied to an audio channel to modify the data passing through it.

So you need to decide what it is that you are designing: an equalizer, some kind of effects processing gizmo, or maybe some combination of these.

Once you have a rough design for what you want to implement, then you can start work on the various algorithms that are going to be used to implement this design. For the equalizer you can consider either doing frequency domain filtering or implement a time domain filter bank. For the effects part you will need to do some research into the various different effects and how they are implemented, e.g. distortion usually uses some non-linear transfer function to introduce additional harmonic content.

Paul R
Yeah this is pretty much it. An equalizer is also an effect. Regarding implementation there is a biquad filter algorithm that gives you a lowpass, mid, and highpass outputs from one calculation that seems to be exactly what is being asked for here. http://en.wikipedia.org/wiki/Digital_biquad_filter . Echo is a simple ring buffer where you read N samples behind where you write for each frame. A chorus is typically a short echo with the delay time controlled by a low frequency sine function and a feedback term for resonance.
Justin Smith
+2  A: 

If you are thinking of adding an equalizer and effects processor to the audio output of an iPhone application like the iPod app, I don't believe you would be able to achieve that with public APIs. But if you are interested in processing audio from the iPhone's microphone, your idea is very feasible.w

The forum Comp.DSP is full of fairly advanced digital signal processing but has many novice questions that are answered effectively. Your questions about equalizer and effects implementations have been asked there many times.

ctpenrose