Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: A3
name
code content
// ================================= // A3 - musc-115-granular // GRANULAR SAMPLING // ================================= // boot server // load sound b = Buffer.read(s, "/Users/timnevada/Desktop/Shelter (Mono).wav"); b.play; b.numChannels; b.duration; b.numFrames; ( SynthDef("gran1", {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("gran3", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, ffreq = 1000, rq = 0.1, panning = 0, delay = 0.0, 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; ) ( ~a = Pbind( \instrument, "gran1", \rate, Pseq([1, 1], 4), \amp, 0.3, \startPos, Pseq([0.3523, 0.505], inf), \attack, 0.01, \release, 0.3, \buffer, b, \dur, 0.3 ); ~a.play; ) ( ~b = Pbind( \instrument, "gran1", \rate, Pseq([0, 1], 2), \amp, 0.3, \startPos, Pseq([[0.27, 0.28, 0.2874]], inf), \attack, 0.01, \release, 0.35, \buffer, b, \dur, 0.6 ); ~b.play; ) ( ~z = Pbind( \instrument, "gran1", \rate, Pseq([2], 8), \amp, 0.3, \startPos, Pseq([0.03, 0.04, 0.03, 0.04], inf), \attack, 0.01, \release, 0.5, \buffer, b, \dur, 0.3 ); ~z.play; ) ( ~z1 = Pbind( \instrument, "gran1", \rate, Pseq([0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2], 1), \amp, 0.3, \startPos, Pseq([0.03, 0.04, 0.03, 0.04], inf), \attack, 0.01, \release, 0.5, \buffer, b, \dur, 0.3 ); ~z1.play; ) ( ~z2 = Pbind( \instrument, "gran1", \rate, Pseq([0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2], 2), \amp, 0.3, \startPos, Pseq([0.03, 0.04, 0.03, 0.04], inf), \attack, 0.01, \release, 0.5, \buffer, b, \dur, 0.3 ); ~z2.play; ) ( ~c = Pbind( \instrument, "gran1", \rate, Pseq([1, [1, 2]], 4), \amp, 0.3, \startPos, Pseq([[0.003, 0.008], 0.013], inf), \attack, 0.01, \release, 0.3, \buffer, b, \dur, 0.3 ); ~c.play; ) ( ~d = Pbind( \instrument, "gran1", \rate, Pseq([1, 1, 1, 1, 1, 1, 1, 1], 1), \amp, 0.3, \startPos, Pseq([0.21, 0.492, 0.21, 0.492, 0.21, 0.492, 0.21, 0.136], inf), \attack, 0.03, \release, 0.5, \buffer, b, \dur, 0.6 ); ~d.play; ) ( ~fill = Pbind( \instrument, "gran1", \rate, Pseq([[2, 1], 1, 1, 1, 1], 2), \amp, 0.5, \startPos, Pseq([0.065], inf), \attack, 0.01, \release, Pseq([0.3, 0.15, 0.15, 0.3, 0.3, 0.15, 0.3, 0.15, 0.15, 0.3, 0.3], inf), \buffer, b, \dur, Pseq([0.3, 0.15, 0.15, 0.3, 0.3, 0.15, 0.3, 0.15, 0.15, 0.3, 0.3], inf) ); ~fill.play; ) ( ~wash = Pbind( \instrument, "gran3", \rate, Pseq([2], inf), \amp, 0.5, \startPos, Pseq([0.01, 0.03, 0.05, 0.03, 0.05, 0.03, 0.05, 0.03], 8), \attack, 0.01, \release, 1, \ffreq, Pseq([100, 200, 400, 800, 700, 500, 300, 100], inf), \rq, 0.5, \decay, 1, \buffer, b, \dur, 0.15, \panning, Pseq([-0.66, -0.33, 0.33, 0.66, 0.33, -0.33], inf) ); ~wash.play; ) s.record; s.stopRecording; ( Pspawner({ arg maestro; maestro.seq(~c); maestro.seq(Ppar([~c, ~b])); maestro.seq(Ppar([~c, ~a, ~z1])); maestro.seq(~fill); maestro.seq(Ppar([~d])); maestro.seq(Ppar([~d, ~b])); maestro.seq(Ppar([~d, ~c, ~z1])); maestro.seq(~fill); maestro.seq(Ppar([~d])); maestro.seq(Ppar([~d, ~a, ~z1])); maestro.seq(~fill); maestro.seq(Ppar([~d, ~z1])); maestro.seq(Ppar([~d])); maestro.seq(Ppar([~d, ~z1])); maestro.seq(~fill); maestro.seq(~c); maestro.seq(Ppar([~c, ~b])); maestro.seq(~c); maestro.seq(Ppar([~c, ~a, ~z1])); maestro.seq(~fill); maestro.seq(Ppar([~d])); maestro.seq(Ppar([~d, ~b])); maestro.seq(Ppar([~d, ~c, ~z1])); maestro.seq(~fill); maestro.seq(Ppar([~wash, ~z2])); }).play; )
code description
Samples "Shelter" by Madeon and Porter Robinson Mono file for sampled track here: https://drive.google.com/open?id=0B_7bVALW7C3aU0xlVktLWmNNZWs
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