A decent computer and lots of volume is recommended.

Well, due to the fear of slipping behind, I felt I better start learning the new Flash language, Actionscript 3, and at first glance, one of the coolest features is definitely the SoundMixer.computeSpectrum function.

This is a quick experiment which uses the spectrum data of a streaming mp3 to trigger animation. Although it dynamically reacts to the beat, there are elements of randomness in this example so the animation / visualisation is different every time.

I’ve seen a few Actionscript 3 visualisations before, though they tend to follow the graphic equaliser tradition, whereas I wanted something a little more creative.

I will release some source code as soon as I have built this into a robust class. I intend to build an easily customisable music visualisation program which can build visualisations from your own graphics with various configurable parameters.

Download: AS3 Audio Visualiser

Have fun, but epileptics beware!

The track is Öngyilkos Vasárnap by Venetian Snares

Posted on 14 May 2007
89 Comments
6 Trackbacks

Meta

AS3 Music Visualisation was posted on May 14th 2007 in the category Lab / Actionscript 3.0, Flash, Generative, Open Source and tagged; , , , , , , .

You can Leave a comment.

Twitter <follow>

July 31st 2010 - 4:55pm

Whatever you're doing can't be that important - watch this instead › Wanderland » http://vimeo.com/13674406

Discussion

95 Responses to AS3 Music Visualisation

Leave a Reply

Pingbacks / Trackbacks

  1. 2 years ago Adobe - Make some noise « I Love Flash

    [...] sound, including pitch control, tempo control, EQs, etc. A few days ago I was researching a few audio visualizers and made several [...]

  2. 1 year ago AS3 Flash Music Visualisations on Bandcamp by Soulwire

    [...] AS3 music visualisation 15% similar Actionscript 3 computeSpectrum [...]

  3. 10 months ago computeSpectrum() Roundup! | DestroyYourComputer.com | Blog - Interactive Design Agency

    [...] AS3 Music Visualization (Source in comments) [...]

  4. 7 months ago Current Music Visualisation | HD Visualisations

    [...] in current times, or rather that I have found in my investigations. SoulWire.co.uk has written a quite nice action-script 3 (flash) based music visualisation engine that works very nicely (nice choice of track to demonstrate it with too.) I like the avenues of [...]

  5. 1 month ago Ozzie und die Menschheit » Blog Archive » links…visualisierung

    [...] http://blog.soulwire.co.uk/laboratory/flash/actionscript3-dynamic-sound-visualisation -> schon etwas verrückter…scheint auch ein Programm zu sein. muss ich noch [...]

  1. Joseph Ashwin 1 year ago

    truly incredible. im very new to as3, but ive been fooling around with your codes, and i have really been enjoying myself. thank you so much for this.

    Reply to this comment

  2. Jake Enfield 1 year ago

    Hi,
    I am currently working with Flash on an interactive media project in which sensors are used to detect how much a person is moving. The program will play a song/video while displaying a range box that moves up and down based on the intensity of the sound. The user must move faster or slower to keep their own intensity within the moving range box: otherwise the sound and animation begin to fade out. Oviously, your sound class would be great… I would actually love to use your entire peice in this project if possible. I am not looking to make money off of this project but I would make sure to add you into the credits and give you a link from my site.

    Thanks for the consideration.

    Reply to this comment

  3. Salim 1 year ago

    Hey Soulwire I’m a student studying graphic design just learning flash. I want to build an equalizer similar style to yours please can you help me? I downloaded your flash file and when testing it an error message came up. “Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
    at visualiser_and_mp3player_fla::MainTimeline/frame2()” I’m stuck any suggestions?

    Reply to this comment

  4. joe 1 year ago

    thanks for all the great tuts and sources.
    i wanted to use some aspect from this with a tripped out pie chart.

    It looks amazing, but color is crucial for the project. I took off all the random color function and it works for the most part… however I still get a random blue tint on some MCs. It seems to randomly effect different instances of MCs each time i test the movie.

    any ideas on how to get rid of that?
    thanks!

    Reply to this comment

  5. joe 1 year ago

    ok.. i figured out how to fix the color issue. Didn’t realize there were blending options on there.

    how would one go about adding a playlist to this? so there would be tracks listed in the stage and a viewer could click on them to hear the song?

    thanks for the help anyone!

    Reply to this comment

  6. theRemix 1 year ago

    nice work!

    i got a bunch of computeSpectrum examples on my site as well, built with haXe
    http://remixtechnology.com/tags/audio

    Reply to this comment

  7. JonG 1 year ago

    This is excellent. Anyone have any progress on adding a playlist to this?

    Reply to this comment

  8. Francisko 1 year ago
  9. Carlos 1 year ago

    Hey!

    This player is really fantastic.
    I’ve been looking for a while now and this must be the best. I have an electro-punk band (myspace,com/nicerdicers) and would love to be able to project my own animations during our gigs using your script if it’s ok with you.
    Do you think you could tell me, is that if I want to do, how can I tell the script to use input from the microphone instead of a .mp3 file? My knowledge of flash is constrained to pretty basic operations, and altough I get major parts of the code, I’m completely lost on how to perform this action.

    thanks a lot for your time and congratulations

    Reply to this comment

  10. Soulwire 1 year ago

    Hi Carlos,

    You can use this script in any way you like mate! Sounds like it will look great at one of your shows.

    Unfortunately you cannot currently use computeSpectrum or a similar method on microphone data from flash. It was a feature request for FP10 but hasn’t been implemented yet.

    If you want to get sound from a microphone to power your visualisations in Flash, you could connect to a small server using a socket (check Google or the docs for it) so for example a small App written in a lower level language than Actionscript could retrieve microphone data and then pass it through the socket to Flash. That’s just one suggestion anyway. I might work on this when I get time as it would be a useful tool.

    Good luck!

    Reply to this comment

  11. daniel 1 year ago

    wow this so cool and simple

    Reply to this comment

  12. Matt 12 months ago

    hi i have just stumbled across this page as i was looking up how to make visualisations controlled by music and was wondering if there was a guide for someone who has no clue on all the flash lingo. ie how to implement my own graphics and music.

    Reply to this comment