Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: another livecoding rehearsal
name
code content
// setup Pdef.all.clear; Ndef.all.clear; ( SynthDef(\blip, { |out= 0, freq = 261.6255653006, nharm = 10, gate = 1, amp = 0.1| var sig = Blip.ar(freq * ((-2..2)/500 + 1), nharm); // five channels, detuned var env = EnvGen.kr(Env.adsr(), gate, doneAction:2); sig = sig * env; Out.ar(out, Splay.ar(sig) * amp) }).add ) ~hitzpath="/Users/jsimon/Music/SuperCollider Recordings/hitzamples/"; // various drum samples ~bufs = (~hitzpath ++ "*.aiff").pathMatch.collect({ |i| Buffer.read(s, i)}); ( SynthDef(\bf, {|out=0 buf=0 amp=0.1 freq=261.6255653006| var sig = PlayBuf.ar(2, buf, BufRateScale.kr(buf) * freq/60.midicps, doneAction:2); Out.ar(out, sig * amp) }).add ) t = TempoClock(140/60).permanent_(true); ~mbus = Bus.audio(s, 2); Ndef(\m).put(0, { InFeedback.ar(~mbus, 2) }).fadeTime_(0.2).play; // actually never used! // go Pbindef(\b, \instrument, \blip) ~mel = {-12.rand}!16 Pbindef(\b, \scale, Scale.hexMajor7) Pbindef(\b, \degree, Pseq(~mel,inf)) Pbindef(\b, \dur, 1/4) Pbindef(\b, \out, ~mbus).play(t, quant:4) // <----------------- ~mel2 = {-12.rand}!32 Pbindef(\b, \degree, Pseq(~mel2,inf)) Pbindef(\b, \degree, Pseq([~mel, ~mel, ~mel2].flatten,inf)) // need to do something with nharm Pbindef(\b, \nharm, Prand((1..10), inf)) // varying the rhythm using amp, also guarantee a downbeat ~gr = ([1] ++ [{2.rand}!15]).flatten/10 Pbindef(\b, \amp, Pseq(~gr, inf)) // yeah! Pbindef(\d, \instrument, \bf).play(t, quant: 4) // main out fine for now Pbindef(\s, \buf, ~bufs.choose) // find a snarish sound Pbindef(\s, \amp, Pseq([0,1]/10, inf)) Pbindef(\s, \instrument, \bf).play(t, quant: 4) Pbindef(\s).stop // jam Pbindef(\d).stop Pbindef(\b).stop // revisit melody ~mel = {-12.rand}!16 ~mel2 = {-12.rand}!32 Pbindef(\b, \degree, Pseq([~mel, ~mel, ~mel2].flatten,inf)) t.sync(30/60, 30) // slowdown nb .sync is an extension s.record s.stopRecording thisProcess.platform.recordingsDir.openOS
code description
More rehearsals towards a sort of algorave gig I've been offered, tidied up a bit. One run of this here https://soundcloud.com/tedthetrumpet/lcode-04-gmsnprep-05
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