0

I need to record audio from iPhone. During recording I need to know, how many audio waves I have at the current moment and frequency and amplitude of each wave. It seems to me, that avaudiorecorder can't help me.

I had a look at Apple's SpeakHere sample code, but I can get only amplitude from here (as I understand).

I had a look at Apple's aurioTouch sample code. It seems, that it does, what I need, but sample code is incredibly big and written mostly in C++, so it's difficult for me to understand it.

Can anybody give me examples, how to get Audio frequency and amplitude. It will be better, if you give me code examples.

Paul T.
  • 4,938
  • 7
  • 45
  • 93
  • Go back to aurioTouch and study it a little harder - it really is the best example code for this kind of thing, but it's a complex subject area and there are no shortcuts to understanding it. – Paul R Jul 06 '12 at 13:09
  • Sorry, but your question is a bit ill-posed. "many audio waves I have at the current moment and frequency and amplitude of each wave"? This doesn't actually make much sense. Since you also have spectrogram in your tag, maybe that's what you want? There's plenty of source code for that out there. You say aurioTouch does what you want, why not use that as a starting point? If you want to do audio, C++ is THE language, so you'll have to learn it. – Bjorn Roche Jul 06 '12 at 16:25
  • I've understood that I have to study aurioTouch. I will do. But why "many audio waves I have at the current moment and frequency and amplitude of each wave" doesn't make sense? As far as I know, at one moment I have many audio waves with different frequency and different shift, and I don't know how, for example, take shift of each wave with spectrogram. Correct me if I'm wrong. – Paul T. Jul 09 '12 at 05:31
  • There are many previous questions on this subject on SO with some very good answers - try reading some of these to get a basic understanding of how the FFT is used to estimate power spectra for use in plotting a spectrogram. See the list of "Related" questions to the right ---> – Paul R Jul 09 '12 at 09:10

1 Answers1

2

Apple's aurioTouch sample app appears to be written using some C++ for absolutely no reason. Convert the code to plain C, and maybe you'll understand it better. Near real-time DSP audio analysis doesn't get much easier, so read up on that topic.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153