| // archive of code used for disquiet junto 0368 | |
| // P is the same as Pbindef | |
| // also needs buffer player synth \bf, and various other bits of initialisation not shown here | |
| ~dqjpath="/Users/jsimon/Dropbox/SuperCollider/disquiet junto 0368/Junto 367.aif" | |
| ~dqjbuf=Buffer.read(s, ~dqjpath) | |
| // ~dqjbuf.play | |
| t.tempo_(120/60) | |
| // define beat counter | |
| P(\justcount, \rest, Pn(\rest), \count, (Pseq((1..384),1)/4).ceil.asInt, \print, Pfunc({|event| event.at(\count).postln})) | |
| // P(\justcount).play | |
| // define buffer playing node, careful with cmdperiod! | |
| // Ndef(\playit, {|start=0| PlayBuf.ar(2, ~dqjbuf, startPos: start)}) // stereo version used in testing | |
| Ndef(\playit, {|start=0| Mix.ar(PlayBuf.ar(2, ~dqjbuf, startPos: start))}) // panned left | |
| // Ndef(\playit).stop | |
| // initial tempo check, don't need any more | |
| // ( | |
| // P(\beat, \i, \bf, \a, 0.9); | |
| // P(\beat, \count, (Pseq((1..384),1)/4).ceil.asInt); // still a couple of bars short | |
| // P(\beat, \print, Pfunc({|event| event.at(\count).postln})); | |
| // ) | |
| // P(\beat).play | |
| // P(\beat).stop | |
| // set up busses and nodes for slowly varying filters etc | |
| ~sbus = Bus.audio(s,2) | |
| Ndef(\sfilt, {In.ar(~sbus,2)}).play | |
| Ndef(\sfilt).filter(1, {|x| MoogVCF.ar(x, LFTri.kr(1/10).range(3000,5000), 0.4) }) | |
| ~kbus = Bus.audio(s,2) | |
| Ndef(\kfilt, {In.ar(~kbus,2)}).play | |
| Ndef(\kfilt).filter(1, {|x| Decimator.ar(x, LFTri.kr(1/19).range(2000,4000), 10) }) | |
| ~hbus = Bus.audio(s,2) | |
| Ndef(\hfilt, {In.ar(~hbus,2)}).play | |
| Ndef(\hfilt).filter(1, {|x| CombC.ar(x, delaytime: LFTri.kr(1/5).range(2000,4000).reciprocal) }).set(\wet1, 0.15) | |
| // lazy drum machine, can livecode binary patterns | |
| Pdefn(\krest, (2r1000001010000000).asBinaryDigits(16).replace(0,\).pseq) | |
| Pdefn(\srest, (2r0000100000001000).asBinaryDigits(16).replace(0,\).pseq) | |
| Pdefn(\hrest, (2r1010001010100010).asBinaryDigits(16).replace(0,\).pseq) | |
| Pbindef(\k, \instrument, \bf, \buf, ~hitz03.at(0), \dur, 1/4, \rest, Pdefn(\krest), \length, Pn(1,16), \a, 0.3, \out, ~kbus, \pan, 1) | |
| Pbindef(\s, \instrument, \bf, \buf, ~hitz03.at(2), \dur, 1/4, \rest, Pdefn(\srest), \length, Pn(1,16), \a, 0.3, \out, ~sbus, \pan, 1) | |
| Pbindef(\h, \instrument, \bf, \buf, ~hitz03.at(1), \dur, 1/4, \rest, Pdefn(\hrest), \length, Pn(1,16), \a, 0.3, \out, ~hbus, \pan, 1) | |
| Pdef(\main, Ppar([Pdef(\h), Pdef(\k), Pdef(\s)])) | |
| Pbindef(\fill, \instrument, \bf, \buf, Prand(~hitz03[0,2..],8), \dur, 1/2, \a, 0.2, \pan, 1) | |
| Pdef(\arr, Psym(Pseq([[\main].dup(7), [\fill]].flat, 10))) // stops after 12 rounds 12*8 = 96 | |
| // Pdef(\arr).stop | |
| // Pdef(\arr).play | |
| // start all together | |
| ( | |
| P(\justcount).play; | |
| Pdef(\arr).play; | |
| Ndef(\playit).fadeTime_(nil).vol_(0.18).quant_(4).play | |
| ) | |
| // Ndef(\playit).stop; P(\justcount).stop; Pdef(\arr).stop | |
| // Ndef(\playit).vol_(0.18) | |
| // Ndef(\playit).vol_(0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment