Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research how viscolor.txt colors are used in the oscilloscope visulization #71

Open
captbaritone opened this issue Nov 20, 2014 · 5 comments
Milestone

Comments

@captbaritone
Copy link
Owner

Rows 18 to 22 pertain to the oscilloscope colors. They function in the same fashion as the Spectrum Analyzer. Row 18 controls the colors that is displayed at the troughs and the row 22 is the color that is displayed at the crest. Each row between 18 and 22 sets a different level of the whole wave.

-- http://wiki.winamp.com/wiki/Editing_the_Configuration_Files#Configuration_File_.7C_VisColor.txt

Using the native app, try changing these colors to see if we can determine the function each color has.

@captbaritone
Copy link
Owner Author

I set my viscolor.txt values 18-22 like so:

255,0,0, // 18 = osc 1 - Red
0,255,0, // 19 = osc 2 - Green
0,0,255, // 20 = osc 3 - Blue
255,255,0,  // 21 = osc 4 - Yellow
255,0,255,  // 22 = osc 5 - Purple

Here are some screenshots:

screen shot 2014-11-21 at 12 17 09 pm
screen shot 2014-11-21 at 12 18 54 pm
screen shot 2014-11-21 at 12 18 33 pm

@captbaritone
Copy link
Owner Author

Observations: The colors go from outside in. 18 near the center 22 at the outside. For each pixel along the horizontal axis, we draw a line along the vertical axis from the previous pixel's value, to the current pixel's value. The color of the line is determined by the current y value.

For y values that are going up (along the vertical axis), the line starts at the same y values as the preceding x. When the y values are going down, the line starts one pixel below y value of the preceding x.

@PAEz
Copy link

PAEz commented Nov 27, 2014

Dont forget 22 = osc 6, thats used to, but only for the very bottom of the waveform.

hehehe, its official, I have NO idea how this is done ;)
I thought it would just be a painting of the waveform at whatever location, but it seems its not that simple.
I created this....
http://plnkr.co/edit/OQrRaP?p=preview
...so I could create wave files of only one value to see what winamp would show (wanted to know the true height of the display and what values equal what colours) and its not what I expected at all.
I woiuld have expected to always see straight lines, but try a value like 120 or 64 and see what you get??
I REALLY want to know how it works now :(
I tried asking the source....
http://askjf.com/index.php?q=3006s
...worth a shot, ya never know ;)

@captbaritone
Copy link
Owner Author

I found Qmmp, an audio player that supports classic Winamp skins. Their source code may be a great reference to us: https://code.google.com/p/qmmp/source/browse/trunk/qmmp/src/plugins/Ui/skinned/mainvisual.cpp#579

I haven't been able to run it yet to see how accurate their output is, (I'm on a Mac) but it's very interesting.

Looks like most of the Winamp related stuff lives here: https://code.google.com/p/qmmp/source/browse/trunk/qmmp/src/plugins/Ui/skinned/

Edit: Looked more closely at the code. They only use one color for the oscilloscope visualization :(

@PAEz
Copy link

PAEz commented Nov 29, 2014

hehehe, just because life isnt confusing enough already....
Try making a wave file with that page of 255.
Play it in Winamp and look at the oscilloscope, its a straight line.
Now play it in winamp-js.
I dont know much about audio stuff (especially in the browser, your new to canvas, Im new to webaudio) but isnt fft the analysis of its pitches (equalizer stuff)? Well Im not convinced winamp is doing that at all, I think it might just be showing the waveform for that moment.
I created a high pitch tone at maximum amplitude and loaded it in winamp and winamp js, below are the pics and a pic of its waveform.
With the above straight line thing and these pics it really does look like its show the waveform....low wave forms have even more difference. So....how do you get that data?

Waveform
waveform

Winamp
winamp

Winamp-JS
winampjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants