• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

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.
0
Marktalbot
Asked:
Marktalbot
1 Solution
 
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now