Ahmed Ahmedov
Ahmed Ahmedov

Reputation: 592

How to get the decibels at specific frequency using Novocaine

Currently i'm doing this using AurioTouch and getting sound from microphone. But I'm having trouble with buffering a long song... Novocaine seems to handle audioplayback very well and has everything i need except that i cant get out how to retrieve the sound amplitude (decibels) at a specific frequency.

    NSURL *inputFileURL = [[NSBundle mainBundle] URLForResource:@"TLC" withExtension:@"mp3"];        

fileReader = [[AudioFileReader alloc] 
              initWithAudioFileURL:inputFileURL 
              samplingRate:audioManager.samplingRate
              numChannels:audioManager.numOutputChannels];

[fileReader play];

[audioManager setOutputBlock:^(float *data, UInt32 numFrames, UInt32 numChannels)
 {
     [fileReader retrieveFreshAudio:data numFrames:numFrames numChannels:numChannels];
// i believe here should lay the code for detecting the amplitude at 1000 HZ
 }];

I'm too noobish at sound analysis and any help will be welcome!

Upvotes: 2

Views: 370

Answers (0)

Related Questions