Page 1 of 1

calculate acceleration

Posted: 13 May 2022, 09:03
by Gilsornette
Hello,

I need to calculate acceleration of a sound source moving in front of a microphone. I was thinking about measuring the increase (or decrease)of db level, using an enveloppe follower.
and then calculate the difference of level during a certain amount of time (which give me the acceleration/speed)? What's the best way to do this?
Can I use module Delta (but there is no time value)? Substract two values with a Delay? I've tried without correct result. Use arrays?
Thank you in advance

Re: calculate acceleration

Posted: 13 May 2022, 10:35
by senso
hello,
The main problem is that the envelop will not change in an important way. So you'll encounter a leak of precision.
You maybe have a chance if the source sound is totally fixed in term of dynamic (just an oscillator).
Your direction is almost good, by this way, you can calculate the speed of a sound, not really the acceleration. (the acceleration is the variation of the speed)

the delta value use the bloc size duration (use the module bloc-duration).
the delay is also suitable.

Re: calculate acceleration

Posted: 13 May 2022, 10:48
by Gilsornette
Thank you for the quick reply!
How can I modify the size of the bloc duration? use a * module? And shall I patch it to the in of delta?

Re: calculate acceleration

Posted: 13 May 2022, 11:20
by senso
the bloc duration is fixed by the bloc-size parameter in the setup/audio. can't be modified in a patch.
but you don't have to deal with that.
Just use the ABS(dela) to have an idea of speed.

Re: calculate acceleration

Posted: 13 May 2022, 11:32
by Gilsornette
ok thank you