7

I am developing an iPhone application (like Audio Processing). I have to give some effect to the audios. If it is desktop app, many options are there. We can get good examples and full project like audacity. But I want to develop for iPhone.

I got an app with reverb option; (take a look at following link). Just I watch the "video", I did not test this application in my iPhone device.
http://www.appstorehq.com/reverb-iphone-89870/app

My question is; How can I develop the app with reverb functionality ? Is there any documentation for that ? If it is, just share with us.

NOTE: We can use AudioUnit to develop the app with reverb functionality (I am not clear with this.).

EDIT: I don't like to use any third party library.

If anybody having knowledge about this, please share with us.

Thanks.

Eric Brotto
  • 53,471
  • 32
  • 129
  • 174
jfalexvijay
  • 3,681
  • 7
  • 42
  • 68

7 Answers7

4

if yourre targeting ios5 you can just the audio unit subtype kAudioUnitSubType_Reverb2 of the effect audio unit.

reverb unit

AudioComponentDescription auEffectUnitDescription;
    auEffectUnitDescription.componentType = kAudioUnitType_Effect;
    auEffectUnitDescription.componentSubType = kAudioUnitSubType_Reverb2;
    auEffectUnitDescription.componentManufacturer = kAudioUnitManufacturer_Apple;

AUGraphAddNode(
                              processingGraph,
                              &auEffectUnitDescription,
                              &auEffectNode), 

Failing that you could just write your own reverb code in the remoteio callback. A simple delay might be easier to do and would sound similar.

dubbeat
  • 7,706
  • 18
  • 70
  • 122
3

iOS 5.0 brings native OpenAL support, so it is now much easier - you don't have to code the algorithm yourself. It also bring support for a variety of reverb spaces:

  • Small Room
  • Medium Room
  • Large Room (2 configurations)
  • Medium Hall (3 configurations)
  • Large Hall (2 configurations)
  • Plate
  • Medium Chamber
  • Large Chamber
  • Cathedral

I suggest that you try the ObjectAL wrapper which already has a great support for the reverb effect: https://github.com/kstenerud/ObjectAL-for-iPhone

Grab the source from this repository, load "ObjectAL.xcodeproj" and run the ObjectALDemo target on any iOS 5.0 device (should also work on the simulator). This will give you a good starting point and feeling of what the reverb effect is capable of.

If you still don't to use any 3rd party library, you can just grab the relevant pieces from ObjectAL. Look for the reverb-related code in the following source files (and their corresponding headers):

Good luck with your project!

urish
  • 8,943
  • 8
  • 54
  • 75
1

AUs are a good place to start.

write your own reverb AU which contains a reverb implementation. there are tons of ways to implement a reverb. a medium/long convolution reverb is much to ask from a phone, but something such as a FDN (feedback delay network) will not require a lot of memory or CPU.

both implementations are easy to implement, if you're familiar with audio programming and optimization. the tough part is actually making one that sounds very good and performs well.

if you're unable to write optimal low level code or you do not (presently) understand basic audio signal processing, then you'll have a few obstacles to overcome -- it may be a long road in that case.

justin
  • 104,054
  • 14
  • 179
  • 226
0

Searching the iOS documentation for "reverb" produces a link to the Core Audio Overview, which references reverb as an "effect unit." Perhaps that's worth further study?

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
0

No good, I have attempted the audio unit approach and even though it is in the documentation it is "not" implemented yet by the apple engineers. Each time you call the function to set the reverb property you will only get failure status code. You would have to implement your own reverb effect. Try reading some DSP book and you might find a clue.

Samuel
  • 238
  • 4
  • 12
  • Is there any open source for this functionality ? – jfalexvijay Jan 25 '11 at 09:06
  • 1
    There should be if you try to find them hard enough... By the way, just you know that the reverberation effect is "not" going to be clean for all songs in iphone ie some distortion will occur, this might be caused by the DAC in iphone. That is why the reverb iphone app provides you with a tri-band equalizer to minimize the distortion :) . It is not gonna be easy so good luck – Samuel Jan 25 '11 at 09:48
0

you need to learn some DSP-level coding, the DSP cookbook book is okay and there are others out there. But basically you need to be comfortable with handling audio signal in the frequency domain and things such as FFT's. Once you have that, implementing a reverb filter should be straight-forward.

tylernol
  • 171
  • 6
0

This is an answer I've given before, but I believe it is relevant here. I am going to agree with the others and say that you are going to have to become a bit more familiar with core-audio if you want to do this properly.

I highly recommend this core-audio book. It will teach what you need to do this right and will save you a lot of frustration.

The chapter on audio effects has not been published yet, but if it is anything like the rest of the book it's worth the wait.

EDIT

You will most likely need to do this with an audio effect (which is a form of an audio unit).

Eric Brotto
  • 53,471
  • 32
  • 129
  • 174