Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Stuff On My Lawn - 115modulations
name
code content
( SynthDef("am1", {arg freq = 440, modfreq = 2, amp = 0.2, att = 0.01, rel = 3; var carrier, modulator, env; env = Env.perc( attackTime: att, releaseTime: rel, level: amp ).kr(2); modulator = SinOsc.ar(modfreq).range(0, 1); carrier = SinOsc.ar(freq: freq, mul: env * modulator); Out.ar(0, carrier ! 2); }).add; SynthDef("hihat", {arg out = 0, amp = 0.5, att = 0.01, rel = 0.2, ffreq = 12000, pan = 0; var env, snd; env = Env.perc( attackTime: att, releaseTime: rel, level: amp).kr(doneAction: 2); snd = WhiteNoise.ar( mul: env, add: 0); snd = LPF.ar( in: snd, freq: ffreq, mul: 1, add: 0); Out.ar(out, Pan2.ar(snd, pan)); }).add; SynthDef("kick", {arg out = 0, amp = 0.5, sinfreq = 60, glissf = 0.9, att = 0.01, rel = 0.45, pan = 0; var env, snd, ramp; env = Env.perc( attackTime: att, releaseTime: rel, level: amp).kr(doneAction: 2); ramp = XLine.kr( start: sinfreq, end: sinfreq * glissf, dur: rel ); snd = SinOsc.ar( freq: ramp, phase: 0, mul: env, add: 0); snd = Pan2.ar(snd, pan); Out.ar(out, snd); }).add; SynthDef("fm2", {arg freq = 440, modindex = 10, amp = 0.1, pos = 0, gate = 1, att = 0.01, rel = 0.3; var carrier, modulator, freqdev, env, modfreq; modindex = Line.kr(modindex, 1, att); modfreq = freq / 2; freqdev = modfreq * modindex; modulator = SinOsc.ar(freq: modfreq, mul: freqdev); carrier = SinOsc.ar(freq: [freq + modulator, freq * 1.01 + modulator]); env = Env.asr( attackTime: att, sustainLevel: amp, releaseTime: rel ).kr(doneAction: 2, gate: gate); carrier = FreeVerb.ar(carrier, 1.0, 0.75, 0.25, 1, 0); carrier = Pan2.ar(in: carrier, pos: pos, level: env); Out.ar(0, carrier * 0.5); }).add; SynthDef("am3", {arg freq = 440, modfreq = 2, amp = 0.2, att = 0.01, sus = 0.2, rel = 3, gate = 1, pos = 0; var carrier, modulator, env; env = Env.asr( attackTime: att, sustainLevel: sus, releaseTime: rel ).kr(doneAction: 2, gate: gate, mul: amp); modulator = SinOsc.ar(modfreq).range(0, 1); freq = freq * LFNoise2.kr([2, 1/2, 1/3, 1/4, 1]).range(0.98, 1.01); carrier = Pulse.ar(freq: freq, mul: env * modulator); carrier = Mix.ar(carrier); carrier = LPF.ar(carrier, Line.kr(10000, 1000, att)); Out.ar(0, Pan2.ar(carrier, pos)); }).add; ) ( var kc = 2; ~helpers = Pbind( \instrument, "am1", \midinote, Pseq([ Pn([57], 6), Pn([64], 6), Pn([59], 6), Pn([60], 6), ], inf), \ctranspose, 12, \dur, Pseq([Pn(0.5, 5), 1.5], inf), \amp, Pwhite(0.25, 0.35), \att, 0.1, \rel, 1, \pos, 0 ); ~helpersKC = Pbind( \instrument, "am1", \midinote, Pseq([ Pn([57], 6), Pn([64], 6), Pn([59], 6), Pn([60], 6), ], inf), \ctranspose, 12 + kc, \dur, Pseq([Pn(0.5, 5), 1.5], inf), \amp, Pwhite(0.25, 0.35), \att, 0.1, \rel, 1, \pos, 0 ); ~leadIguess = Pbind( \instrument, "am3", \midinote, Pseq([ \rest, \rest, 64, 64, 64, 64, \rest, 64, 63, 62, \rest, 60, \rest, 60, 62, 63, \rest, \rest, 64, 64, 64, 64, \rest, 64, 63, 62, \rest, 60, \rest, 60, 60, 60 ], inf), \ctranspose, 12, \dur, 0.5, \amp, 0.6, \att, 0.1, \rel, 0.2, \pos, 0 ); ~leadIguessKC = Pbind( \instrument, "am3", \midinote, Pseq([ \rest, \rest, 64, 64, 64, 64, \rest, 64, 63, 62, \rest, 60, \rest, 60, 62, 63, \rest, \rest, 64, 64, 64, 64, \rest, 64, 63, 62, \rest, 60, \rest, 60, 60, 60 ], inf), \ctranspose, 12 + kc, \dur, 0.5, \amp, 0.6, \att, 0.1, \rel, 0.2, \pos, 0 ); ~leadIguess2 = Pbind( \instrument, "am3", \midinote, Pseq([ \rest, \rest, 64, 64, 64, 64, \rest, 64, 64, 67, \rest, 62, \rest, 60, 62, 63, \rest, \rest, 64, 64, 64, 62, \rest, 64, 63, 62, \rest, 60, \rest, 63, 62, 60, \rest, \rest, 64, 64, 64, 64, \rest, 64, 64, 67, \rest, 69, \rest, 60, 62, 63, \rest, \rest, 64, 64, 64, 62, \rest, 64, 63, 62, \rest, 60, \rest, 63, 62, 60 ], inf), \ctranspose, 12, \dur, 0.5, \amp, 0.6, \att, 0.1, \rel, 0.2, \pos, 0 ); ~leadIguess2KC = Pbind( \instrument, "am3", \midinote, Pseq([ \rest, \rest, 64, 64, 64, 64, \rest, 64, 64, 67, \rest, 62, \rest, 60, 62, 63, \rest, \rest, 64, 64, 64, 62, \rest, 64, 63, 62, \rest, 60, \rest, 63, 62, 60, \rest, \rest, 64, 64, 64, 64, \rest, 64, 64, 67, \rest, 69, \rest, 60, 62, 63, \rest, \rest, 64, 64, 64, 62, \rest, 64, 63, 62, \rest, 60, \rest, 63, 62, 60 ], inf), \ctranspose, 12 + kc, \dur, 0.5, \amp, 0.6, \att, 0.1, \rel, 0.2, \pos, 0 ); ~arpy = Pbind( \instrument, "am1", \midinote, Pseq([57, 60, 64, 67, 71, 72, 71, 67], inf), \modfreq, Pseq([1, 2, 3, 4, 5, 6, 7, 8], inf), \ctranspose, 0, \amp, 0.4, \dur, 0.25, \att, 0.01, \rel, Pwhite(0.3, 0.5), \pos, Pwhite(-1, 1.0) ); ~arpyKC = Pbind( \instrument, "am1", \midinote, Pseq([57, 60, 64, 67, 71, 72, 71, 67], inf), \modfreq, Pseq([1, 2, 3, 4, 5, 6, 7, 8], inf), \ctranspose, kc, \amp, 0.4, \dur, 0.25, \att, 0.01, \rel, Pwhite(0.3, 0.5), \pos, Pwhite(-1, 1.0) ); ~morning = Pbind( \instrument, "fm2", \dur, Pseq([ 2 ], inf) * 2, \midinote, Pseq([ [57, 60, 64, 67, 57], [64, 67, 71], [67, 71, 76], [55, 60, 64] ], inf), \ctranspose, 0, \modindex, Pseq([1, 5, 6, 7, 10], inf), \amp, 0.4, \att, 0.01, \rel, Pwhite(1, 2.0), \pos, 0 ); ~morningKC = Pbind( \instrument, "fm2", \dur, Pseq([ 2 ], inf) * 2, \midinote, Pseq([ [57, 60, 64, 67, 57], [64, 67, 71], [67, 71, 76], [55, 60, 64] ], inf), \ctranspose, kc, \modindex, Pseq([1, 5, 6, 7, 10], inf), \amp, 0.4, \att, 0.01, \rel, Pwhite(1, 2.0), \pos, 0 ); ~hiHat = Pbind( \instrument, \hihat, \dur, Pseq([ Pn(0.25, 12), Pn(0.125, 8), Pn(0.25, 12), Pn(0.0833333333333, 12) ], inf), \amp, 0.08, \ffreq, 8000 ); ~clap = Pbind( \instrument, \hihat, \dur, Pseq([ 1 ], inf), \amp, Pseq([ 0, 0.8 ], inf), \ffreq, 1000, \rel, 1.5 ); ~kick1 = Pbind( \instrument, "kick", \midinote, Pseq([1], inf), \amp, Pseq([0.7, 0.7, 0.7, 0.7, 0.7], inf), \rel, 1, \dur, Pseq([1.5, 0.25, 0.5, 0.25, 1.5], inf), \sinfreq, Pseq([45, 45, \rest, \rest], inf), //that dope synchopated freq though!! \glissf, 0.5 ); t = TempoClock.new(120/60); { ~p1 = ~helpers.play(t); 16.wait; ~p2 = ~morning.play(t); 16.wait; ~p3 = ~hiHat.play(t); 15.wait; ~p1.stop(); ~p2.stop(); ~p3.stop(); 1.wait; ~p1.reset.play(); ~p2.reset.play(); ~p3.reset.play(); ~p4 = ~clap.play(t); ~p5 = ~kick1.play(t); 16.wait; ~p6 = ~leadIguess.play(t); 32.wait; ~p6.stop; ~p7 = ~leadIguess2.play(t); 32.wait; ~p7.stop; ~p8 = ~arpy.play(t); 15.wait; ~p1.stop(); ~p2.stop(); ~p3.stop(); ~p4.stop(); ~p5.stop(); ~p6.stop(); 1.wait; /////////////////////Sh!t is about to get crazy. ~p8.stop(); ~p1 = ~helpersKC.play(t); ~p2 = ~morningKC.play(t); ~p3.reset.play(); ~p4.reset.play(); ~p5.reset.play(); ~p6 = ~leadIguessKC.play(t); ~p7 = ~arpyKC.play(t); }.fork(t); )
code description
Sometimes, there's just too much stuff on your lawn... y'know? https://soundcloud.com/mileselliott/stuff-on-my-lawn/s-9VFtV Published under the CC Attribution-NonCommercial 4.0 International License. (eg: "Take it and run boys!")
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