Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: SMDWA115granular
name
code content
// ================================= // A3 Granular Composition: ONYEKACHI OKOLO b = Buffer.read(s,"C:/Users/bambi/Desktop/SMDWA.wav"); // buffer handy tools: b.play; // check number of channels b.numChannels; // check duration b.duration; // check how many samples are in the sample b.numFrames; // SynthDefs ( SynthDef("granny1", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, panning = 0; var snd, env; env = Env.perc(attackTime: attack, releaseTime: release, level: amp).kr(doneAction: 2); snd = PlayBuf.ar( numChannels: 1, bufnum: buffer, rate: rate, startPos: startPos.linlin(0, 1, 0, BufFrames.kr(buffer)) ); snd = snd * env; snd = Pan2.ar(snd, panning); Out.ar(0, snd); }).add; SynthDef("granny2", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, ffreq = 1000, rq = 0.1, panning = 0; var snd, env; env = Env.perc(attackTime: attack, releaseTime: release, level: amp).kr(doneAction: 2); snd = PlayBuf.ar( numChannels: 1, bufnum: buffer, rate: rate, startPos: startPos.linlin(0, 1, 0, BufFrames.kr(buffer)) ); snd = snd * env; snd = BPF.ar(snd, ffreq, rq); snd = Pan2.ar(snd, panning); Out.ar(0, snd); }).add; SynthDef("granny3", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, ffreq = 1000, rq = 0.1, panning = 0, delay = 0.3, decay = 1; var snd, env; env = Env.perc(attackTime: attack, releaseTime: release, level: amp).kr(doneAction: 2); snd = PlayBuf.ar( numChannels: 1, bufnum: buffer, rate: rate, startPos: startPos.linlin(0, 1, 0, BufFrames.kr(buffer)) ); snd = snd * env; snd = BPF.ar(snd, ffreq, rq); snd = CombC.ar(snd, maxdelaytime: 2, delaytime: delay, decaytime: decay); snd = Pan2.ar(snd, panning); Out.ar(0, snd); }).add; SynthDef("grannylinen", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, panning = 0, sustain = 1; var snd, env; env = Env.linen(attackTime: attack, sustainTime: sustain, releaseTime: release, level: amp).kr(doneAction: 2); snd = PlayBuf.ar( numChannels: 1, bufnum: buffer, rate: rate, startPos: startPos.linlin(0, 1, 0, BufFrames.kr(buffer)) ); snd = snd * env; snd = LPF.ar(snd, 100); snd = Pan2.ar(snd, panning); Out.ar(0, snd); }).add; ) // Some testing Pbinds ( ~two = Pbind( \instrument, "granny1", \rate, Pseq([10, 2, 0.6, 0.92, 5], 1), \amp, Pwhite(0.1, 0.9), \startPos,0.3, \attack, 0.01, \release, Pseq([0.1,0.1,0.3,0.4,0.5],1), \buffer, b, \dur, Pseq([0.5, 0.375,0.5,0.375, 0.25],inf), \panning, Pwhite(-1, 1.0); ); ~three = Pbind( \instrument, "granny2", \rate, 4, \amp, 15, \startPos, 0, \attack, 0.01, \release, 0.2, \ffreq, Pseq([300,300, 100],1), \rq, Pseq([0.5,0.5,0.1],1), \buffer, b, \dur, Pseq([0.25, 0.25, 0.375],1), \panning, Pwhite(-0.5, 0.5) ); ~three3 = Pbind( \instrument, "granny2", \rate, 0.3, \amp, 15, \startPos, 0, \attack, 0.01, \release, 0.2, \ffreq, 100, \rq, 0.6, \buffer, b, \dur, Pseq([0.5, 0.5, 0.5, 0.25],1), \panning, Pwhite(-0.5, 0.5) ); ~custom3 = Pbind( \instrument, "granny2", \rate, Pseq([2, 1, 0.3], 1), \amp, 5, \startPos, 0.5, \attack, 0.02, \release, 0.4, \ffreq, Pseq([200,400,600],1), \rq, 0.4, \buffer, b, \dur, Pseq([0.25,0.25,0.375],1), \panning, Pwhite(-0.5, 0.5) ); ~threedrop = Pbind( \instrument, "granny2", \rate, Prand([2, 2, 3, 0.92, 1.01, 1, 1, 9, 0.5], inf), \amp, 3, \startPos, Pseq([0.24, 0.33, 0.66, 0.89], inf), \attack, 0.02, \release, 0.4, \ffreq, Pseq([400, 1000, 2000], 1), \rq, 0.01, \buffer, b, \dur, Pseq([0.25, 0.25, 0.375],1), \panning, Pwhite(-0.5, 0.5) ); ~four = Pbind( \instrument, "granny3", \rate, Pseq([2, 4, 1, 9], 4), \amp, 1, \startPos, Pseq([0.14, 0.13, 0.7, 0.9], inf), \attack, 0.2, \release, 2, \ffreq, Prand([100, 200, 400, 550, 9000, 50, 100, 2000], inf), \rq, 0.1, \delay, 0.2, \decay, 2, \buffer, b, \dur, 0.5, \panning, Pwhite(-0.5, 0.5) ); ) s.makeWindow; //testing ~two.play; ~three.play; ~three3.play; ~custom3.play; ~threedrop.play; ~four.play; // ================================= // Putting stuff together with Pspawner // ================================= ( Pspawner({ arg maestro; maestro.seq(~four); maestro.seq(Ppar([~three3],4)); maestro.seq(Ppar([~custom3],8)); maestro.par(Ppar([~custom3],8)); maestro.seq(Ppar([~three],4)); maestro.seq(Ppar([~three3],4)); maestro.seq(Ppar([~two],4)); maestro.seq(Ppar([~three3],4)); maestro.par(Pseq([~three3],8)); maestro.par(Ppar([~custom3],8)); maestro.par(Ppar([~threedrop],8)); maestro.seq(Ppar([~three],8)); maestro.par(Ppar([~threedrop],4)); maestro.seq(Ppar([~three],4)); maestro.par(Ppar([~three],4)); maestro.seq(Ppar([~three3],3)); "END".postln; maestro.suspendAll; }).play; )
code description
https://soundcloud.com/onyekachi-okolo/smdwa-115granular Sample: https://drive.google.com/open?id=0B2uUIdgBbGgDUkVlUVRXbW9BbUk
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