Post your VB and VBA discussions here
Post Reply
Posts: 3
Joined: Fri Jan 16, 2009 5:27 pm


Post by gtfa » Wed Jan 21, 2009 11:12 am

Hello again!
First of all, I'm sorry for the many questions I've been making!
But I'll tell you what I'm trying to do: in the company I work, my boss asked me to write a program to be used in a laboratory test. It consist in an impedance tube where a stading wave in frequency of 1/3 octaves fills the tube. It is used to find the absorption coefficient of materials. The program I developed consisted in measuring the peak voltage and the minimun voltage through the tube of each sound generated by a DVD Player and a loud speaker with an amplifier. I did the program / routine and tested it but we found out that our signal is not being filtered so we are measuring the standing wave with all the harmonics caused by the air and other things. My boss had an idea and that's the point where I'm in doubt: we could analyze the spectrum of the standing wave since it shows all the harmonics plus the standing wave in the frequency we are measuring. So I would rewrite the program to get the peak amplitude and the minimum amplitude of the sound in the tube. Is it possible to do? I'm sending a picture of what I need (red circle).

Thanks for all and I apologize for any incovenience caused.
Example of the peak amplitude.
(53.37 KiB) Downloaded 60 times
Spectrum 2.jpg
Example of the minimum amplitude.
(80.79 KiB) Downloaded 65 times

Advanced User
Advanced User
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Post by gruntman » Wed Jan 21, 2009 11:54 pm


To get the peak and minimum decibel amplitude of the sound waveform you are going to have to run the signal though a FFT. The FFT is generated through the software as the PicoScope units export the raw data times and values. There are several sources of code available for the different types of FFT's. After a quick search on Google for FFT code I came up with the following. While this isn't based in VB it should at least give you an idea as to the procedure to follow to convert the times/values into the FFT values that you are needing.


Richard Boyd
Crag Technologies, Inc
FFT based in C
(7.43 KiB) Downloaded 281 times

Post Reply