Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Audio Signal Processing in iOS [closed]

I'm about to start developing an iOS application for audio processing. At this moment it is not quite sure what the requirements for the application are since this is a research project. But basic requirements are at least to detect cords, on-sets from mic input. Therefore I value your opinion on available libraries which you think are good for this kind of work. I would like to stay away from third party libraries as much as possible.

like image 664
Waruna Avatar asked Dec 04 '22 01:12

Waruna


1 Answers

I'd recommend using the Novocaine library. Audio stuff is a real pain if you do it yourself from scratch...

https://github.com/alexbw/novocaine

Here's what they say:

Really fast audio in iOS and Mac OS X using Audio Units is hard, and will leave you scarred and bloody. What used to take days can now be done with just a few lines of code.

Getting Audio

Novocaine *audioManager = [Novocaine audioManager];
[audioManager setInputBlock:^(float *newAudio, UInt32 numSamples, UInt32 numChannels) {
    // Now you're getting audio from the microphone every 20 milliseconds or so. How's that for easy?
    // Audio comes in interleaved, so,
    // if numChannels = 2, newAudio[0] is channel 1, newAudio[1] is channel 2, newAudio[2] is channel 1, etc.
}];
like image 186
Ben Clayton Avatar answered Dec 15 '22 13:12

Ben Clayton