09-26-2020 08:05 PM
For a project I am working on I have a vi that can read and plot wav files on a waveform graph as well as the FFT. I also have a vi that can read all the wave files in a given folder. The next step in this project is to make it so the vi will plot the amplitude of the first harmonic of the FFT (I am working with instruments) ex. if I play an A it will plot the amplitude at 440htz. I also have excel sheets saved with the data of the FFT of each of these wave files. Anyways, I am stuck trying to take the amplitudes of these frequencies and plot them. I hope this all made sense, I am a high schooler and I am new to LabVIEW and programming in general so I hope you guys can help me. I have attached the vi that reads the wave files and plots them and the vi that that reads all of them at once.
09-27-2020 01:19 PM
Hi user,
@user9485 wrote:
The next step in this project is to make it so the vi will plot the amplitude of the first harmonic of the FFT (I am working with instruments) … Anyways, I am stuck trying to take the amplitudes of these frequencies and plot them.
You already calculate the sprectrum and plot it in a graph.
What exactly is your problem when you already get the FFT result plotted?
Btw. don't use that local variable in your VI: use wire instead!
09-27-2020 02:59 PM
I need to be able to find a spefic point on the FFT (the amplitude at a certain frequency).
09-27-2020 03:15 PM
The FFT graph is a datatype similar to a waveform.
A waveform is an array of values, a T0 and a dT.
An FFT cluster is an array of amplitudes, an F0 (probably 0), and a dF.
So index N in the array has an amplitude value, and a frequency of N time dF.
09-28-2020
10:32 AM
- last edited on
09-04-2025
09:03 AM
by
Content Cleaner
As has been said, you abuse of local variables introduces a glaring race condition in that the FFT will work on the data from the previous call. So fix that first!
@user9485 wrote:
if I play an A it will plot the amplitude at 440htz. I also have excel sheets saved with the data of the FFT of each of these wave files.
Can you explain how the data from the excel file correlates with the data from the wav files? Do you have independent information of what the sound should be or do you need to find the predominant frequency in each file? Depending on the data sampling (N, dt) there might not even be a point at exactly 440Hz. Is each wav file a pure sample or does the sound change with time (JTFA). How do you know there is only one dominant frequency (+harmonics). For example in DTMF sounds, you have two.
@user9485 wrote:
I have attached the vi that reads the wave files and plots them and the vi that that reads all of them at once.
Disk access is a sequential operation, so while you can automate reading and analyzing all files in sequence, it cannot happen all at once in parallel.
You might get better help if you would also attach a set of typical data files (wav, xlsx) so we have a better idea what's this all about. How long are the recordings?