[SCRIPT] Simple Sound Visualizer

Hi,

I created simple script and it works!
Inspired by the work “Building an Audio Visualizer in Python” of Patrick Boelens from cgcookie.com I decided that I will do something similar to the simple “equalizer”.

A few problems in my script, which are not solved:

  • size 32x32 (32 rows and 32 columns) baking generate 477MB blend file + long baking time (For each bar is baked animation) and using lot of RAM (~0.7 GB - 2.5 GB)
  • The script doesn’t have a GUI
  • this is my first python script for blender, so probably my script is poorly written :slight_smile:

I decided to make it available to the community because the community has helped me in this difficult task. I don’t know if I will continue its development.

edit:
update v0.31 (16.08.2013):
GitHub Repository https://github.com/gethiox/GXAudioVisualisation

Great! It works and looks really cool. I hope you continue developing this. I’m still playing around with this script. Thanks for sharing.

i want to use it but i don’t have that much experience with blender… can you make a tutorial on how to do it(maybe how to do it on windows too, cause i don’t get it to work(like do i have to convert the audio file to ogg and to i have to convert it 2 different files))

@thibaultmol:
Open script in Blender Text Editor, type FULL localization of sound file for file_l, file_r (eg. /mnt/disc/music.flac or C:\Folder\music.flac); type rows and colums count for value_x, value_y; clear scene with [A] > [X] > [Enter]; Active first and second layer (or all); run script.

Hello, I’m new to this forum. Please can any body help me know how a visualizer basically work. I’ve got the waveform of the audio. How to use it to make a music visualizer. Thanks for the help.

Nice script I had been doing it mostly manually.

I found this seems to have stopped in 2.65. It ran fine up to 2.64. I always keep old copies around as this happens often some things stop working or don’t work as well in the new. I am not great at Python so right now not sure which statement needs to be updated.

I don’t fully understand what you say. You want to say that this script work on blender 2.64 version, but doesn’t work on 2.65?

yeah runs fine in 2.63 and 2.64 but NOT 2.65. I just happen to still have those 3 versions installed (nothing earlier) so something has changed in 2.65 that makes the script fail. Maybe a transform statement or something?

creeduk, It works fine in blender 2.65 version for me, but probably Batfinger is right. It was old unused parameters, I removed it.
Here is GitHub repo with 0.3 version https://github.com/gethiox/GXAudioVisualisation

AH well I tried updating this part (in all 4 locations)


attack=op.attack, 
release=op.release, 
threshold=op.threshold, 
use_accumulate=op.use_accumulate, 
use_additive=op.use_additive, 
use_square=op.use_square, 
sthreshold=op.sthreshold)

And made sure I edited the bake details to match the few changes e.g. use_accumulate=False etc.

It still fails so maybe more calls also to be changed. Is there a method to look depreciated commands?

first remove double post - happened by mistake

Sorry because our posts did not show up (waiting for moderation) I did not see your response but thanks I did get the PM Thanks again for the update With 0.3 works great actually faster and cleaner.

Just to expand 0.2 on GitHub 2.65a failed line 173 so just as batFINGER pointed out and Also big thanks to batFINGER as I always tried changing my view to console (where you change to 3D etc.) and of course I would never see the error messages I wanted. Now I finally know how to look for them properly DOH! :smiley: (for anybody else it is the Windows menu toggle system console).

Oh and another thumbs up as batFINGER edited his post to make it clearer which parts were in error. Thanks to both of you for fast responses. I am trying to get onto Blender and my Kids as I I grew up on 3D max but love opensource solutions, help like this makes it possible.

Update:
0.5 version here, yay > https://github.com/gethiox/GXAudioVisualisation
big changes:

  • GUI panel in 3d_view! (yeah, not prepare for new panel system yet)
  • 2 new vis options - cube_scale and center_cube_scale

bad things:

  • script still need to run into text editor, problems with make script as addon
  • poor quality code, it just looks like experiment. (In fact, it is so. I do not understand most of the API side of script)
  • Poor knowledge of the programmer.

Maybe I get some help, that would be great!

Have a nice visualisation!

Attachments


hello batFINGER,
Thanks for hints, your addon looks very good. In fact your script do the very same thing as my, but much better with lots of control and options.
Maybe I will find some time in future for myself and my script.
Again, many thanks.