Old 9th November 2008, 05:29   #1
kunzy
Junior Member
 
Join Date: Nov 2008
Posts: 8
Trying to make a vis plugin of sorts

I think i made my last thread in the wrong area (http://forums.winamp.com/showthread....hreadid=299596).

Anyways, i need a little help understanding what winamp calls in a plug in and what data is passes to it. More specifically what the waveformData and spectrumData arrays contain.

Overall, what i would like to do is separate the frequencies into high, low, and mid so i can output them to a circuit. I already got my circuit programmed to an RGB LED. I would like for the red to go bright as the lows get louder and such.

I have almost everything done but the plugin for winamp. I have looked and looked at power points, guides and tutorials on the internet, but i just need a psudo-code type explanation of what is happening.


Thanks a ton, and if anyone is interested, i will see about posting code and schematics for the whole bit. I just need some help.
kunzy is offline   Reply With Quote
Old 9th November 2008, 06:00   #2
Munga
Junior Member
 
Join Date: Nov 2008
Posts: 5
That is almost exactly what I need, which I posted right before this thread. I would also be very appreciative of any help.
Munga is offline   Reply With Quote
Old 9th November 2008, 06:28   #3
kunzy
Junior Member
 
Join Date: Nov 2008
Posts: 8
Wow, you got the same project going on that i do.

I will help where i can, but i am using different hardware. You are using the arduino (i thought about that one) but i had a lot of PIC16F family ICs laying around.

But i need help with the winamp vis programming
kunzy is offline   Reply With Quote
Old 10th November 2008, 20:49   #4
Munga
Junior Member
 
Join Date: Nov 2008
Posts: 5
I am also trying to export the spectrum data. Unfortunately, I do not have enough C++ experience. Anyone care to help me create the code to simply be able to access the spectrum data so I can send it to my hardware?
Munga is offline   Reply With Quote
Old 12th November 2008, 08:48   #5
Mr_Nudge
Major Dude
 
Mr_Nudge's Avatar
 
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
why not just use your line-out socket on your motherboard?

Life's a game, break the rules
Click here
Mr_Nudge is offline   Reply With Quote
Old 12th November 2008, 19:56   #6
Munga
Junior Member
 
Join Date: Nov 2008
Posts: 5
Quote:
Originally posted by Mr_Nudge
why not just use your line-out socket on your motherboard?
It is much easier and more feasible to have most of the FFT and spectrum calculations done on the software side. In my case, I am looking for a way to send one or several integer values of the spectrum to my hardware, which can then act based on that data.
Munga is offline   Reply With Quote
Old 13th November 2008, 08:55   #7
kunzy
Junior Member
 
Join Date: Nov 2008
Posts: 8
Thought about just using the line-out, but i would like a more universal way of doing it. That and i want to minimize hardware, so if the computer can do it, i spend less on parts and on circuit design.

I just dont get it, there are 1,000+ plugins for winamp, yet not a one is willing to share some knowledge about how to do it.
kunzy is offline   Reply With Quote
Old 13th November 2008, 12:04   #8
GereBear
Junior Member
 
Join Date: Nov 2008
Posts: 2
I can help you... however I need a little more information...

1) how are you wanting to export to hardware? Parallel? USB? Serial? etc. Are you wanting to send the DATA or i/o signals?

2) are you just curious how to pull the numbers from the spectrum and use them...

3) Which Language?
GereBear is offline   Reply With Quote
Old 13th November 2008, 17:16   #9
Munga
Junior Member
 
Join Date: Nov 2008
Posts: 5
Quote:
Originally posted by GereBear
I can help you... however I need a little more information...

1) how are you wanting to export to hardware? Parallel? USB? Serial? etc. Are you wanting to send the DATA or i/o signals?

2) are you just curious how to pull the numbers from the spectrum and use them...

3) Which Language?
I already have the capability of sending data over the serial port, which is what I am using, in C and C++. I simply need to know how to pull the numbers out of the spectrum, which I would send to the hardware telling how many LEDs to light up, creating an LED spectrum.

Oh, and I prefer to work in C, but am learning C++.

Thanks,

Alec
Munga is offline   Reply With Quote
Old 14th November 2008, 17:53   #10
kunzy
Junior Member
 
Join Date: Nov 2008
Posts: 8
1) sending it out the serial port using USART. Still finishing up the touches on the interface. Basically, i need it to send out 3 values between 0 and 255. each value controls the brightness of each color.

2) Yup, just need to know what the values in the array represent. Like is one dimension time and the other a value? Is one the frequency of the tone and the other the amplitude?

3) c++ will work. But i can do other languages if you want. Whatever your preference is.

Thanks a ton for your offer to help!!!
kunzy is offline   Reply With Quote
Old 17th November 2008, 20:12   #11
GereBear
Junior Member
 
Join Date: Nov 2008
Posts: 2
alright, this_mod->spectrumData[y][x]

the array is divided into two channels 0 and 1 (y)

and 288 freqencies on the spectrum [x].

the value held in that location is the inverse amplitude of that particular frequency on that channel (eg. a large waveform (loud sound) on [0][129] would return 0 and no sound on that channel would return 255

don't forget to set the spectrum channels to 2! (the 8th value in the 'winampVisModule' struct.)


I hope that helps
-gb
GereBear is offline   Reply With Quote
Old 17th November 2008, 21:24   #12
kunzy
Junior Member
 
Join Date: Nov 2008
Posts: 8
That helps a ton, i am going to do a little more playing and see if i need help again.

What about the waveformData array?
kunzy is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

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 On
HTML code is Off

Forum Jump