09-30-2019, 11:00 AM
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).
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).