Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Kelvin - Musc 115
name
code content
t=TempoClock.(273/60); ( SynthDef("plucking", {arg amp = 0.1, freq = 440, decay = 5, dampen = 0.1; var env, snd; env = Env.linen(0, decay, 0).kr(doneAction: 2); snd = Pluck.ar( in: LFTri.ar(freq: freq, mul: amp), trig: Impulse.kr(0), maxdelaytime: 0.1, delaytime: freq.reciprocal, decaytime: decay, coef: dampen); Out.ar(0, [snd, snd]); }).add; SynthDef("sub", {arg out = 0, amp = 0.3, sinfreq = 60, sus = 0.1, glissf = 0.005, att = 0.01, rel = 0.45, pan = 0; var env, snd, ramp; env = Env.linen(attackTime: 0.25, sustainTime: sus, releaseTime: rel, level: amp).kr(doneAction: 2); ramp = XLine.kr( start: sinfreq, end: sinfreq, dur: rel ); snd = Saw.ar(freq: ramp, mul: env); snd = Pan2.ar(snd, pan); snd = BPF.ar(snd, 100, 0.3); Out.ar(out, snd); }).add; SynthDef("riser", {arg out = 0, amp = 0.5, pan = 0, att=0.3, sus=1, rel=0.5; var env, snd; env = Env.linen( att, sus,rel).kr(doneAction: 2); snd = BPF.ar( in: WhiteNoise.ar(env), freq: 2000, rq: 0.4, mul: amp ); Out.ar(out, Pan2.ar(snd, pan)); }).add; SynthDef("hihat", {arg out = 0, amp = 0.5, att = 0.01, rel = 0.2, ffreq = 6000, 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 = 180, 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 = 60, glissf = 0.9, att = 0.01, rel = 0.45, 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("sawSynth", { arg freq = 440, amp = 0.1, sus = 4, att = 0.1,rel = 2, lofreq = 1000, hifreq = 3000; var env, snd; env = Env.linen( attackTime: att, sustainTime: sus, releaseTime: rel, level: amp ).kr(doneAction: 2); snd = Saw.ar(freq: freq * [0.99, 1, 1.001, 1.008], mul: env); snd = LPF.ar( in: snd, freq: LFNoise2.kr(1).range(lofreq, hifreq) ); snd = Splay.ar(snd); Out.ar(0, snd); }).add; SynthDef("sawSynth2", { arg freq = 440, amp = 0.1, att = 0.1, rel = 2, lofreq = 1000, hifreq = 3000, gate = 1; var env, snd; env = Env.asr.kr(doneAction: 2, gate: gate); snd = Saw.ar(freq: Lag.kr(freq * [0.99, 1, 1.001, 1.008], 0.1), mul: env*amp); snd = LPF.ar( in: snd, freq: 15000 ); snd = Splay.ar(snd); Out.ar(0, snd); }).add; 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 = LFTri.ar(freq: freq, mul: env * modulator); Out.ar(0, carrier ! 2); }).add; ) //pbinds ( ~melodyintro= Pbind( \instrument, "am1", \scale, Scale.minor, \degree, Pseq([0,0,1,2,1,-1,0,0,1,2,4,-1],1), \dur, Pseq([14,1,1,8,4,4],inf), \mul, 0.7, \rel, 2, \modfreq, 0); ~melodyintro2= Pbind( \instrument, "am1", \scale, Scale.minor, \degree, Pseq([-2,-2,-1,0,-1,-4,-3,-2,-2,-1,0,2,-2,-3],1), \dur, Pseq([14,1,1,8,4,2,2],inf), \mul,0.5, \rel, 2, \modfreq, 0); ~pickup= Pbind( \instrument, "am1", \scale, Scale.minor, \degree, Pseq([-2,-1,0,2,-2,-3],1), \dur, Pseq([1,1,8,4,2,2],1), \mul,0.5, \rel, 2 ); ~bassintro = Pbind( \instrument, "plucking", \scale, Scale.minor, \degree, Pseq([5,5,4,2,0,2,5,2,-2,5,0,-1],1), \dur, Pseq([13,1,1,1,8,8,1,1,1,13,8,8],inf), \ctranspose, -24, \dampen, 0.4, \decay, 2, \mul,0.5); ~harmonymono =Pbind( \instrument, "am1", \scale, Scale.minor, \degree, Pseq([\rest,0,4,3,\rest,2,\rest,1,\rest,-1,\rest,-1,1,2,1,-1,],4), \dur, 1, \ctranspose, 24, \mul,0.02, \amp, 0.08); ~harmonysynth =Pmono( "sawSynth2", \scale, Scale.minor, \degree, Pseq([\rest,0,4,3,\rest,2,\rest,1,\rest,-1,\rest,-1,1,2,1,-1,],4), \dur, 1, \ctranspose, 24, \mul,0.5); ~harmonyintro= Pbind( \instrument, "am1", \scale, Scale.minor, \degree, Pseq([\rest,4,\rest,3,\rest,2,\rest,1,\rest,0,\rest,-1,\rest,0,\rest,-3,\rest,4,\rest,3,\rest,2,\rest,1,\rest,0,\rest,-1,\rest,0,\rest,1],2), \ctranspose, 24, \rel, 1, \dur, 1, \mul,0.05); ~melodydrop =Pbind( \instrument, "sawSynth2", \scale, Scale.minor, \degree, Pseq([0,0,1,2,1,-1],4), \dur, Pseq([6,1,1,4,2,2],inf), \mul,0.5); ~harmonydrop =Pmono( "sawSynth2", \scale, Scale.minor, \degree, Pseq([\rest,0,4,3,\rest,-1,6,4,\rest,0,4,3,\rest,-1,6,4,\rest,0,4,3,\rest,-1,6,4,\rest,0,3,2,1,2,1,-1], 2), \dur, 1, \ctranspose, 24, \mul,0.5); ~rise=Pbind( \instrument, "riser", \dur, 2, \degree, Pseq([1], 1), \amp, 0.5, \rel, 0.5, \sus, 0.3, \att, 1.3); ~melodydrop2 = Pbind( \intrument, "sawSynth2", \scale, Scale.minor, \degree, Pseq([-2,-2,-1,0,-1,-3],4), \dur, Pseq([6,1,1,4,2,2],inf), \mul,1); ~bassdrop= Pbind( \instrument, "sawSynth2", \scale, Scale.minor, \degree, Pseq([-2,-2,-1,0,-5,-5],4), \dur, Pseq([6,1,1,4,2,2],inf), \ctranspose, -12, \att, 0.01, \sus,0.5, \rel, 0.1, \mul, 1); ~bassierdrop= Pbind( \instrument, "sawSynth2", \scale, Scale.minor, \degree, Pseq([-2,0,2,-2,0,-5],2), \dur, Pseq([8,4,4,8,4,4],inf), \ctranspose, -24, \rel, Pseq([8,4,4,8,4,4],inf), \mul, 1); ~harmonydrop2= Pbind( \instrument, "am1", \scale, Scale.minor, \degree, Pseq([\rest,0,4,3,-1,6,4,3,2,1,2,1,-1],1), \dur, Pseq([1,1,1,2,1,1,2,2,1,1,1,1,1],1), \mul, 0.5, \rel, 2, \ctranspose, 24, \modfreq, 0); ~bassdrone= Pbind( \instrument, "sub", \sinfreq, Pseq([51.91, 65.41],2), \dur, 16, \rel, 6, \mul, 3, \amp, 0.2); ~snareintro=Pbind( \instrument, "snare", \dur, Pseq([1,Rest(2),1,Rest(2),1,Rest(1),1,Rest(7)],4), \att, 0.05, \rel, 0.7, \sinfreq, 180, \ffreq, 200, \amp, 0.1); ~kick= Pbind( \instrument, "kick", \dur, Pseq([1,Rest(0.5),0.5,Rest(4),1,Rest(2),1,Rest(2),1,1,Rest(2)],4), \att, 0.01, \rel, 0.4, \sinfreq, Pseq([100],inf), \glissf, 0.1, \amp, 0.4); ~thump= Pbind( \instrument, "kick", \dur, Pseq([10],1), \att, 0.03, \rel, 10, \sinfreq, Pseq([50],inf), \glissf, 0.4, \amp, 0.3); ~snare= Pbind( \instrument, "snare", \dur, Pseq([Rest(2),1,Rest(0.5),0.5,Rest(3),1,Rest(2),1,Rest(3),1,Rest(1)],4), \att, 0.01, \rel, 0.3, \sinfreq, 180, \ffreq, 200, \amp, 0.2); ~hihat= Pbind( \instrument, "hihat", \dur, Pseq([1],64), \att, 0.1, \rel, 0.25, \ffreq, Pseq([3000], inf), \pan, 0, \amp, 0.03); ~hihat2= Pbind( \instrument, "hihat", \dur, Pseq([1],64), \att, Pseq([0.1,0.1,0.1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1],4), \rel, Pseq([0.25,0.25,0.25,1.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25],4), \ffreq, Pseq([3600,3600,3600,2800,3600,3600,3600,3600,3600,3600,3600,3600,3600,3600,3600,3600], inf), \pan, 0, \amp, 0.03); ~bridgechord1= Pbind( \instrument, "sawSynth", \scale, Scale.minor, \degree, Pseq([[2,4,6],[3,5s,7],[2,4,6],[3,5s,7],[1b,3,5],[2,4,6],[-1,1,3],[0,2,5]],1), \sus, 0.1, \dur, Pseq([3,13],inf)); ~bridgechord2= Pbind( \instrument, "sawSynth2", \scale, Scale.minor, \degree, Pseq([[2,4,6],[3,5s,7],[2,4,6],[3,5s,7],[1b,3,5],[2,4,6],[-1,1,3],[0,2,5]],1), \dur, Pseq([3,13],inf)); ~bridgebass= Pmono( "sawSynth2", \scale, Scale.minor, \degree, Pseq([2,3,0,3,0,2,3,0,3,0,1b,2,-1,2,-2,-1,0,0,7,6],1), \dur, Pseq([3,10,1,1,1,3,10,1,1,1,3,10,1,1,1,3,10,1,1,1],inf), \ctranspose, -12, \rel, 0.5, \mul, 1.5); ~bridgebassier= Pbind( \instrument, "sawSynth", \scale, Scale.minor, \degree, Pseq([\rest,3,\rest,3,\rest,2,\rest,0],1), \dur, Pseq([3,13],inf), \ctranspose, -36, \rel, 1, \mul, 1); ~kick2= Pbind( \instrument, "kick", \dur, Pseq([1,1,Rest(1),1,Rest(2),1,Rest(2),1,Rest(2),1,1,Rest(2)],4), \att, 0.01, \rel, 0.4, \sinfreq, Pseq([100],inf), \glissf, 0.1, \amp, 0.4); ~snare2= Pbind( \instrument, "snare", \dur, Pseq([Rest(2),1,Rest(4),1,Rest(2),1,Rest(3),1,Rest(1)],4), \att, 0.01, \rel, 0.3, \sinfreq, 180, \ffreq, 200, \amp, 0.2); ) ~melodyintro.play(TempoClock(273/60)); ~melodyintro2.play(TempoClock(273/60)); ~pickup.play(TempoClock(273/60)); ~bassintro.play(TempoClock(273/60)); ~harmonyintro.play(TempoClock(273/60)); ~harmonymono.play(TempoClock(273/60)); ~harmonysynth.play(TempoClock(273/60)); ~melodydrop.play(TempoClock(273/60)); ~melodydrop2.play(TempoClock(273/60)); ~harmonydrop.play(TempoClock(273/60)); ~harmonydrop2.play(TempoClock(273/60)); ~bassdrop.play(TempoClock(273/60)); ~bassierdrop.play(TempoClock(273/60)); ~bassdrone.play(TempoClock(273/60)); ~bridgechord1.play(TempoClock(273/60)); ~bridgechord2.play(TempoClock(273/60)); ~bridgebassier.play(TempoClock(273/60)); ~bridgebass.play(TempoClock(273/60)); ~snareintro.play(TempoClock(273/60)); ~snare.play(TempoClock(273/60)); ~snare2.play(TempoClock(273/60)); ~kick.play(TempoClock(273/60)); ~kick2.play(TempoClock(273/60)); ~hihat.play(TempoClock(273/60)); ~hihat2.play(TempoClock(273/60)); ~rise.play(TempoClock(273/60)); ~thump.play(TempoClock(273/60)); ( t=TempoClock(273/60); Pspawner({ arg maestro; maestro.par(~melodyintro); maestro.wait(46); maestro.seq(~pickup); maestro.par(~melodyintro); maestro.par(~melodyintro2); maestro.par(~bassdrone); maestro.seq(~bassintro); maestro.par(~melodyintro); maestro.par(~melodyintro2); maestro.par(~bassdrone); maestro.par(~bassintro); maestro.seq(~harmonymono); maestro.par(~melodyintro); maestro.par(~melodyintro2); maestro.par(~bassdrone); maestro.par(~bassintro); maestro.par(~snareintro); maestro.par(~harmonysynth); maestro.par(~harmonyintro); maestro.wait(56); maestro.par(~rise); maestro.wait(8); maestro.par(~thump); maestro.par(~melodydrop); maestro.par(~melodydrop2); maestro.wait(32); maestro.par(~bassdrop); maestro.wait(32); maestro.suspendAll; maestro.par(~snare); maestro.par(~hihat); maestro.par(~kick); maestro.par(~bassdrop); maestro.par(~bassierdrop); maestro.par(~harmonydrop); maestro.par(~melodydrop); maestro.seq(~melodydrop2); maestro.wait(2); maestro.par(~rise); maestro.wait(6); maestro.par(~bridgechord1); maestro.par(~bridgechord2); maestro.par(~bridgebass); maestro.par(~bridgebassier); maestro.par(~hihat2); maestro.par(~snare2); maestro.seq(~kick2); maestro.par(~melodydrop); maestro.par(~melodydrop2); maestro.wait(32); maestro.par(~bassierdrop); maestro.wait(32); maestro.suspendAll; maestro.seq(~harmonydrop2); maestro.suspendAll; maestro.suspendAll }).play(t) ) s.makeWindow;
code description
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