Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 20, 2011, 10:54 PM   #1
fernandovalente
macrumors 6502
 
Join Date: Aug 2008
Location: Third world **** hole, I mean, Brazil
Send a message via AIM to fernandovalente Send a message via MSN to fernandovalente
Audio questions

Hey,

I'm playing with some audio stuff. There are 3 things I'd like to create:

-A visualizer like the iTunes ones.
-An audio editor like GarageBand's crop bar
-A bar that will react to the audio beats. Something like this one:



Does anyone knows how I can create stuff like these ones?

Thanks!
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2011-05-20 at 11.52.51 PM.png
Views:	222
Size:	15.9 KB
ID:	286233  
__________________
Check out the iPhone and Mac apps I developed.
iChat: fernandovalente [a] mac [d] com
Personal blog: www.fvalente.org
E-mail: fernando [a] fvalente [d] org
fernandovalente is offline   0 Reply With Quote
Old May 20, 2011, 11:27 PM   #2
larswik
macrumors 65816
 
Join Date: Sep 2006
Do you have ANY programming experience?

-Lars
larswik is offline   0 Reply With Quote
Old May 20, 2011, 11:29 PM   #3
fernandovalente
Thread Starter
macrumors 6502
 
Join Date: Aug 2008
Location: Third world **** hole, I mean, Brazil
Send a message via AIM to fernandovalente Send a message via MSN to fernandovalente
Quote:
Originally Posted by larswik View Post
Do you have ANY programming experience?

-Lars
Yeah, I'm great at Objective-C, but I know almost nothing about audio
__________________
Check out the iPhone and Mac apps I developed.
iChat: fernandovalente [a] mac [d] com
Personal blog: www.fvalente.org
E-mail: fernando [a] fvalente [d] org
fernandovalente is offline   0 Reply With Quote
Old May 20, 2011, 11:50 PM   #4
SidBala
macrumors 6502a
 
Join Date: Jun 2010
Do you have ANY signal processing experience?

There is a lot of discrete signal processing(FFTs, convolutions, correlations, etc) done under the hood for you to get those cool looking visualizations. I would only recommend you try this if you know what the above terms mean.

That spectrum analyzer bar in the screenshot is basically a FFT that has been plotted as a bar chart.

Beat detection, you detect changes in loudness. Where this exceeds a threshold, you mark that as a beat and update your visual accordingly. More complex algorithms require you to keep a running history of the music and detect the point where there is a repeat of the beat.

The itunes visualization is a bit more complicated. it usually blends a bunch of different effects together to create the final visualization. This is a bit harder to do.

All this is doable. But you need to have a solid understanding of signal processing. A lot of math is involved. It is not something that you can just use common sense to do.

Last edited by SidBala; May 20, 2011 at 11:57 PM.
SidBala is offline   0 Reply With Quote
Old May 20, 2011, 11:57 PM   #5
fernandovalente
Thread Starter
macrumors 6502
 
Join Date: Aug 2008
Location: Third world **** hole, I mean, Brazil
Send a message via AIM to fernandovalente Send a message via MSN to fernandovalente
Quote:
Originally Posted by SidBala View Post
Do you have ANY signal processing experience?

There is a lot of discrete signal processing(FFTs, convolutions, correlations, etc) done under the hood for you to get those cool looking visualizations.

That spectrum analyzer bar in the screenshot is basically a FFT that has been plotted as a bar chart.

Beat detection, you detect changes in loudness. Where this exceeds a threshold, you mark that as a beat and update your visual accordingly. More complex algorithms require you to keep a running history of the music and detect the point where there is a repeat of the beat.

The itunes visualization is a bit more complicated. it usually blends a bunch of different effects together to create the final visualization. This is a bit harder to do.

All this is fairly doable. But you need to have a good solid understanding of signal processing.
I don't have any experience with signal processing. Is there any high-level lib to do that(one that would return the float values of the beats)?
__________________
Check out the iPhone and Mac apps I developed.
iChat: fernandovalente [a] mac [d] com
Personal blog: www.fvalente.org
E-mail: fernando [a] fvalente [d] org
fernandovalente is offline   0 Reply With Quote
Old May 21, 2011, 12:03 AM   #6
ender land
macrumors 6502a
 
Join Date: Oct 2010
Quote:
Originally Posted by SidBala View Post
That spectrum analyzer bar in the screenshot is basically a FFT that has been plotted as a bar chart.
huh, I never realized this - good point :-)
ender land is offline   0 Reply With Quote
Old May 21, 2011, 01:07 AM   #7
mfram
macrumors 6502a
 
Join Date: Jan 2010
Location: San Diego, CA USA
Google for "FFT C library". You'll get a whole bunch of hits. Choose a library and go for it!
mfram is offline   0 Reply With Quote
Old May 21, 2011, 08:51 PM   #8
firewood
macrumors 603
 
Join Date: Jul 2003
Location: Silicon Valley
Quote:
Originally Posted by fernandovalente View Post
I don't have any experience with signal processing. Is there any high-level lib to do that(one that would return the float values of the beats)?
You need to learn enough signal processing in order to use more descriptive terminology than "float value of the beats". Most spectrum analyzers do nothing of the sort. Using an FFT to do spectral analysis without understanding some signal processing can get you into all sorts of trouble (e.g. a spectrum analyzer that produces garbage results, or unattractive results).

The mid-level library built into Mac OS X is the Accelerate framework.
firewood is offline   0 Reply With Quote
Old May 23, 2011, 12:25 AM   #9
mfram
macrumors 6502a
 
Join Date: Jan 2010
Location: San Diego, CA USA
I was looking at the documentation yesterday and noticed that Apple has already done a lot of work for you if you want to write an iTunes Visualizer plug-in. The doc is here.

If you can figure out how to get it working, then iTunes gives you everything you need. When you get the kVisualPluginRenderMessage message, it gives you the audio sample data and even the spectrum data because it has already done the FFT for you. You just have to do something interesting with the data!
mfram is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Handbrake Audio Questions (AC3 Passthru) azchandler Apple TV and Home Theater 1 Dec 24, 2013 09:24 AM
switching from G5 to mac pro 4,1 (audio questions) cracktot Mac Pro 2 Dec 13, 2013 06:00 PM
AudioVault Pro | Best audio recording & audio safe app for iOS 7 plescape iPhone and iPod touch Apps 0 Sep 21, 2013 12:21 PM
audio cable questions DaveTheRave Digital Audio 4 Jan 13, 2013 08:54 AM
Questions about exterior Audio on MacBook Pro with Retina iRobby MacBook Pro 5 Jun 24, 2012 05:26 PM

Forum Jump

All times are GMT -5. The time now is 03:57 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC