Algorithm for dB vs time graph for one frequency from FFT?

Click For Summary
The discussion revolves around a physics experiment focused on measuring reverb time for specific frequencies in a room, specifically using a recorded 1000 Hz sound. The user seeks an algorithm or software that can automate the process of plotting the decay of the 1000 Hz sound's intensity over time from its FFT data, as manually extracting this information for multiple time intervals is cumbersome. Participants suggest that while FFT assumes a stationary signal, using multiple FFTs could yield the desired data. However, they recommend exploring digital signal processing techniques, such as bandpass filters or spectrograms, to isolate the frequency of interest more effectively. MATLAB and Python are highlighted as suitable tools for this analysis, offering capabilities to compute spectrograms and extract relevant data. Audacity is mentioned as a potential option, though its flexibility for this specific task is uncertain. Overall, the conversation emphasizes the importance of understanding the underlying principles of FFT and digital signal processing for effective data analysis.
tyiuo
Messages
2
Reaction score
0
I'm doing a physics experiment for school, for which I am measuring the reverb time for specific frequencies in a room. What I did was record a 1000 Hz sound, and some time after it, and looked at its FFT on Audacity to see the intensity of just 1000 Hz at a given time. Manually, I can do this for t=0.2s, 0.4s... so on and compare the values, but I want an algorithm that shows me the decay of the 1000 Hz sound from the FFT by plotting a graph of the intensity vs time of the 1000 Hz. Is there an existing software that does this? I am not able to find it anywhere.

(this is my first question here, sorry for any mistakes.)
 
Technology news on Phys.org
tyiuo said:
I'm doing a physics experiment for school, for which I am measuring the reverb time for specific frequencies in a room. What I did was record a 1000 Hz sound, and some time after it, and looked at its FFT on Audacity to see the intensity of just 1000 Hz at a given time. Manually, I can do this for t=0.2s, 0.4s... so on and compare the values, but I want an algorithm that shows me the decay of the 1000 Hz sound from the FFT by plotting a graph of the intensity vs time of the 1000 Hz. Is there an existing software that does this? I am not able to find it anywhere.

(this is my first question here, sorry for any mistakes.)
Welcome to the PF.

I believe that the FFT usually assumes a stationary (non-changing) signal versus time as its input. If the signal is changing only very slowly over time, you could use multiple FFTs to give you your 1000Hz data. But it sounds like your sound is decaying relatively quickly? If so, can you find/use a digital filter (bandpass) instead? Is that available as a phone app as well?

EDIT -- What is Audacity? Is it a phone app or something else?
 
berkeman said:
Welcome to the PF.

I believe that the FFT usually assumes a stationary (non-changing) signal versus time as its input. If the signal is changing only very slowly over time, you could use multiple FFTs to give you your 1000Hz data. But it sounds like your sound is decaying relatively quickly? If so, can you find/use a digital filter (bandpass) instead? Is that available as a phone app as well?

EDIT -- What is Audacity? Is it a phone app or something else?

Using multiple FFTs was my initial idea, but I was wondering if it was possible for a software to plot this graph for me, as it seems like a lot of trouble to do it manually (especially since I am doing 5 different frequencies)
 
tyiuo said:
Using multiple FFTs was my initial idea, but I was wondering if it was possible for a software to plot this graph for me, as it seems like a lot of trouble to do it manually (especially since I am doing 5 different frequencies)
Good questions and good project.

Do you understand the difference between an FFT and digital signal processing? It's important to understand when to use different tools for different situations. We can help you learn about the differences. What reading have you been doing about FFTs and DSP so far? :smile:
 
  • Like
Likes harborsparrow
It sounds like what you want is a spectrogram. Except you are only interested in isolating ~1000Hz and making a single 2D plot?
https://en.wikipedia.org/wiki/Spectrogram

You can compute this in MATLAB if you have access, and then just grab whichever bins you want from the output.
https://www.mathworks.com/help/signal/ref/spectrogram.html?requestedDomain=www.mathworks.com

Python is a good alternative.
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.spectrogram.html

It's a good exercise to use a library like these within a programming language to compute ffts for time series data analysis, as you will have to learn some interesting fundamentals about discrete signals and sample rates in order choose the parameters and prepare and handle the input and output. In the end you should have a better understanding exactly what it is you're seeing, rather than just using some application and being left with only a high level understanding.

Audacity may have the functionality to give you something like what you want, but I'm not sure how flexible this is. I would recommend to use MATLAB or python or some other language/library still.
http://manual.audacityteam.org/man/spectrogram_view.html
 
Last edited:
  • Like
Likes harborsparrow
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 11 ·
Replies
11
Views
6K
Replies
13
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
38
Views
5K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K