LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analyse sound as it plays from file

I'm currently using the Sound File Read Simple.vi and Spectral Measurements to extract the fundamental frequencies present in a sound file. Currently, the program as it is takes the sound file and analyzes it as a whole (therefore losing information about the evolution of the signal overtime, and seeing it as if the signal is static).

However, is there a way I can adapt this to analyse the recording as it plays (similarly to what would happen if I was acquiring the sound on LabVIEW instead of just uploading a file) or even in increments of time - for example, making the program analyse 2 seconds of the file at a time, so it can retrieve just the fundamental frequencies present in those 2 seconds? 

logolepser_0-1622060547365.png

I'm a bit new to LabVIEW, so I'm not sure if it's possible to control/delay the data analysis in that way and so far I can't find any examples online of this particular problem.

0 Kudos
Message 1 of 3
(1,958 Views)

The data going into the "Signals" input there is a waveform, so you could split it up into sections using the Get Waveform Subset VI. If you use that to split that up into increments and then do your processing and display in lockstep with a playback VI, then you could get pretty close to a live sound read.

Message 2 of 3
(1,905 Views)

What you are looking for is JTFA and it requires the advanced signal processing toolkit.

 

Of course you can also create your own analyzing the data in a reasonable sliding window of an appropriate size and shape. How much do you know about signal processing? Maybe feeding the signal into Windowed FFT PtByPt VI would work. I assume you are only interested in magnitude.

Message 3 of 3
(1,889 Views)