spectrum analyser

i have to write some software to display an analog wave form sample though the serial port. I want to now how to display this in the form of a spectrum analyser.
MarktalbotAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

adityauCommented:
Which control are you using to display the wave. If you are not using any control, you can use Olectra Chart.
0
3rsrichardCommented:
Are you asking if there is a "spectrum analyser" control or are you asking how to draw on a form?

If it's the latter you use
Form.Line (X1, Y1)-(X2, Y2)
0
ryanvsCommented:
If you are looking for code to do FFT and other DSP stuff, this is not going to be the answer.  If, however, you are just trying to display the waveform on-screen, then checkout:

http://support.microsoft.com/support/vbasic/vbmm.asp

Look for the sample called Playing and Displaying Wave Data.  Granted, they are taking the waveform data from a .WAV, but it isn't too difficult to change to serial input.  However, their plot is with fixed data (the size of the data is static) so changing it to dynamic data would be more involved.

Good luck.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

MarktalbotAuthor Commented:
i can draw the wave to the screen but a want to be able to display not in the form of an ossiloscope trace but as a nuber of lines repreenting the aplitude of a specific frequency
0
ryanvsCommented:
I know I've seen VB Algorithm books with FFT.  You might want to check out:
http://www.fullspectrum.com/deeth/programming/index.html

I know there are other sites out there with this stuff, but that is what I found first.
0
3rsrichardCommented:
Then how about

Form.Line (X1, Y1)-(X1, Y2)

that draws vertical lines.

Or
The simplest way of plotting a chart is to create an array of numeric values, and then set the ChartData property to the array, as shown in the following example:

' This code might be pasted into the Load event
' of a Form that has an MSChart control named
' "MSChart1".
Dim arrPrices(1 to 10)
Dim i As Integer
For i = 1 to 10
   arrPrices(i)= i * 2
Next i
MSChart1.ChartData = arrPrices

 
0
15brentCommented:
My suggestion would be to find out what a good program that provides a spectrum analysis looks like.  I highly recommend checking out www.spectraplus.com  The have a trial 30 day version that will show you in real time in both time, freq and freq over time displays of audio coming into your system (e.g. mike, CD, line in,...)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.