[PD] sample loop

0 root at 0x09.com
Fri Nov 21 15:22:46 CET 2003


My way (and probably the usual way) to do this is the read the sound file into an array using soundfiler. Then connect a phasor~ to a tabread4~. The phasor~ is a saw wave, so it gradually steps from 0 to one. You need to set the frequency of the phasor to 1/(the loop length) and the amplitude to the number of samples in the loop (length*44100 usually). Set the freq. by putting a number into phasor~'s left inlet, set its amplitude by multiplying its output by the number of samples. Then add 1 ([+~ 1]). Feed that sum into tabread4~. If you want it to stop after each loop (or any number of loops) set it up to stop whenever phasor~ output is equal to the number of samples in the array, or zero. Hope that helps.

-i




More information about the Pd-list mailing list