View Graphic Equalizer Example or View the Source
A recent Flex project that’s still under construction needed a sound/graphic equalizer built for it, enabling the user to adjust the audio properties of a sound loop.
Now while there are several tutorials out there for “graphic equalizers” in Flash, these “equalizers” aren’t actually affecting the sound being produced, only reporting what is heard.
What was really needed was something that could modify the sound output. After weeks of googling, there were a few leads, but nothing seemed to be the complete solution to the problem.
Luckily, along my path I ran across a tutorial about a 3-band equalizer in flash using the sound.extract function of AS3/Flash 10.
Finally, a working example! Except it didn’t work. The example was created for a beta version of Flash 10, and the latest version used a different event name. But it was enough to get things flowing.
After upgrading the function names, customizing the script for 5-bands of equalization and converting it to run in Flex, it finally worked. It was a long journey, but hopefully this post makes it a short path for anyone else out there trying to create a true sound/graphic equalizer in Flex/Flash.
View Graphic Equalizer Example or View the Source
If you have any tips/suggestions, please feel free to leave them in the comments section. I really don’t understand how the math changes the frequencies, so if you have any tips there, they’d also be appreciated.
Article labeled as: equalizer, extract, flash, flex, sampledataevent, sound
Priya says: (November 9, 2009)
I want to develop vertical bars in equalizer showing sound levels.
Which flec UI-Component should I use for that ??
If you suggest me it would be great help for me ..
priya4562@gmail.com
Thanks,
Priya
Kevin says: (November 10, 2009)
@Priya
Good question, I’d suggest taking a look into the SoundMixer class and computeSpectrum. These tutorials will cover more on that:
http://is.gd/4SeQO
http://is.gd/4SeRk
If you’re looking for an in-depth reading on it, this book looks promising (although I’ve never read it):
http://is.gd/4SeRv
Good luck!
Kevin Lamping
andre says: (January 24, 2010)
hi,
i found this your application http://ciboloweb.com/website-resources/flex-sound-equalizer/srcview/index.html extremely useful and for a bigger project.
The problem is that i want to have the same in flash..the major problem are the sliders (is not like just a function like in flex).
Can I have the Equalizer.mxml in a Equalizer.fla ?
I would really appreciate your help.
Kind regards
Kevin says: (January 27, 2010)
@andre
Unfortunately I don’t have a flash equivalent of this available. You might want to check the article I linked to in my post:
http://is.gd/7c50Q
Hopefully that helps,
Kevin
Pascal says: (January 29, 2010)
Sorry but ehich class have the SampleDataevent ??
my Flex Builder 3 didnt now this Class
Pascal says: (January 29, 2010)
Ok sorry flp 10 i forget
Travis says: (February 3, 2010)
I also had the issue with the SampleDataEvent, here’s your solution:
http://natescodevault.com/?p=157
Requires Flash 10…
Dave says: (March 12, 2010)
Wow, that’s awesome! I didn’t check the code yet, but is it possible to rise number of bands any further?
Kevin says: (March 23, 2010)
Yes, you can raise the number of bands infinitely, but I wouldn’t recommend it. The algorithm used is still a little too slow to handle all those calculations. I’m certain there are some efficiency gains that can be done to improve this code, but I just don’t know enough about the math. Feel free to take a shot at improving it if you’d like. I’d love to see this be improved.
Arindam Mojumder says: (April 16, 2010)
Hello Sir,
YOur code showing an error on line no 29: private const _sliders_vect:Vector.<VSlider> = new Vector.<VSlider>();
Severity and Description Path Resource Location Creation Time Id
1084: Syntax error: expecting identifier before lessthan. Equalizer/src Equalizer.mxml line 29 1271410724781 7
Can you help me plz?
ledm78 says: (April 20, 2010)
I need source code to create an swf object media embedded how youtube but with real time graphic equalizer
Its possible??