[PD] Identifying the position of notes in an (audio) array
Urs Liska
pd at ursliska.de
Tue Oct 4 15:07:13 CEST 2005
But this gives me an accuracy of about 44.1 samples, isn't it?
Well, generally this should be good enough, but is there no solution to
measure the time with (1) sample accuracy?
Urs
hard off schrieb:
>>>BTW: what is the best solution to measure the time between two bangs in
>
> samples (i.e. the number of samples recorded into an array (when the
> recording is started and stopped manually))?<<
>
> use [timer] to get the time, and then just multiply that by your sample rate.
>
> ie, if you have a sample at 44100hz, and you get a bang at 500ms and 4000ms
>
> then you go: 4000 - 500 = 3500ms = 3.5 sec
>
> 3.5sec * 44100 hz = 154350 samples
>
> (i think sometimes the bit rate might come into play, but a simple
> multiplication or division by 2, 4, 8 etc will sort that out.)
>
--
Urs Liska
Glümerstr. 5
D-79102 Freiburg
www.graft-music.com
www.suonomobile.de
[Pd 0.39.0, WinXP]
More information about the Pd-list
mailing list