Old 1st December 2007, 04:01   #1
AJ Sindri
Junior Member
 
AJ Sindri's Avatar
 
Join Date: Nov 2007
Posts: 29
Lightbulb Music Analyzers

I've been making a few music analyzers: a bar for waveform, a movement (explain later) for the spectrum and a remix of each.

Bar Analyzer:
This was originally going to be for a windows media player clone I was making for WinAmp, but I have abandoned that project because the visuals on media player are horrible. Out of the entire pack, this preset is the best. Each bar is the waveform band 1/50 to 50/50. Using the floor function, each peak indicator is raised up to the height of the bar and an if statement resets the gravity acceleration to 0. This preset works perfectly except the lines dividing the bar are not evenly spaced at certain resolutions.

Spectrum Analyzer:
Instead of having an object that changed its shape based on the spectrum data (like a superscope) I used the following equation in the dynamic movement:
y=y+abs(getspec(abs(x*.65),0,if(above(x,0),2,1)))/10
The closer to the y axis, the higher the pitch is and the farther toward the edge, the lower the pitch is. The if statement corresponds the left side of the preset to the left speaker and visa versa. Using the fadeout, the longer a pixel exists, the fainter it becomes. The gray scale is mapped into color using the colormap; yellow is the spectrum data and blue is the average of the spectrum data. I hope you like it.

Fire Analyzer:
The fire analyzer takes the spectrum analyzer a step farther and maps the oscope data in 2 directions. (the base equation):
y=y+getosc((x+1)/4,0,0)/10;
x=x+getosc((y+1)/4+.5,0,0)/10;
This preset is a visual expression of the shape of the wave form data; a flute would make smooth fire while heavy metal makes twitchy fire. Soft music makes a candle and loud music make a fireplace effect. What I’d really like to do is record the spectrum data every beat and transition from one beat to the next. Another goal is to create dynamic smoke. If you have any ideas on how I could improve any of the preset, please leave a comment.
Enjoy!
Attached Files
File Type: zip music analyzers.zip (4.1 KB, 456 views)
AJ Sindri is offline   Reply With Quote
Old 1st December 2007, 20:01   #2
PAK-9
Major Dude
 
PAK-9's Avatar
 
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
This is pretty good for a fresh face (most people come up with some truly awful first presets)

My only advice at this stage would be to look at optimising, for example your bars presets use texers which is a very expensive way of rendering lines. You are given a line renderer (ssc) so why not use it(!) You can also consolidate all of the lines into just one looped ssc, which is a lot less effort than duplicating lots of individual effects (I bet you got sick of that pretty quickly huh?) I have attached a preset which is a very simple example of how to do bars like yours with a superscope.

You might want to look at the programming guide (see tutorials thread) for some more tips, but you seem to have a grasp of the avs language so you may prefer to just learn for yourself
Attached Files
File Type: zip bars.zip (426 Bytes, 399 views)

http://PAK-9.deviantart.com

...innit
PAK-9 is offline   Reply With Quote
Old 3rd December 2007, 03:03   #3
AJ Sindri
Junior Member
 
AJ Sindri's Avatar
 
Join Date: Nov 2007
Posts: 29
Wow...

Thanks so much! This was exacly what I was looking for. Your version run about 15 times faster than my original. It will take some time for me to be able to code loops in WinAmp, but I get the concept. I'm glad that I can't make an infinite loop (I crash my computer enough as it is).

Would using triangles help the fps?
Is the megabuff trans-scc, meaning can I set the megabuff in the first scope and use it in later scopes?
AJ Sindri is offline   Reply With Quote
Old 3rd December 2007, 20:14   #4
PAK-9
Major Dude
 
PAK-9's Avatar
 
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
Triangles wouldnt really help, line drawing algorithms are faster than triangle rasterising algorithms (although tomy's ape is very fast). The megabuf is not accessable between effects, the gmegabuf however, is.

I am going to point you here:

http://pak-9.deviantart.com/art/AVS-...Guide-11200891

for more programming advice, since its basically what I would say anyway.

http://PAK-9.deviantart.com

...innit
PAK-9 is offline   Reply With Quote
Old 3rd December 2007, 21:38   #5
Nanakiwurkz
Senior Member
 
Nanakiwurkz's Avatar
 
Join Date: Apr 2006
Location: Planet Shintovia
Posts: 383
again i'm wowed. Aj Sindri your what i would call the best noob around so far. better then me i'll admit.

your spectrum analyser (fire) was really impressive. most realistic approach to a fire preset i've ever seen.

As far as idiots go i'm not sure.
But as far as genius goes again i'm not sure. Now when it comes to imagination now thats another story.
Nanakiwurkz is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > AVS > AVS Presets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump