views:

350

answers:

2

In the new iPhone 3GS commercial, Apple shows voice control with a cool blue waveform animation. Is this visual effect for rendering the waveforms (or maybe just volumes) available as an API call or source code somewhere? (Not the voice control part, just the audio visualization)

I think you could get the sound info from AVAudioPlayer's averagePowerForChannel: method, but how would you show the waves moving up and down?

Thanks!

+1  A: 

The waveform in the apple commercials is very clearly just a plain old sine wave that looks like it's got its amplitude modulated by the volume of the input.

McWafflestix
Cool, thanks. I also found some sine wave code here - http://trailsinthesand.com/plotting-a-sine-wave-with-the-iphone-sdk/
John
+2  A: 

John,

That code that you found for drawing the sine wave is great. This sample code from Apple shows a sound meter with live audio recording. With those two resources, you should be on track to make the visual waveform.

Reed Olsen