Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Stutter live looping buffer
name
code content
( ~stutter = { |snd, reset, fragmentlength, rate = 1.0, maxdelay = 10| var phase, fragment, del; phase = Sweep.ar(reset); fragment = { |ph| (ph - Delay1.ar(ph)) < 0 + Impulse.ar(0) }.value(phase / fragmentlength % 1); del = Latch.ar(phase, fragment) + ((fragmentlength - Sweep.ar(fragment)) * (rate - 1)); DelayC.ar(snd, maxdelay, del); }; ) // This is just an example of doing it live which was missing in the stutter tutorial :) ( { var snd, reset; snd = AudioIn.ar([1,2]); reset = Onsets.kr(FFT(LocalBuf(512), snd), 0.7); snd = ~stutter.(snd, reset, 0.09); snd = DelayC.ar(snd, 0.2, 0.2); snd!2 * 0.3; }.play; ) // Of course you can also: // sequencing with Pmono ( SynthDef(\stuttertest, { |out = 0, buf, t_reset = 0, fragmentlength = 0.1, amp = 0.1| var snd, reset; snd = AudioIn.ar([1,2]); reset = Onsets.kr(FFT(LocalBuf(512), snd), t_reset); snd = ~stutter.(snd, reset, fragmentlength); Out.ar(out, snd * amp!2); }).add; ) ( Pmono(\stuttertest, \buf, b, \amp, 0.3, \reset, 0.7, \dur, 0.1, \fragmentlength, Pseq([0.01, 0.03, 0.07, 0.05, 0.06], inf) ).play; )
code description
The stutter tutorial really has it all. Just not with live audio :)
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change