Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: A1 - Heldt
name
code content
( SynthDef("hihat", {arg out = 0, amp = 0.5, att = 0.005, rel = 0.2, ffreq = 4000, pan = 0; var env, snd; env = Env.perc(att, rel, amp).kr(doneAction: 2); snd = WhiteNoise.ar; snd = HPF.ar(in: snd, freq: ffreq, mul: env); Out.ar(out, Pan2.ar(snd, pan)); }).add; SynthDef("snare", {arg out = 0, amp = 0.1, sinfreq = 200, att = 0.01, rel = 0.2, ffreq = 2000, pan = 0; var env, snd1, snd2, sum; env = Env.perc(att, rel, amp).kr(doneAction: 2); snd1 = HPF.ar( in: WhiteNoise.ar, freq: ffreq, mul: env ); snd2 = SinOsc.ar(freq: sinfreq, mul: env); sum = snd1 + snd2; Out.ar(out, Pan2.ar(sum, pan)); }).add; SynthDef("kick", {arg out = 0, amp = 0.3, sinfreq = 40, glissf = 0.9, att = 0.01, rel = 0.5, pan = 0; var env, snd, ramp; env = Env.perc(att, rel, amp).kr(doneAction: 2); ramp = XLine.kr( start: sinfreq, end: sinfreq * glissf, dur: rel ); snd = SinOsc.ar(freq: ramp, mul: env); snd = Pan2.ar(snd, pan); Out.ar(out, snd); }).add; SynthDef("plucking", {arg amp = 0.1, freq = 440, decay = 3, dampen = 0.1; var env, snd; env = Env.linen(0, decay, 0).kr(doneAction: 2); snd = Pluck.ar( in: WhiteNoise.ar(amp), trig: Impulse.kr(0), maxdelaytime: 0.1, delaytime: freq.reciprocal, decaytime: decay, coef: dampen); Out.ar(0, [snd, snd]); }).add; SynthDef("secondpluck", {arg amp = 0.1, freq = 440, decay = 3, dampen = 0.1; var env, snd; env = Env.linen(0, decay, 0).kr(doneAction: 2); snd = Pluck.ar( in: WhiteNoise.ar(amp), trig: Impulse.kr(0), maxdelaytime: 0.1, delaytime: freq.reciprocal, decaytime: decay, coef: dampen); Out.ar(0, [snd, snd]); }).add; ) ( ~p1=Pbind( \instrument, "hihat", \dur, Pseq([(1/2), (1/2), (1/2), (1/4), (1/4)], inf), \att, 0.01, \rel, 0.1, \ffreq, 11000, \pan, 0, \amp, 0.3 ); ~p2 = Pbind( \instrument, "snare", \dur, Pseq([Rest(1/2), 1/2, Rest(1/2), (1/4), (1/4)], inf), \att, 0.01, \rel, 0.1, \sinfreq, 180, \ffreq, 1000, \amp, 0.9 ); ~p3= Pbind( \instrument, "kick", \dur, (1/4), \att, 0.1, \rel, 0.5, \sinfreq, 100, \glissf, Pseq([0.5,1,0.5,0.25], inf), \amp, 2, ); ~p4 = Pbind( \instrument, "plucking", \mtranspose, [7,0,14], \amp, Prand([0.8,0.75,0.65],inf), \decay, 4, \dampen, 0.9, \phase, 0.5, \glissf, Prand([0.1, 0.2, 0.3, 0.4],inf), \dur, Prand([0.25, 0.25, 0.125, 0.125], inf) ); ~p5 = Pbind( \instrument, "secondpluck", \degree, Pseq([5, 7, 11, 15, 6, 9], inf), \mtranspose, [14,21], \amp, Pwhite(0.3, 0.6), \decay, Pseq([1, 2, 3, 4, 3, 1], inf), \dampen, Pseq([0.15, 0.05, 0.02], inf), \glissf, [-0.5, -0.8, -0.9], \dur, Prand([0.5, 0.75, 1, 1, 0.5, 1, 0.5], inf) ); ); //4.wait; ( { 4.wait; ~p1.play; 2.wait; ~p2.play; 4.wait; ~p3.play; 4.wait; ~p4.play; 8.wait; ~p5.play; }.fork )
code description
I wanted to keep the snare and hats but write different rhythms. After that I used "glissf" to create more of a moving bass sound out of the kick. I then edited the Pbind of the plucks to make the first one sound more like a muted and strummed string, and the second one to sound like a muted xylophone or even the strings of a guitar after the neck where the tuning pegs are.
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