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

• tyiuo
In summary: Thank you for your input!In summary,An existing software that plots a graph of the intensity vs time of the 1000 Hz sound from the FFT may exist, but it is not easily accessible. Multiple FFTs could be used to generate the data, but if the sound is decaying quickly, a digital filter may be a better option.
tyiuo
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.)

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?

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:
harborsparrow

## 1. What is an FFT and how is it used in generating a dB vs time graph?

An FFT, or Fast Fourier Transform, is a mathematical algorithm that converts a signal from its original domain (such as time) to a representation in the frequency domain. In generating a dB vs time graph, the FFT is used to break down a signal into its individual frequency components and measure the intensity of each component over time.

## 2. How do you choose the frequency for the dB vs time graph?

The frequency used for the dB vs time graph is typically chosen based on the application or specific data being analyzed. For example, if you are studying the sound waves of a musical instrument, you may choose the fundamental frequency of that instrument. In general, it is important to choose a frequency that is relevant to the data and will provide meaningful insights.

## 3. What factors can affect the accuracy of the dB vs time graph?

There are several factors that can affect the accuracy of the dB vs time graph, including the quality of the signal being analyzed, the sampling rate, and the windowing function used. It is important to carefully consider these factors and make appropriate adjustments to ensure the accuracy of the graph.

## 4. Can the dB vs time graph be used to analyze any type of signal?

Yes, the dB vs time graph can be used to analyze a wide range of signals, as long as the signal can be represented in the frequency domain. This includes signals from various sources such as music, speech, and scientific data.

## 5. How can the information from the dB vs time graph be interpreted?

The dB vs time graph provides information about the intensity of different frequency components in the signal over time. This information can be used to identify patterns or changes in the signal, and can also be compared to other signals for analysis and interpretation.

### Similar threads

• Mechanics
Replies
10
Views
2K
• Mechanics
Replies
10
Views
724
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• Electromagnetism
Replies
13
Views
2K
• Classical Physics
Replies
3
Views
1K
• Mechanics
Replies
3
Views
1K
• Electrical Engineering
Replies
14
Views
2K
• Introductory Physics Homework Help
Replies
9
Views
3K
• Electrical Engineering
Replies
38
Views
4K
• Electromagnetism
Replies
1
Views
2K