LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency peak detection and save to .csv file

Hi,
I would like that the VI opens the .wav files which recorded by me, make an FFT and find the 5 highest frequency peaks and their amplitudes from the frequency bulges. And finally save this 5x2 values into .csv file for each .wav into a new .csv. Just the significant frequency and its amp point in two columns in .csv.
I started this program in Labview 19 and also save it into Lv16. I attached  pictures, the semifinished VI and some wav files. Sorry for my english!
Can somebody help me?
Download All
0 Kudos
Message 1 of 2
(2,243 Views)

You were close to finding peaks, then need to sort, and keep the 5 largest.  There are more elegant ways to do this, but here's one that follows your start (which was close to working). 

 

I've also included a VI to do an alternative peak detection, which you might use to suppress unwanted side peaks without resorting to smoothing you just need to decide a peak must be > delta_Y from surrounding pts.

 

I've tested some of your data and it definitely works, though the parameters required vary from dataset to dataset.

 

peak_detect_sound_wave_fft_cds.png

 

Sorry I worked on the 2016 version in LabVIEW 2019 but used sort 2D array before realizing its not backwards compatible and couldn't back save.  

 

Craig

 

 

Download All
Message 2 of 2
(2,196 Views)