hello
Selon stephane stephane.richard1@tiscali.fr:
J'entends par "looping station", un patch capable d'enregistrer un échantillon sonore (d'une durée indeterminée au moment de l'enregistrement) en provenance de l' entrée d'une carte son et de le jouer en boucle à l'instant même ou l'enregistrement s'arrête.
Here is a simple solution, using a [table] and a Attack-Hold-Decay enveloppe (for suppressing clicks when starting/stopping recording). Attack/Decay time is a parameter, it should be set to the closest possible to zero ms (start with 10 ms, for example). The recording is done in the [table] and the loop playing is obtained by reading the table with a [phasor~] that has the right frequency and output factor, for example You have only one live control : start/stop. "start" triggers the recording, and "stop" triggers looping playback. The time between start and stop must be calculated (see "time-count" below).
Actually, "start" triggers several things at the same time (order is important, use a [t] object):
"Stop" :
value of the phasor by T*44.1 (tables use time values in samples, unlike max/msp that works in ms) -- 44.1 is actually samplerate/1000
It's not very optimized, but it gives you the idea of how it works. Looping samplers shown in /pd/doc/3.audio.examples/ are a better way to start.
-j