Created
October 2, 2013 15:39
-
-
Save tado/6795733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Examples for Interactive Music II Tokyo University of Arts (2013.10.03) | |
// Hello World | |
"Hello world" | |
// 音を鳴らしてみる | |
play({SinOsc.ar(LFNoise0.kr(12, mul: 600, add: 1000), 0.3)}); | |
// SC 140 | |
01 | |
Nathaniel Virgo | |
{LocalOut.ar(a=CombN.ar(BPF.ar(LocalIn.ar(2)*7.5+Saw.ar([32,33],0.2),2**LFNoise0.kr(4/3,4)*300,0.1).distort,2,2,40));a}.play//#supercollider | |
02 | |
LFSaw | |
{Splay.ar(Ringz.ar(Impulse.ar([2, 1, 4], [0.1, 0.11, 0.12]), [0.1, 0.1, 0.5])) * EnvGen.kr(Env([1, 1, 0], [120, 10]), doneAction: 2)}.play | |
03 | |
Tim Walters | |
play{({|k|({|i|y=SinOsc;y.ar(i*k*k,y.ar(i*k**i/[4,5])*Decay.kr(Dust.kr(1/4**i),y.ar(0.1)+1*k+i,k*999))}!8).product}!16).sum}//#supercollider | |
04 | |
Nathaniel Virgo | |
b=Buffer.read(s,"sounds/a11wlk01.wav");play{t=Impulse.kr(5);PlayBuf.ar(1,b,1,t,Demand.kr(t,0,Dseq(1e3*[103,41,162,15,141,52,124,190],4)))!2} | |
05 | |
Batuhan Bozkurt | |
play{f=LocalIn.ar(2).tanh;k=Latch.kr(f[0].abs,Impulse.kr(1/4));LocalOut.ar(f+CombC.ar(Blip.ar([4,6],100*k+50,0.9),1,k*0.3,50*f));f}//44.1kHz | |
06 | |
Batuhan Bozkurt (refactored by Charles Celeste Hutchins) | |
f={|t|Pbind(\note,Pseq([-1,1,6,8,9,1,-1,8,6,1,9,8]+5,319),\dur,t)};Ptpar([0,f.(1/6),12,f.(0.1672)],1).play//#supercollider reich RT @earslap | |
07 | |
Thor Magnusson | |
play{x=SinOsc;y=LFNoise0;a=y.ar(8);(x.ar(Pulse.ar(1)*24)+x.ar(90+(a*90))+MoogFF.ar(Saw.ar(y.ar(4,333,666)),a*XLine.ar(1,39,99,99,0,2)))!2/3} | |
08 | |
Charlie Hoistman | |
Ptpar(({|i|[i*8,Pbind(\scale,[0,2,4,7,9],\degree,Pseq(32.fib.fold(0,10),4)+(2*i+i)-10,\dur,1+2**i%2/6)]}!4).flat).play // #supercollider | |
09 | |
MCLD | |
{LocalOut.ar(a=DynKlank.ar(`[LocalIn.ar.clip2(LFPulse.kr([1,2,1/8]).sum/2)**100*100],Impulse.ar(10)));HPF.ar(a).clip2}.play// | |
10 | |
Julian Rohrhuber | |
/*eclecticity*/ Ndef(\x, { SinOsc.ar(BrownNoise.ar(30!2, 200), Ndef(\x).ar * LFNoise1.kr(1!2,1,1)) }).play; | |
11 | |
Micromoog | |
play{VarSaw.ar((Hasher.ar(Latch.ar(SinOsc.ar((1..4)!2),Impulse.ar([5/2,5])))*300+300).round(60),0,LFNoise2.ar(2,1/3,1/2))/5}//#supercollider | |
12 | |
Jose Padovani | |
play{x=165;b=SinOsc;p=Trig.ar(Saw.ar(x),1);y=b.ar(p*x);z=b.ar(p);(GVerb.ar(GrainIn.ar(2,y,y/2,z,p*z,-1),9))/9}//basso gettato #SuperCollider | |
13 | |
Batuhan Bozkurt | |
play{LeakDC.ar(BRF.ar(Saw.ar(8,Decay2.kr(x=Duty.kr(1/8,0,Drand([0,Drand((0.4,0.5..1))],inf)),0.01,0.3))**1.5,x*20+[45.1,45],0.1)).tanh}//#sc | |
14 | |
Nathaniel Virgo | |
Ndef('x',{x=Ndef('x').ar+0.01;a=BPF.ar(x,6**Latch.ar(x,Dust.ar(x))*200,0.1).sin;9.do{a=AllpassN.ar(a,0.2,{0.2.rand}!2,9)};a+a.mean}).play; | |
15 | |
Jason Dixon | |
{x=Array.fill(5,{[0.00001,0.03].asSpec.map(LFNoise2.kr(3))});Splay.ar(Friction.ar(LFTri.ar(50),friction:x,mass:x*30000))}.play | |
16 | |
Batuhan Bozkurt | |
play{AllpassC.ar(SinOsc.ar(55).tanh,0.4,TExpRand.ar(2e-4, 0.4,Impulse.ar(8)).round([2e-3,4e-3]),2)};// #supercollider with bass please... | |
17 | |
redFrik | |
{RHPF.ar(GbmanN.ar([2300,1150]),LFSaw.ar(Pulse.ar(4,[1,2]/8,1,LFPulse.ar(1/8)/5+1))+2)}.play //punk (loud!) | |
18 | |
Nathaniel Virgo | |
play{p=PinkNoise.ar(1!2);BRF.ar(p+Blip.ar(p+2,400),150,2,0.1)+LPF.ar(FreeVerb2.ar(*LPF.ar(p+0.2*Dust.ar(0.1),60)++[1,1,0.2,1e4]).tanh,2000)} | |
19 | |
MCLD | |
{a=[0.02,0.1,1,2,3,4]; k=LFPar.kr(a+0.5).sum; f=Latch.kr(k,Impulse.kr(a)); Splay.ar(SinOsc.ar(f*100+300)/5)}.play // #supercollider | |
20 | |
Sciss | |
play{2.collect{RecordBuf.ar(Limiter.ar(HPF.ar(Convolution2.ar(k=Crackle.ar(l=Line.kr(1,2,90)),b=LocalBuf(2048),Dust.kr(4)),8)+k)*(2-l),b)}} | |
21 | |
Andrea Valle | |
{13.do{|i|k="SuperCollider"[i].ascii;20.do{|u|{MoogFF.ar(Saw.ar((k/4).midicps)*EnvGen.ar(Env.perc),u+k*9,k/30)}.play;(k*0.001).wait}}}.fork | |
22 | |
MCLD | |
play{a=Duty.kr(0.1,0,Dseq(fib(32).wrap(20,55).midicps,inf));HPF.ar(LeakDC.ar(Splay.ar(LFCub.ar([-1,a,a/3,-2])))*9).clip2/9};//#supercollider | |
// 数値を変化させてみよう! | |
play({RLPF.ar(Dust.ar([12, 15]), LFNoise1.ar(1/[3, 8], 1500, 1600), 0.02)}); | |
// 要素ごとに、わかりやすくインデント | |
play( | |
{ | |
RLPF.ar( | |
Dust.ar( | |
[12, 15] | |
), | |
LFNoise1.ar( | |
1/[3, 8], | |
1500, | |
1600 | |
), | |
0.02 | |
) | |
} | |
); | |
// Enclosures | |
// Array | |
[0, 11, 10, 1, 9, 8, 2, 3, 7, 4, 6, 5].reverse | |
12 - [0, 11, 10, 1, 9, 8, 2, 3, 7, 4, 6, 5].reverse | |
[0, 2, 4, 5, 6, 7, 9, 11].scramble | |
[60, 62, 64, 67, 69].mirror | |
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].rotate | |
[60, 62, 64, 65, 67, 69, 71].midicps.round(0.1) | |
[1, 0.75, 0.5, 0.25, 0.125].choose | |
0.125 * [1, 2, 3, 4, 5, 6, 7, 8].choose | |
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].permute(6) | |
// Channel | |
{Blip.ar(25, LFNoise0.kr(5, 12, 14), 0.3)}.play | |
{Blip.ar(25, LFNoise0.kr([5, 10], 12, 14), 0.3)}.play | |
{Blip.ar(25, LFNoise0.kr([5, 10, 2, 25], 12, 14), 0.3)}.play | |
{Blip.ar(25, LFNoise0.kr([5, 4, 7, 9, 5, 1, 9, 2], 12, 14), 0.3)}.play | |
// Function | |
dup(rand(1000.0), 5); | |
dup({rand(1000.0)}, 5); | |
// Nesting | |
exprand(1.0, 1000.0); | |
dup({exprand(1.0, 1000.0)}, 100); | |
sort(dup({exprand(1.0, 1000.0)}, 100)); | |
round(sort(dup({exprand(1.0, 1000.0)}, 100)), 0.01); | |
play( | |
{ | |
CombN.ar( | |
SinOsc.ar( | |
midicps( | |
LFNoise1.ar(3, 24, | |
LFSaw.ar([5, 5.123], 0, 3, 80) | |
) | |
), | |
0, 0.4), | |
1, 0.3, 2) | |
} | |
) | |
// Message | |
{LFNoise0.ar}.play | |
{LFNoise0.ar(10000)}.plot | |
{LFNoise0.ar(10000)}.scope | |
{100.rand}.dup(10) | |
{100.rand} ! 10 | |
{100.rand}.dup(10).postln.plot | |
{100.rand}.dup(100).sort.plot | |
// Message and Argument | |
rand(100) | |
exprand(1.0, 100.0) | |
dup("echo", 20) | |
round([3.141, 5.9265, 358.98], 0.01) | |
sort([23, 54, 678, 1, 21, 91, 34, 78]) | |
round(dup({exprand(1, 10)}, 100), 0.1) | |
sort(round(dup({exprand(1, 10)}, 100), 0.1)) | |
// Receiver | |
[45, 13, 10, 498, 78].sort | |
"echo".dup(20) | |
50.midicps | |
444.cpsmidi | |
100.rand | |
{100.rand}.dup(50) | |
[1.001, 45.827, 187.18].round(0.1) | |
"I've just picked up a fault in the AE35 unit".speak | |
// Nestig by dots | |
1000.0 | |
1000.0.rand | |
1000.0.rand.round(0.01) | |
1000.0.rand.round(0.01).post | |
{1000.0.rand.round(0.01).postln}.dup(100).plot | |
{1000.0.rand.round(0.01).postln}.dup(100).postln.sort.plot | |
1000.0.rand.round(0.01).postln.asString.speak | |
// UGens | |
LFNoise1.kr(10,100) | |
// Veriables | |
( | |
a = 440; | |
b = 3; | |
c = "math operations"; | |
[c, a, b, a*b, a + b, a.pow(b), a.mod(b)] | |
) | |
( | |
{ | |
r = MouseX.kr(1/3, 10); | |
SinOsc.ar(mul: Linen.kr(Impulse.kr(r), 0, 1, 1/r)) | |
}.play | |
) | |
( | |
p = { | |
r = Line.kr(1, 20, 60); | |
t = Impulse.kr(r); | |
e = Linen.kr(t, 0, 0.5, 1/r); | |
f = TRand.kr(1, 10, t); | |
Blip.ar(f*100, f, e) | |
}.play | |
) | |
( | |
{ | |
r = Impulse.kr(10); | |
c = TRand.kr(100, 5000, r); | |
m = TRand.kr(100, 5000, r); | |
PMOsc.ar(c, m, 12)*0.3 | |
}.play | |
) | |
( | |
{ | |
var rate = 4, carrier, modRatio; | |
carrier = LFNoise0.kr(rate) * 500 + 700; | |
modRatio = MouseX.kr(1, 2.0); | |
PMOsc.ar(carrier, carrier*modRatio, 12)*0.3 | |
}.play | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment