Hi list, it should be possible to have readsf~ loop without a gap by using a soundfile that has no discontinuities in its audio signal at the end/start, and whose length is a multiple of Pd's block size (64 by default). Yet I do get clicks when I try this. In a conversation with the helpful and great IOhannes we looked at the logic and timing of readsf~ banging its right outlet. Can it be that it bangs one block too late in order to loop seemlessly?
See attached patch. By the way, looping playback from a table via tabplay~ does also click when using its right outlet (which is undocumented in the helpfile I happen to see right now). Thanks for all hints! Peter
#N canvas 783 370 767 310 12; #X obj 568 35 loadbang; #X msg 568 64 \; pd dsp 1; #N canvas 847 471 776 354 createSoundfile 0; #X obj 68 120 soundfiler; #X msg 68 93 write sine-64.wav sine; #X msg 284 91 \; sine sinesum 64000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5; #X obj 284 56 loadbang; #X obj 68 65 inlet; #X connect 1 0 0 0; #X connect 3 0 2 0; #X connect 4 0 1 0; #X restore 156 56 pd createSoundfile; #X obj 431 184 tabplay~ sine; #X obj 431 223 dac~; #X obj 464 81 table sine; #X obj 533 183 spigot; #X obj 572 159 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 431 160 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 427 252 This one clicks as well.; #X obj 156 30 bng 15 250 50 0 empty empty write_short_wav_file_to_current_directory 17 7 0 10 -262144 -1 -1; #X obj 157 253 dac~; #X obj 259 213 spigot; #X obj 298 189 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 157 214 readsf~; #X msg 157 130 open sine-64.wav \, 1; #X obj 203 239 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 112 25 1; #X text 129 131 2; #X text 402 160 3; #X obj 572 134 loadbang; #X obj 298 160 loadbang; #X connect 0 0 1 0; #X connect 3 0 4 0; #X connect 3 1 6 0; #X connect 6 0 8 0; #X connect 7 0 6 1; #X connect 8 0 3 0; #X connect 10 0 2 0; #X connect 12 0 15 0; #X connect 13 0 12 1; #X connect 14 0 11 0; #X connect 14 1 16 0; #X connect 15 0 14 0; #X connect 16 0 12 0; #X connect 20 0 7 0; #X connect 21 0 13 0;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
