Metering audio playback across the Bass/Treble Spectrum

Forums Programming sound engine: CocosDenshion et al Metering audio playback across the Bass/Treble Spectrum

This topic contains 2 replies, has 2 voices, and was last updated by  spadict 2 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
Author Posts
January 9, 2012 at 4:56 am #238276

spadict
Participant
@spadict

After crushing my way through n8burba’s cocos2d cookbook, I’ve been playing around with the CDAudioManager a bit, playing different songs and trying to make sprites move to the beat. However, CDAudoManager seems to only be able to monitor across the decibel levels which frequently means the sprite responds to the melody rather than the rhythm.

Is there any cocos2d related solution to metering across Bass/Treble instead so that I might be able to roughly isolate instruments better within the music?

If no, does anyone have any other recommendations, or good reading sources to recommend?

January 9, 2012 at 10:52 am #361574

itlgames
Moderator
@itlgames

No, there is not a cocos2d solution, what you need to use is called FFT (Fast Fourier Transform) to get the audio spectrum, basically you get samples of the audio and get the list of frequencies.

There are few open source solutions, I have used this on the past (OouraFFT):

http://github.com/alexbw/iPhoneFFT

But there is also a native solution on iOS 4 (never tried) called Accelerate framework or something. And seems to be faster, so probably better stick with that.

January 9, 2012 at 2:30 pm #361575

spadict
Participant
@spadict

Awesome, thanks so much for the insight Jose!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.