04-17-2020, 06:50 PM
Ah, this is exactly the experiment I wanted to program! Thank you to both of you, Julien, Solid.
I played a bit with the phyphox program.
Concerning the "scratches" when the frequency jumps, I tried many things, but could not avoid them. So I guess we are stuck with it.
Concerning the offset between the measurement and the frequency, I think the reason is that you do not save the data at the right time in your analysis cylce: if I understand correctly, the audio_input that is used was filled with sound from the frequency of the previous analysis cycle, so you should couple the frequency of the previous cycle (before you calculate the new currentF) with the measure of the audio amplitude of the current analysis cycle.
I hope I am clear (and I hope I did not say anything wrong). Here is my implementation of the code I suggest (I also changed the way the frequency is sweep for personal taste).
Now let us look for things to measure... Have you tried a mug?
Cheers,
Fred
I played a bit with the phyphox program.
Concerning the "scratches" when the frequency jumps, I tried many things, but could not avoid them. So I guess we are stuck with it.
Concerning the offset between the measurement and the frequency, I think the reason is that you do not save the data at the right time in your analysis cylce: if I understand correctly, the audio_input that is used was filled with sound from the frequency of the previous analysis cycle, so you should couple the frequency of the previous cycle (before you calculate the new currentF) with the measure of the audio amplitude of the current analysis cycle.
I hope I am clear (and I hope I did not say anything wrong). Here is my implementation of the code I suggest (I also changed the way the frequency is sweep for personal taste).
Now let us look for things to measure... Have you tried a mug?
Cheers,
Fred