Archive: APE spectrum-data different from vis spectrum-data?


21st June 2003 11:58 UTC

APE spectrum-data different from vis spectrum-data?
I'm trying to turn my viz into an APE. But the spectrum data seems different.

For the viz, I was given
unsigned char spectrumData[2][576]

For the APE, I am given
char visdata[2][2][576]
where visdata[0][..] is for spectrum data and [1][..] for waveform.

I imagine that although the type says 'char' it really means an unsigned char. So in my APE I do this:
unsigned char v = *(unsigned char*)&visdata[0][chan][f];

But the spectrum data I get this way is very different to what I was getting from Winamp2/3. It kind of hovers at higher values.

Does anyone know where I can find documentation on the contents of the visdata array?


Ha ha ha!!! Documentation for winamp?!!! Just kidding. No, but seriously, has anyone else had this problem? Find the equations that relate the two? I really want my APE to respond the same way as my viz.


Thanks in advance for any help.


21st June 2003 15:36 UTC

look in the SDK theres an ExampleVisData and you can also see http://forums.winamp.com/showthread....hreadid=137748 <<< darkains DejaVU source


21st June 2003 16:06 UTC

Neither of those help. I already know how to write a viz and an APE, and I know that both of them pass an array[2][576] of spectral data, and I can draw something that responds to the spectral data.

Both of the examples you pointed me to use spectral data, but they only use viz spectral data not APE spectral data, and they don't give any hint as to what the spectral data means (ie. what is the scale, is it the raw output from a fourier transform or has it been exponentiated, whatever...)

But my point is: vizs and APEs pass *DIFFERENT* arrays of spectral data: the contents of the arrays are related, but different. I need to know the mathematical relationship between spectral data passed to a viz, and spectral data passed to an APE. Only then can I write a plugin that behaves the same way in both settings.


28th June 2003 11:48 UTC

Ummh don't know but maybe steve or other APE gurus can help. Moving.


28th June 2003 16:12 UTC

Maybe UCD could do some help.:rolleyes:


28th June 2003 16:40 UTC

Steve is the one I was think of. :);)


29th June 2003 06:07 UTC

I dunno, I think His High Nobleness Wittens would be better.


29th June 2003 07:13 UTC

I doubt steve would ever see this thread.:rolleyes: