Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: stutter
name
code content
( SynthDef(\stutter,{ arg in=0, out=0; var sig, delayTime, increment, trigger; var reset=\reset.kr(0); var delayPitch=\pitch.kr(12); var offsetms=\offsetms.kr(0)/1000; var strobe=\strobe.kr(1); var on=\onoff.kr(0); var envGen, sustainTime; var atkTime=0.002, relTime=0.002; reset=reset*on; // Convert pitch to delay time in seconds delayTime = delayPitch.midicps.reciprocal; // Trigger for incrementing delay time trigger = Impulse.ar(delayTime.reciprocal); // Calculate sustain time to ensure envelope stays high for the chunk duration minus attack and release sustainTime = delayTime - (atkTime + relTime); // Ensure sustainTime is not negative sustainTime = max(sustainTime, 0)*strobe; // Increment delay time increment = Dseries(0, delayTime, inf)*on; increment = Demand.ar(trigger, reset, increment); // Generate an envelope to soften clicks envGen = EnvGen.ar(Env([0, 1, 1, 0], [atkTime, sustainTime, relTime], 'lin'), trigger); // Get input signal sig = In.ar(in, 1); // Assuming stereo input // Apply delay sig = DelayC.ar(sig, 24, increment+offsetms); // Apply envGen sig=sig*envGen; // Output Out.ar(out, sig); }).add(); )
code description
micro-beat repeat, based on delay
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