Author Topic: I made a visualization  (Read 2498 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I made a visualization
for WMP
to install simply save the dll somewhere and run the batch file along side it.
then go into WMP and select the Radix visualization.


it's a GLSL based visualization, basically it presents the frequency level graph radially and the wave form wrapped around it, and uses dominant frequencies and a rather complex reaction to determine colors. it requires PS v2 to run, I imagine most everyone has that by now, but if you get an ugly blue mess, rather than a neat looking set of concentric circles then something whent wrong compiling the shader (ie your card doesn't support PSv2)


it's sort of hard to get to but if you know any GLSL (which is basically a dialect of C) you can make your own shader to run on this (don't have any file support unfortunately so copy/paste is your friend). to get to the editor you need to go view->plugins->options->(it should already be on the plugin tab and have visualizations selected)->select radix from the available visualizations->click the properties button. you should probably have some goggles on to prevent the blood that will come from your eyes from damaging any nearby computer equipment or stain your carpeting/clothes, this was not a thought through project, this is probably the most hacked together POS code I've ever written, mostly because I've had to try ten different ways to get particular thing to work, the HLSL code is just horrible, just me screwing around with a bunch of random variable until it makes something that looks nice, it's uncommented and has no apparent design to it because there is none. fortunately there are only two not too long functions and one of those is a fairly easy to grasp on how to use (if not how it works, but it does work AFAIK) utility for converting HSL to RGB.

the shader works thusly;
main() is called for every pixel on the visualization's buffer, to get your x/y position use gl_TexCoord[0].xy it will return a value between -sqrt(2) and sqrt(2). at the end of main() is a statement where gl_FragColor is set to something, gl_FragColor is the color of the pixel (note that the frames are alpha blended together, if you don't want to deal with this make sure your output pixel color has it's alpha value set to 0.0). I have all the frequency levels and wave forms packed into a 1D texture (the left and right freq and waveform are packed into rgba respectively), to get access to them you need to sample tex0 with texture1D, the basic syntax is
Code: [Select]
vec4 levels_and_waveform = texture1D(tex0,some_value_between_0_and_0);. if you wanted to get some low frequency level (ie how much bass was going on at that time) you'd use a value close to 0.0 to sample with and you'd use the r (red == right channel freq levels) and/or g (green == left freq levels) as the result.

so if you have experience with C you should be able to use this to make some visualizations

here is a simpler and more readable shader than what you will be presented with when you go into the editor.
Code: [Select]
uniform sampler1D tex0;
const float sqrt2d2 = 0.7071067811865*2.0;

void main()
{

//sample for the wave form, note this sample will have both wave form and freq levels,
//but we aren't going to use levels so who cares
//note there is a bit of coordinate transformation
//the coords are in the range of -sqrt2d2 to sqrt2d2
//we want them in the range of 0.0 to 1.0
vec4 wave_sample =  texture1D(tex0,gl_TexCoord[0].x/sqrt2d2+0.5);

//we want to deal with just one value for a wave form, so let's average left and right together
//-0.5 puts the value into the -1.0 to 1.0 range
//note that the left and right wave forms are in the blue and alpha chanels
float avg_wave = (wave_sample.b+wave_sample.a)-1.0;

//now we cannot choose the output position for this pixel, we can only use it's position, so lets
//set the brightness of the pixel based upon it's 1D distance from the wave for height
//pow is used to make only the brightest point of the color bright
float brightness = pow(1.0-abs(avg_wave - gl_TexCoord[0].y),30);

//let us define a base color, white with no alpha sounds good (rgba)
vec4 col = vec4(1.0, 1.0, 1.0, 0.0);

//now we scale the base color by the brightness,
//GLSL performes vector processing of the color components. cool huh?!
gl_FragColor = col*brightness;
}
« Last Edit: September 01, 2008, 04:28:17 am by Bobboau »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Colonol Dekker

  • HLP is my mistress
  • Moderator
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
What do you need to make these?

I'm interested now :D
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Androgeos Exeunt

  • Captain Oblivious
  • 212
  • Prevents attraction.
    • Wordpress.com Blog
* Androgeos Exeunt downloads and compiles.

Pity Intel graphics card users like myself. It's the blue screen of straight, vertical lines. ;)
My blog

Quote: Tuesday, 3 October 2023 0133 UTC +8, #general
MP-Ryan
Oh you still believe in fairy tales like Santa, the Easter Bunny, and free market competition principles?

 

Offline BlackDove

  • Star Killer
  • 211
  • Section 3 of the GTVI
    • http://www.shatteredstar.org
If you look directly into it, you can kind of remember how it was when you were exiting your mother's womb.

Oh is that only me?

 

Offline Flipside

  • əp!sd!l£
  • 212
Give Me Drugs!!

Seriously though, nice. I have to understand some of this stuff for Uni next year, frankly, I really need to get motivated enough to start.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
you are learning GLSL?

What do you need to make these?

I'm interested now :D

there is an SDK made by MS, not very well documented though. all I did was basically pack all he info you would get from the SDK into a 1D texture and send it to a pixel shader, so using this visualization will probably let you about as much as you could do with the SDK, minus interframe stuf or file loading or one time initialization stuff.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Retsof

  • 210
  • Sanity is over-rated.
Uhm... I jsut get a bunch of vertical nlue lines that change color when the music starts, looks kind of cool anyway.  You should make a subspace or beam cannon one.
:::PROUD VASUDAN RIGHTS SUPPORTER:::

"Get off my forum" -General Battuta
I can't help but hear a shotgun cocking with this.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
then that means your card likely does not support PSv2, you might be able to get a simpler effect to work though.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
given how everything in the image is synced to some part of the music I'd imagine that it would be rather interesting to watch while high. someone who's into that sort of thing should test it for me. :)
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline BlackDove

  • Star Killer
  • 211
  • Section 3 of the GTVI
    • http://www.shatteredstar.org
A whole new enterprise of quality assurance just opened for business.

 

Offline Colonol Dekker

  • HLP is my mistress
  • Moderator
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
given how everything in the image is synced to some part of the music I'd imagine that it would be rather interesting to watch while high. someone who's into that sort of thing should test it for me. :)

I'm surprised NUKE hasn't turned up yet. That quote is like the bat-signal to him......
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Colonol Dekker

  • HLP is my mistress
  • Moderator
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Apologies for the double post (no wap modify support :p)
 
Bob do you ever use Winamp? I've dabbled in it and i'm keen to see what you'd come up with in AVS :)
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Excalibur

  • 28
  • Forsee a new beginning.
Yes, you have to make one for WinAMP ;)

How do you make a WMP visualisation anyway? The only thing I've done in WinAMP is play around with the settings of visualisations and effects...and extreme EQ values. And I don't really use playlists, I just play from local media in order or random. Some funky stuff comes up in random sometimes...
His legacy will last until the beginning.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I've hardly even USED winamp.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
i used to **** around with winamp's avs, it was pretty fun to play with at first but then i realized i never turn on visualizations.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Androgeos Exeunt

  • Captain Oblivious
  • 212
  • Prevents attraction.
    • Wordpress.com Blog
i used to **** around with winamp's avs, it was pretty fun to play with at first but then i realized i never turn on visualizations.

I've hardly even USED winamp.

I used Winamp last time, and it was a joy to mess around with the AVS studio and make stuff up, but after switching to a less powerful PC and now to a Mac, I can no longer afford this luxury. At the moment, I'm using a mix of iTunes, QuickTime Player and XimpleMOD to play music files.
My blog

Quote: Tuesday, 3 October 2023 0133 UTC +8, #general
MP-Ryan
Oh you still believe in fairy tales like Santa, the Easter Bunny, and free market competition principles?

 

Offline Davros

  • 29
when are we going to see this in fs2 ?

 

Offline BloodEagle

  • 210
  • Bleeding Paradox!
    • Steam
I've hardly even USED winamp.

I use WinAmp all the time. I mean, nothing else plays NSFs, RSNs, GYMs, GBs, USFs, PSFs, HPSs, and DPSs.

 

Offline redsniper

  • 211
  • Aim for the Top!
Without even checking, I'd be willing to bet that VLC does.
"Think about nice things not unhappy things.
The future makes happy, if you make it yourself.
No war; think about happy things."   -WouterSmitssm

Hard Light Productions:
"...this conversation is pointlessly confrontational."

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Steam
    • Something
I'm curious as to why anyone would use the shoddily-coded ball of frustration that is VLC when there are options like KMPlayer available.