Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
Theme color:
  • 1/3
You are here: Homepage /  Blogs /  Duncan's Blog / equalizer
equalizer
Posted: Aug 02, 2007
Category: Tutorials
Social Media:
Bookmark and Share
 
Here is a file that implements simple audio equalizer bars.
equalizer.ma (you'll find this at the bottom)

The bars are created without expressions through the following construction method:

1. Create a default poly plane with subdivisions = 1,1
2. Move it 0.5 units in Z
3. Move the scale pivot to zero
move 0 0 0 pPlane1.scalePivot
4. Connect the subdivisions height to the scaleZ
connectAttr polyPlane1.subdivisionsHeight pPlane1.scaleZ;
5. Set the subdivisionsHeight to the maximum number of bars in the display, for example 20
6. Do "Edit mesh: detatch component"
7. Select the mesh faces and do "Edit Mesh: Transform Component"
Scale down in y to separate the faces the desired amount.
(if desired do an extrude at this point)
8. group the plane (cntr-g)
9. rotate scale and position the group as desired.
10. "Edit: Duplicate Special" with "duplicate input graph" option and number of copies set to the number of extra indicators.
11. Translate the new indicator groups to the desired locations
12. If desired map a ramp texture to the indicators, with "as Projection" enabled. Transform the projection and edit the ramp for the desired color range.
12. Key the "Subdivisions Height" attribute on the various polyPlane nodes to animate the indicators. You could potentially use a plugin to get the sound amplitude from a wave. The following supposedly does this, but I've not tried it and it may not work with your maya cut.
AudioWave.mll 4.0l

Also I believe there is a sound plugin in Maya Bonus Tools. Note that you could create different sound files with other portions of the sound filtered out. Then use these different prefiltered sound files to drive the different indicators.

In this file I simply keyed the bars using a random expression:
float $t = time * 3.0;
polyPlane1.subdivisionsHeight=(noise( $t )+1.0) * 5;
polyPlane2.subdivisionsHeight=(noise( $t + 3.6 )+1.0) * 5;
polyPlane3.subdivisionsHeight=(noise( $t + 2.1 )+1.0) * 5;
polyPlane4.subdivisionsHeight=(noise( $t + 2.5 )+1.0) * 5;

Note that the texture does not update correctly during playback but it will at rendertime.
In order to post any comments, you must be logged in!
Newest users comments View All 3 Comments
Posted by Duncan Brinsmead on Sep 21, 2011 at 07:00 AM
Super. When the tutorial is ready it would be nice if you posted a link in the comments here.
Posted by Amirb on Sep 21, 2011 at 02:21 AM
special thanks for you
Posted by vfxforge on May 20, 2010 at 09:43 AM
Thanks Duncan, this post is nearly 2 years old, sorry to dig it back up.

Using Audiowave you can indeed animate the EQ with sound volume. ( very easily without any expression )

I'm in the process of doing a vid tutorial for this. hopefully will be able to share it :)