Does not compute. August 3, 2011 at 10:39 am
Phew! There´s nothing more frustrating if thinks don´t work out the way you expect ´em to. Seems that lastly anyone but me was able to use this little piece of code written in Python by Mr. Doob right from the start. All I got by trying to run it, were tons of error-messages whilst compiling. But actually this script is very handy for effectively ‘analyzing’ audio-files for the use of then syncing them f.e. via WebGL. So lets quickly update this few lines of magic for the use with Python 3 (which I´ve installed) instead of Python 2 (Mr. Doob´s actual code is based on it). Meaning kick out xrange and replace by range and set brackets when using print(). And, most important if you don´t want to end up like me just having half a brain - check the file´s encoding before wondering while it´s still not working (or just be lazy and download the updated code here)… Hereafter, assumed you already have Python installed on your machine, open Windows command prompt, switch to your projects folder and simply execute audio.py like this:
Once you got this running lets leave this bone dry parts and switch over to the more exciting visual fun parts - meaning let´s do some with our just received audio informations and write some audio driven stuff in WebGL. As for instance following little thingy I programmed last night and called it cause of lacking a better word ‘Strange Lattice‘.
Launch (your browser needs to support WebGL!)
I know - I know, some of you still refuse to update your system having an up to date browser that supports proper and sexy WebGL like Chrome or Firefox. All right, uploaded a video of this experiment to my vimeo account as well.
That´s it - enjoy!
!!! Edit: Updated shader for the use with Chrome Canary, but should as well execute on Chrome 12 + 13, Firefox & Safari 5.1