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.

Timed experiments by default
#1
I need to set a default acquisition time for audio data collection and can not find out how to do that.
The idea is to collect data for 5 seconds and then do an FFT of the whole sample.
Has anybody done that?
Reply
#2
At the moment, there is no direct way to do this in phyphox. Audio is a heck of a lot of data at full sampling rate, so we have to considerably limit the time range. The longest frame is half a second in the Audio oscilloscope.*

At what rate do you need your audio data? (We are currently discussing if we should add a recording tool in the future, however, likely with a significantly reduced sampling rate…


* with some effort, you could extend it in https://phyphox.org/editor (enlarging data containers and more). No guarantee that it won't run out of memory then, though
Reply
#3
The plan is to record about 10 seconds and get an average frequency spectrum, but it is possible to use a shorter time as well as change the sample rate. I am doing an initial pre-study to see what is possible. The idea is that pupils in schools all over the country can use the experiment to record in different environments and get a feeling that sound comes in different frequencies. If possible, we would like to collect as many runs as possible at a central server, a type of citizen science project, but that is a secondary issue. The interface should be as simple as possible as pupils down to 11 years might participate.
Reply
#4
That sounds like a great project. Are you considering to publish everything as open educational resources? I would expect that other countries would like to “participate” (copy it).

At that scale, it might sense that we talk about it separately in an online meeting and discuss in how far phyphox needs to be extended to meet your needs. I will check with our team…

You know that phyphox can do FFT (see “Audio Spectrum”, for instance), do you? Some necessary bits to (didactically) get there might be needed.
Reply
#5
Hello,

How about doing of FFT on 0.1s, but averaging 100 of FFTs ? It is not the same thing as doing a FFT on a 10s recording, but is less mathematically challenging, I think. Would that meet your goal?

Cheers,

Fred
Reply
#6
I have quickly added the option 262144 samples (FFT prefers powers of 2) to the “Audio Spectrum” settings, that's roughly 5.5 seconds on (most) smartphones. Looks ok, however, might simply crash on non-recent ones.


Attached Files
.phyphox   audio_spectrum_2.phyphox (Size: 61.2 KB / Downloads: 42)
Reply
#7
(03-05-2025, 03:04 PM)Jens Noriʇzsɔɥ Wrote: I have quickly added the option 262144 samples (FFT prefers powers of 2) to the “Audio Spectrum” settings, that's roughly 5.5 seconds on (most) smartphones. Looks ok, however, might simply crash on non-recent ones.

I tested it and it works just fine. I think one needs to adjust the rate to fit the application, 44 kHz is quite high and 22 kHz should be ok for most ambient soundscapes.
Reply
#8
The default (and internal) sampling rate appears to be 48kHz on all (mobile) platforms now (I have not seen anything else in phyphox on Apple devices yet). We use it in “Audio Spectrum” in order to catch high frequencies as the hearing range goes quite beyond 10kHz and we would miss that at 24 kHz (12 kHz is maximum apparent rate then)

Of course, it can be easily adapted to your applications once you know your requirements.
Reply
#9
Slightly unrelated but an FFT into the different octaves (1/1 or 1/3) (https://en.wikipedia.org/wiki/Octave_band) would be more useful than the present scale at least for most acoustic applications or comparisons.
Reply
#10
Do you have a practical example of application of such octave bands. The Wikipedia article is a bit short on references and, right now, I have no idea what it is good for.

Anything should be possible in phyphox, however, we likely need some guidance in this regard (also: linear or log scale…?). Until then, you need to/could zoom into the graphs of “Spectrum” and “History” to select a window of interest.
Reply


Forum Jump: