This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Acoustics
#1
Question 
Hello, 
I would like to know more about the programming logic behind the Audio Spectrum Experiment!
It's for a project from Electrical Engineering's Department of my University.
The FFT Fast Fourier Transform was used, right? To do the measures of the sound recorded with the microphone.  
How the audio was recorded in blocks (to be analised later)?

Thank You.
Reply
#2
Well, if you want to know every detail, you can have a look at the source (https://phyphox.org/source/) and especially the definition of the audio spectrum experiment (https://github.com/Staacks/phyphox-exper...um.phyphox). You could also load it in our editor (https://phyphox.org/editor), but since the original experiments were not created with the new editor, the initial layout will be random and hard to read.

That being said, I know that it will be hard to get everything from source, especially since the logic of the experiment is defined in our own file format and interpreted by the app, so I will try to answer some of your questions directly.

When an experiment configuration uses data from the microphone, phyphox will record data from the microphone into a buffer of finite size. Phyphox executes the analysis steps defined in our file format periodically (you might want to have a look at the intro for the editor to understand the principles of our file format: https://phyphox.org/wiki/index.php?title...is_modules) and each time this happens, the recorded data is taken from the buffer. Also, if the buffer overflows, old data is simply replaced.

The Audio Spectrum Experiment sets the analysis interval large enough, so that the buffer always gathers at least as many new data points as defined by the user under "settings" (this also means that some data will almost certainly be dropped). The buffer is then cut down to the desired size and then fed into our FFT module (we do not apply any windowing function aside from the unavoidable rectangular window).
Reply


Forum Jump: