[PD] convert an audio signal to floats at single audio sample precision

Thomas Grill gr at grrrr.org
Sat Oct 15 20:04:35 CEST 2022


> The first patch, using a modulo [%] object to cycle from 0 to 63, startsed out very precise but degraded over time as the integer from the counter structure above it increases.

The reason is precision loss because of the limited 32-bit word size in Pd.
The easy solution is to feed back the modulo result to the counter, so that it will always run only between 0 and 63 or to reset the counter at every block boundary.
Does this what you want?


#N canvas 819 278 450 300 12;
#X obj 95 28 inlet~;
#X obj 234 101 until;
#X msg 234 75 64;
#X obj 235 206 outlet;
#X obj 95 53 tabsend~ \$0-bl;
#X obj 95 101 table \$0-bl 64;
#X msg 287 99 0;
#X obj 234 133 f;
#X obj 266 133 + 1;
#X obj 234 51 t b b;
#X obj 235 179 tabread \$0-bl;
#X text 292 208 spit out frames;
#X obj 234 25 inlet;
#X connect 0 0 4 0;
#X connect 1 0 7 0;
#X connect 2 0 1 0;
#X connect 6 0 7 1;
#X connect 7 0 8 0;
#X connect 7 0 10 0;
#X connect 8 0 7 1;
#X connect 9 0 2 0;
#X connect 9 1 6 0;
#X connect 10 0 3 0;
#X connect 12 0 9 0;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20221015/4359e856/attachment.sig>


More information about the Pd-list mailing list