Fun with code (since 2006)


06.21.06 Posted in Actionscript 3, SoundMixer by

1. Curved computeSpectrum() , vectors drawn on Bitmap with blur filter applied.


Example here, click to change the gradient colors, and blend modes.

2. Basic computeSpectrum() , fillRect() on Bitmap with blur filter applied.


Example here (click on it to apply Fourier transformation )

Sources available here

28 Responses to “Equalizers”

  1. Goach says:

    hehehe, j\’inaugure les commentaires !!! i\’m the first one !

  2. dehats says:

    Can’t wait to get my hands on this!


  3. Dakular says:

    Nice work!

  4. pascal says:

    Nice but, is there a chance to have a source exemple ?!

  5. thibault.imbert says:


    sources have been posted :)

  6. Boris says:

    You make my transit to AS3 so more interesting and less painfull ;)

  7. Joan Garnet says:

    Nice work,
    they look very good.
    Thanx for sharing.

  8. akme says:

    I got this thing trying to watch

    SecurityError: Error #2121: Security sandbox violation: SoundMixer.computeSpectrum: cannot access . This may be worked around by calling Security.allowDomain.
    at asfiles.spectrums::SmoothSpectrum/asfiles.spectrums:SmoothSpectrum::updatePoints()

  9. thibault.imbert says:

    hi akme,

    this is strange, let me check it :)

  10. Lorenz says:

    hey thibault,

    this question may seem very dumb for you and others…

    but what kind of data are used to draw the different states of such an equalizer???

    I just don’t get it…I thought it isn’t possible to make an “real” equalizer in flash, because you can’t access all the data embedded in the sound file etc.?!?

  11. thibault.imbert says:

    hi Lorenz,

    to draw an equalizer what you need is to loop through a bytearray containing the sound spectrum, if you call SoundMixer.computeSpectrum() you will get that bytearray, which is 2048 bytes long, containing 512 float values (4 bytes)
    then you read those values with the ByteArray.readFloat() method.

    Then draw with some bitmap methods the lines or squares to represent the spectrum.


  12. maya says:

    great stuff, thanx again for sharing the sources

  13. Philip Seyfi says:

    2Lorenz : Was impossible until AS3 ;)

  14. Roland says:

    great example ofcourse, but:
    whats the song thats playing in the upper example? its so lovely…
    michelle petrucciani? (no…)
    help me!

  15. seb says:

    Merci, merci, merci!!
    Très cool, et trop sympa de nous filler les sources!
    Continue comme ça!

  16. Inder says:

    Great work Thibault … Keep it continue..:)

    Thanks for sharing resources…

  17. Adam. says:

    Hear that? It’s my little mind blowing…

    That’s just spectacular Thibault. It’s going directly into a project now…

  18. Matt says:

    Merci, superbe script !!
    J’ai une question, comment ne pas avoir un fond de couleur généré (ici du noir) par ce script mais uniquement les barettes ?
    je souhaiterais pouvoir l’inclure au dessus d’une image et donc que le fond soit transparent, peux tu m’éclairer ?
    Merci encore !

  19. snipx says:

    Hello Thibault,

    It’s a great job that you done. And It’s really helpful to give the sources. Big up to you ;)

    I have just a question : why the compiler makes an error when we try to compile in strict mode ? (Flash say he attempt to have a DisplayObject instead of BasicSpectrum type, as if flash don’t recognize the type of BasicSpectrum).

    Thanks you

  20. Thibault Imbert says:

    Hi snipx,

    Download the new sources, I have updated and optimized all the code. It should compile with no problems in strict mode now and run faster :)



  21. Thibault Imbert says:

    For information, the track playing is from a French Jazz/Funk group from the 70′s called Cortex.

    More infos here :



  22. jose says:

    salut thibault et merci pour ces superbes spectrums, j’ai juste un soucis. dans le cas ou j’ouvre une auyte fenetre internet et que je navigue un peu trop haut sur la fenetre le son sature a en faire peter les vitres :) as tu une solution


  23. [...] – Alternative Smooth Spectrum Visualization created by Thibault Imbert [...]

  24. [...] -Alternative SmoothSpectrum visualization created by Thibault Imbert [...]

  25. [...] iPhone Software. Our apps are CoverSutra for Mac OS X and Groceries and Tipulator for the iPhone.Equalizers <font size='1'>[ by Thibault Imbert ]</font …[ 1. Curved computeSpectrum() , vectors drawn on Bitmap with blur ... Example here, click to change [...]

  26. umzug says:

    wow supper demo

Leave a Reply

Open Sort Options

Sort comments by:
  • * Applied after refresh
Fun with code since 2006.