supercollider

traer physics library for supercollider

a while ago i started porting the java/processing library TRAER.PHYSICS 3.0 by Jeffrey Traer Bernstein to supercollider. it's a simple and elegant particle system and a physics engine all in one. there are already ports to actionscript3, javascript and c++ (cinder), but i haven't seen anyone working with it in sc yet. so i had a go - both to learn more and to have an alternative to my own physics library quark redUniverse.

it is now finished and released as a quark. this is the initial version and there might still be bugs. i _did see sc crash once in a strange way after spawning lots of particles, so watch out for memory leaks.
to install it run the following code and recompile sc...

Quarks.checkoutAll;
Quarks.install("TraerPhysics");

i also wrote a few simple examples to go along with the helpfiles. here's a screenshot of one...

more sc twitter

more audio recordings of my twitter sctweets. see twitter.com/redFrik and this post.
normally you run these lines of code (140 characters) in supercollider and it will play you some kind of generative music or soundscape (also graphics in rare cases). here i've recorded a few for those who are too lazy to install sc.

 

//--tweet0026

{CombL.ar(In.ar(8).tanh/8,1,1,8)!2}.play;Pbind(\amp,8,\dur,1/4,\degree,Pseq(List.fib(32)%(List.fib(64)%12),inf),\out,8).play//#SuperCollider

this one is using the built in .fib (as in fibonacci) method to generate pitches (\degree) for the Pbind. the Pbind in it self is quite boring to listen to, so by playing it out on audio bus 8 and then making a small distortion+echo effect synth reading from bus 8, we get a much more interesting sound.

 

//--tweet0028

play{MoogFF.ar(LFTri.ar(CombN.ar(Duty.ar(1/8,0,Dseq(Dshuf(List.fib(16)%8*99,8),inf)),4,4,16))/4,LFTri.kr(1/16,0,2e3,3e3))!2}//#SuperCollider

again using the built in fibonacci method to generate patterns. here every 8th bar the pattern is scrambled (Dshuf), and in every 8th bar period the first 2 bars are transposed by a strange trick running the melody pattern (i.e. the frequencies) through a CombN.

 

//--tweet0030

play{a=LFPar;GVerb.ar(VarSaw.ar(a.ar(1,0,5,a.ar([0.05,0.04],0,50,160).round(50)),0,a.ar(0.2,0,0.5,a.ar(3,0,0.2,0.5)))/8,80)}//#SuperCollider

here is something that sounds a bit like a couple of trombones playing a riff in a reverberant room. the riff just goes on and on and is made from a pair of slowly changing LFPar oscillators, scaled, offset and rounded to the nearest 50Hz.

 

//--tweet0033

play{f=LFPar.ar(1/14).round*20+80;Splay.ar(LFPar.ar({|i|[i+1*f,i*f+(i+1/3)]}!4)>BrownNoise.ar(Pulse.ar({|i|i+1}!4,0.35))/3)}//#SuperCollider

sounds a bit like punk rock in 6/8 time signature. the crispness comes from the > BrownNoise combo and the rhythms from the Pulse. overall melody is the slowly running LFPar oscillator stored in variable f. note that this tweet only works in sc version 3.5 and above.

 

//--tweet0041

play{o=SinOsc.ar(1/RunningMax.ar(Sweep.ar(LocalIn.ar(6)),Impulse.ar([1,0.749,6,12,3,4])));LocalOut.ar(o);Splay.ar(o).tanh/2}//#SuperCollider

an ever rising tone cluster with some clicks. this is built using a localin/localout feedback chain. there are plateaus where one thinks the maximum frequency is reached, but those are only temporary and after a while the tone starts to rise again.

 

//--tweet0044

play{a=SinOsc;Limiter.ar(LeakDC.ar(a.ar(0.11,BRF.ar(a.ar(a.ar(0.12).exprange(1,1e4),2pi),1/a.ar(0.13).range(1,[99,100])))))}//#SuperCollider

here the cutoff frequency of a BRF (band reject filter) is modulated with a SinOsc. the cutoff varies between 1 and 99 Hz in the left channel, and 1 and 100 Hz in the right channel. the BRF goes wild and outputs totally crazy sounds when modulated in this matter - just like the BPF used to behave in old sc versions (3.3 and earlier).

 

//--tweet0045

play{a=SinOsc;a.ar(a.ar(a.ar(0.11)),a.ar(a.ar(95*a.ar(0.01,0,1,1),0,a.ar(5e-3,0,50),100),a.ar([98,97]),pi+a.ar(5e-4))).tanh}//#SuperCollider

a deep fat bass. it sounds as lovely in a big speaker system as it sounds poor in laptop speakers. the patch is mainly doing phase modulation on a SinOsc with tanh distortion.

 

//--tweet0046

play{a=LFTri;GVerb.ar(Mix(Limiter.ar(BRF.ar(a.ar(50,1e-4),a.ar(a.ar([1.01,1.0111])*a.ar(8e3)*1e3+4e3,55),a.ar(0.01)*3))))/9}//#SuperCollider

this tweet sounds much like a field recording. the noise comes from an exploding BRF (band reject filter) that is wrapped in a Limiter so that it keeps in range. last a GVerb is adding a metallic quality reverb to the overall sound.

 

//--tweet0047

play{CombN.ar(Limiter.ar(BRF.ar(LFSaw.ar(10,0,0.01),LFTri.ar([5,6]*0.1))),0.1,LFTri.kr(0.1,0,0.05,0.05).round(0.01))}//#SuperCollider#SC2012

this was coded, believe it or not, within a 5min time limit and under water pistol threat (part of sc2012 keynote talk in london). again it's a BRF misbehaving run through a comb delay with short modulated delaytime (from 0 to 0.1).

 

//--tweet0048

play{a=Impulse;b=SinOsc;c=b.ar(0,BRF.ar(a.ar([7,8]),a.ar(9).lag2(1e-3),1.5,2pi));Ringz.ar(c,b.ar(0.02,0,99,150),1/9)+c*0.02}//#SuperCollider

a quite poor tweet. the rhythms are not so interesting and it also have the problem of running out and stopping after a few seconds. anyway, the principle is that a BRF is generating strange sounds that phase modulate a SinOsc, that in turn goes through a ringing filter (Ringz). i only wanted to record it so that when someone fixes the BRF in some upcoming supercollider version, i can go back and listen to how it could sound.

 

//--tweet0053

Pbind(\freq,Pseq("SUPERCOLLIDER".ascii,inf)*Pstutter(64,Pseq([3,4,5],inf))*[1,2.045],\dur,0.03,\amp,Pseq([0,0.1],inf)).play// #SuperCollider

super annoying little thing. it is using the values of the ascii characters in the string "SUPERCOLLIDER" which is [83, 85, 80, 69, 82, 67, 79, 76, 76, 73, 68, 69, 82]. this is played in sequence and transposed and detuned. maybe a candidate for the official supercollider theme song?

 

//--tweet0054

play{CombN.ar(SyncSaw.ar(Saw.ar([3,4],32,64),Saw.ar([4,3],99,Duty.kr(1,0,flop(Dseq(2!6++4++3,99)*(4**(0..4))))))/9,1,1/6,2)}//#SuperCollider

very intense sounding tweet.

 

//--tweet0055

play{a=Pulse;CombN.ar(Slope.ar(a.ar(a.ar([1,2]/3,1/9,50,[50,150])),a.ar([3,4],1/3)+a.ar([2,3],1/4)/10+0.005).cos/5,1,1/6,2)}//#SuperCollider

an even more intense sounding tweet.

 

//--tweet0057

a=GVerb;fork{loop{z=play{#b,c,d,e,f,g,h,i=(1..50).scramble;a.ar(a.ar(a.ar(a.ar(Dust.ar(1),b,c),d,e),f,g),h,i)/20};6.wait;z.release(5)}}//#sc

this patch is heavy on the cpu. it consists of a synth with nested GVerbs all with random settings for roomsize and reverberation time. synths play for 6 seconds and then fades out over 5 seconds as another synth, with different reverb settings start. the result is overlapping sounds and quite dense texture.

 

//--tweet0059

a=LFTri;play{CombN.ar(SinOsc.ar(Saw.ar(3,128,128),Saw.ar([3,4],a.ar(a.kr(0.1,0,8,12),0,32,128)).sin)/4,1,1/6,a.kr(1/32)+1)}// #SuperCollider

a rhythmic tweet. gets a bit annoying after a while but there are some nice details in there.

 

//--tweet0061

a=Demand;b=SinOsc;play{b.ar(a.ar(t=Saw.ar([9,9.01]),0,Dseq(0!6++500,inf)),b.ar(a.ar(t,0,Dshuf((0..7)*99,inf)).lag(0.04)))/2}//#SuperCollider

phasing melody in left and right channels. every 7th note has a slightly different timbre (the 0!6++500 part) and every time one starts this tweet the melody changes (the Dshuf((0..7) part). the phasing is done with two Saw oscillators running at 9 and 9.01Hz. they are in turn used as triggers for the timbre and melody sequences (the two Demand ugens).

one reason why i love sc

140 characters (sc3.5 only)...

play{Splay.ar(SinOsc.ar(9,SinOsc.ar(midicps((Sweep.ar(0,(33..3))%128&(Sweep.ar(0,(3..9))%(LFSaw.ar(3)*9+99)))+33),0,pi)))/3}//#SuperCollider

if we run this line in supercollider we hear this...


and using Rohan Drape's great rd_dot quark and swap play{} with draw{} in the line above, this mess gets revealed...

so with a single line of code - short enough to fit in a twitter tweet - we've built this amazingly complex sound synthesis patch. i can not imagine a system with greater code-to-noise ratio than supercollider.

and this one is pretty fun to .draw as well...

play{f={|o,i|if(i>0,{SinOsc.ar([i,i+1e-4]**2*f.(o,i-1),f.(o,i-1)*1e-4,f.(o,i-1))},o)};f.(60,6)/60}//#SuperCollider


a heavily recursive patch that looks almost fractal. the pdf file generated from this line of code is 300kb! the number 6 in the code means recursion depth and 60 is the base frequency.

to run the rd_dot quark in supercollider on a mac you'll need Graphviz (i use 2.28 on my osx 10.6.8). you also need to make sure the resulting .dot files opens automatically in graphviz and not photoshop, word or something (get info on a .dot file in Finder and change all filetypes to open with graphiviz. you'll find the .dot files from rd_dot in your hidden /tmp directory)

AttachmentSize
PDF icon 637231982.pdf85.87 KB
PDF icon 1909609728.pdf300.44 KB

soft modem

this summer i build 8 small circuits that can control a bunch of leds (6 channels pwm) from basically any idevice or android phone. the circuit connects to the audio jack of the phone and uses the right channel to send data commands (in the form of a modem signal).

we use rjdj (and pdlib, supercollider, etc) to generate the data signal on the phone in realtime. and it's relatively easy to connect for example the built-in accelerometer in the phone to control some leds, or to run amplitude/pitch tracking on the microphone and let that flash some leds.

the circuits will be used in the rhyme research project as well as in the upcoming e-textile workshop in oslo (oct 2011).

the design is based on SoftModem by arms22. attached below are my schematics, pd fsk abstraction and arduino firmware.

the modem signal is generated using frequency-shift keying and here's how to do that in supercollider...

(
c= "how are you?";
{var t= 1/1225; var m= Duty.ar(Dseq([t*100]++t.dup(11*c.size)), 0, Dseq([1]++c.ascii.collect{|cc| [0]++(cc.asBinaryString.ascii-48).reverse++[1, 1]}.flat), 2); SinOsc.ar(m*(7350-4900)+4900)!2}.play(fadeTime:0);
)

this will send the characters "how are you?" at a baudrate of 1225. this is of course not a valid command for the circuit above, just something to demonstrate how it sounds. below is an mp3...


AttachmentSize
Package icon softModem.zip61.64 KB

droneSines

a very simple supercollider drone instrument i wrote for a friend. the gui is automatically generated from the node proxy using the .edit method. most of the code is defining specs (min, max curve, stepsize and default values) for all the parameters. the synthesis part is very simple - just an oscillator going through a reverb and the oscillator is frequency, phase and amplitude modulated by other oscillators.

(
//redFrik 2011
s.waitForBoot{
        Spec.add(\freq1, #[20, 10000, \exp, 0, 100]);
        Spec.add(\freq2, #[20, 10000, \exp, 0, 200]);
        Spec.add(\freq3, #[20, 10000, \exp, 0, 300]);
        Spec.add(\fmod1, #[0.001, 100, \exp, 0, 0.11]);
        Spec.add(\fmod2, #[0.001, 100, \exp, 0, 0.22]);
        Spec.add(\fmod3, #[0.001, 100, \exp, 0, 0.33]);
        Spec.add(\fmoda1, #[0, 100, \lin, 0, 1]);
        Spec.add(\fmoda2, #[0, 100, \lin, 0, 1]);
        Spec.add(\fmoda3, #[0, 100, \lin, 0, 1]);
        Spec.add(\pmod1, #[0.001, 100, \exp, 0, 0.1]);
        Spec.add(\pmod2, #[0.001, 100, \exp, 0, 0.2]);
        Spec.add(\pmod3, #[0.001, 100, \exp, 0, 0.3]);
        Spec.add(\amod1, #[0.001, 100, \exp, 0, 0.01]);
        Spec.add(\amod2, #[0.001, 100, \exp, 0, 0.02]);
        Spec.add(\amod3, #[0.001, 100, \exp, 0, 0.03]);
        Spec.add(\amoda1, #[0, 10, \lin, 0, 0.05]);
        Spec.add(\amoda2, #[0, 10, \lin, 0, 0.05]);
        Spec.add(\amoda3, #[0, 10, \lin, 0, 0.05]);
        Spec.add(\smod, #[0.001, 100, \exp, 0, 0.13]);
        Spec.add(\smoda, #[0, 100, \lin, 0, 5]);
        Spec.add(\smodm, #[0, 100, \lin, 0, 6]);
        Spec.add(\smodaa, #[0, 100, \lin, 0, 8]);
        Spec.add(\smodmm, #[0, 100, \lin, 0, 50]);
        Spec.add(\cmod, #[0.001, 100, \exp, 0, 1.2]);
        Spec.add(\cmoda, #[0, 10, \lin, 0, 0.6]);
        Spec.add(\room, #[0, 300, \lin, 1, 20]);
        Spec.add(\reverb, #[0, 30, \lin, 0, 5]);
        Spec.add(\damp, #[0, 1, \lin, 0, 1]);
        Spec.add(\input, #[0, 1, \lin, 0, 0.5]);
        Spec.add(\spread, #[0, 100, \lin, 0, 25]);
        Spec.add(\dry, #[0, 1, \lin, 0, 0]);
        Spec.add(\early, #[0, 1, \lin, 0, 1]);
        Spec.add(\tail, #[0, 1, \lin, 0, 1]);
        Ndef(\droneSines).play;
        Ndef(\droneSines, {|freq1= 100, freq2= 200, freq3= 300, fmod1= 0.11, fmod2= 0.22, fmod3= 0.33, fmoda1= 1, fmoda2= 1, fmoda3= 1, pmod1= 0.1, pmod2= 0.2, pmod3= 0.3, amod1= 0.01, amod2= 0.02, amod3= 0.03, amoda1= 0.05, amoda2= 0.05, amoda3= 0.05, smod= 0.13, smoda= 5, smodm= 6, smodaa= 8, smodmm= 50, cmod= 1.2, cmoda= 0.6, room= 20, reverb= 5, damp= 1, input= 0.5, spread= 25, dry= 0, early= 1, tail= 1, amp= 0.7|
                Limiter.ar(LeakDC.ar(GVerb.ar(Splay.ar(SinOsc.ar([freq1, freq2, freq3]+SinOsc.ar([fmod1, fmod2, fmod3], 0, [fmoda1, fmoda2, fmoda3]), SinOsc.ar([pmod1, pmod2, pmod3], 0, 2pi), SinOsc.ar([amod1, amod2, amod3], 0, [amoda1, amoda2, amoda3])), SinOsc.ar(SinOsc.ar(SinOsc.ar(smod, 0, smoda, smodm), 0, smodaa, smodmm), 0, 1, 1), amp, SinOsc.ar(cmod, 0, cmoda)), room, reverb, damp, input, spread, dry, early, tail)));
        });
        Ndef(\droneSines).edit;
        s.meter;
};
)
//Ndef(\droneSines).clear;
Ndef(\droneSines).stop;

//--save a preset
Ndef(\droneSines).nodeMap.writeArchive("pset1.txt")

//--recall a preset
Ndef(\droneSines).nodeMap= Object.readArchive("pset1.txt")

//--scramble settings
(
Ndef(\droneSines).set(\amp, 0.05);
Ndef(\droneSines).controlKeys.do{|k|
        if(k!=\amp, {
                Ndef(\droneSines).set(k, k.asSpec.map(1.0.rand));
        });};
)

pact - februari

another 30days of daily experiments. this time with cairo 2d and cinder + supercollider for sound. one very simple sketch per day to learn.

update 120212: i ported them all to processing. see _here
update 120617: rendered 1min mp3 excerpts. attached below under the code snippets.

 

//--pakt29
osx binary
c++ code
processing

Ndef(\wrap).play
(
Ndef(\wrap, {var n= 29; Splay.ar({|i|
        var w= i+LFSaw.ar(i+1*SinOsc.ar(0.1, i/n*2pi, 1, 0.1), 0, 2, 2);
        Saw.ar(340+LFSaw.ar(0.1, i/n, 10, 10).round(20)+i)%Saw.ar(60+w, SinOsc.ar(0.01, i/n*2pi, 2, 2.05))*0.25;
}!n)});
)
Ndef(\wrap).stop


 

//--pakt28
osx binary
c++ code
processing

Ndef(\round).play
(
Ndef(\round, {var n= 28; GVerb.ar(Limiter.ar(LeakDC.ar(Mix({|i|
        var z= SinOsc.ar(i.linexp(0, n-1, 70, 1500), LFSaw.ar(i+1*5, 0, 0.5pi), LFSaw.ar(0.2+SinOsc.ar(i+1*0.001, 0, 0.5), i/n, 0.4).max(0))*SinOsc.ar(200+i, 0, SinOsc.ar(0.03, i+1, 0.5, 1))*SinOsc.ar(400+i, 0, SinOsc.ar(0.04, i+2, 0.5, 1))*SinOsc.ar(800+i, 0, SinOsc.ar(0.05, i+3, 0.5, 1));
        Pan2.ar(z, i.linlin(0, n-1, -0.925, 0.925), 1/n);
}!n))), 3, 5, 0.2, 0.8, 20, 0.1)});
)
Ndef(\round).stop


 

//--pakt27
osx binary
c++ code
processing

Ndef(\sweep).play
(
Ndef(\sweep, {var n= 9; GVerb.ar(Mix({|i|
        var t= i/n;
        var t2pi= t*2pi;
        var f= 2**i*10+100;
        var z= LeakDC.ar(VarSaw.ar(SinOsc.ar(i+1*0.005, SinOsc.ar(i+1*SinOsc.ar(0.05, t2pi, 0.2, 0.4), 0, 2pi), f*SinOsc.ar(0.002, t2pi, 0.3, 0.5), f), t, SinOsc.ar(i+1*0.006, t2pi, 0.4, 0.5), i.linlin(0, n-1, 0.4, 0.1)));
        Pan2.ar(z, SinOsc.ar(0.015, t2pi, i.linlin(0, n-1, 0.99, 0.2)), 1/n);
}!n), 30, 5, 0.3, 0.8, 10)});
)
Ndef(\sweep).stop


 

//--pakt26
osx binary
c++ code
processing

Ndef(\grid).play
(
Ndef(\grid, {var n= 8; Mix({|i|
        var t= i/n;
        var z= LeakDC.ar(VarSaw.ar(SinOsc.ar(VarSaw.ar(i+1*VarSaw.ar(0.048, 0, 0.5, 25, 150), t, 1/3, 150), VarSaw.ar(100+i, t, VarSaw.ar(0.024, t, 0.25, 0.475, 0.5))*pi, VarSaw.ar(0.012, t, 0.75, VarSaw.ar(0.064, t, 0.5, 25, 50), 200), VarSaw.ar(0.16, t, 2/3, VarSaw.ar(0.02, t, 0.5, 7.5).abs, 300)), t));
        Pan2.ar(z, VarSaw.ar(0.02, t, 0.5), 1/n);
}!n)});
)
Ndef(\grid).stop


 

//--pakt25
osx binary
c++ code
processing

Ndef(\wobble).play
(
Ndef(\wobble, {var n= 5; Mix({|i|
        var z= SinOsc.ar(0, SinOsc.ar(60+(i*SinOsc.ar(0.004, 0, 0.8, 1)), i/n*2pi, SinOsc.ar(0, SinOsc.ar(1, 0, 2pi), SinOsc.ar(0.006), 2pi)), 1/n);
        Pan2.ar(z, z);
}!n)});
)
Ndef(\wobble).stop


 

//--pakt24
osx binary
c++ code
processing

Ndef(\swoop).play
(
Ndef(\swoop, {var n= 24; Mix({|i|
        var t= i/n;
        var f= SinOsc.ar(0.01, t*0.5pi).exprange(i*22+100, i*44+1000);
        var a= SinOsc.ar(0.05*t, t*2pi, 0.15).max(0);
        var z= RLPF.ar(GrayNoise.ar(a), f*(a+1), 1.4-a-t);
        Pan2.ar(z, LFTri.ar(0.05, t*4, 0.95));
}!n)});
)
Ndef(\swoop).stop


 

//--pakt23
osx binary
c++ code
processing

Ndef(\sway).play
(
Ndef(\sway, {var n= 23; LeakDC.ar(Splay.ar({|i|
        var t= i/n;
        var f= t.linexp(0, 1, LFTri.ar(0.04, t*4, 400, 600), LFTri.ar(0.03, t*4, 400, 600));
        var a= SinOsc.ar(SinOsc.ar(0.02, t*pi, 0.5), 0, 0.5).max(0);
        SinOsc.ar(f+SinOsc.ar(f, 0, f*a), LFTri.ar(SinOsc.ar(t+0.01, t, 20), t*4, 4pi), a)
       
}!n))});
)
Ndef(\sway).stop


 

//--pakt22
osx binary
c++ code
processing

Ndef(\blob).play
(
Ndef(\blob, {var n= 33; Mix({|i|
        var t= i/n*2pi;
        Pan2.ar(
                LeakDC.ar(SinOsc.ar(Pulse.ar(0.0625, 2/3).range(0.0625, 0.125), SinOsc.ar(Pulse.ar(i+1, Pulse.ar(i+1*0.125, 0.4, 1/3, 0.5), i+1*n, i+1*n*2), t, SinOsc.ar(SinOsc.ar(0.0625, t), t, 2pi)), SinOsc.ar(i+1*0.125, t, i.linexp(0, n-1, 3/n, 0.001)))),
                SinOsc.ar(0.125, t, i.linlin(0, n-1, 0, 0.95))
        )
}!n)});
)
Ndef(\blob).stop


 

//--pakt21
osx binary
c++ code
processing

Ndef(\flush).play
(
Ndef(\flush, {var a= {|i| 2.pow(i)}!7; Mix(
        Pan2.ar(
                Resonz.ar(SinOsc.ar(0, GrayNoise.ar(a*30*pi), 0.5), a*300, SinOsc.ar(a*0.13, 0, 0.4, 0.5)),
                SinOsc.ar(a*0.03, 0, 0.95)
        )
)});
)
Ndef(\flush).stop


 

//--pakt20
osx binary
c++ code
processing

Ndef(\veil).play
(
Ndef(\veil, {var n= 15; GVerb.ar(Mix({|i|
        var t= i/n*2pi;
        var f= SinOsc.ar(SinOsc.ar(i*0.015+0.015, t), t);
        var a= SinOsc.ar(f*SinOsc.ar(i*0.15+0.15, t, 0.15, 0.3), t, 150, 300);
        var b= SinOsc.ar(f*SinOsc.ar(i*0.15+0.15, t, 0.15, 0.5), t, 1500, 3000);
        Pan2.ar(
                BPF.ar(
                        Saw.ar(SinOsc.ar(f, t).exprange(a, b), SinOsc.ar(f, t, SinOsc.ar(0.015*t+0.15, t, 0.15).max(0))),
                        a+b*0.5,
                        0.15
                ),
                i/(n-1)*2-1
        );
}!n), 15, 1.5, 0.15)});
)
Ndef(\veil).stop


 

//--pakt19
osx binary
c++ code
processing

Ndef(\bubbles).play
(
Ndef(\bubbles, {var n= 6;
        GVerb.ar(Mix({|i|
                var q= i/n*2pi;
                var t= Impulse.ar(SinOsc.ar(SinOsc.ar(0.125, q, 0.5), 0, 1.5, 2), i/n);
                Pan2.ar(
                        SinOsc.ar(
                                SinOsc.ar(0.01, q, SinOsc.ar(0.05, q, 50), 500),
                                Decay2.ar(t, 0.02, 0.2, SinOsc.ar(0.05, q, SinOsc.ar(0.01, 0, 8pi, 8pi))),
                                Decay2.ar(t, TRand.ar(0.003, 0.03, t), TRand.ar(0.05, 0.1, t), SinOsc.ar(0.08, q, 0.2, 0.05).max(0))
                        ),
                        (i/(n-1))*2-1
                );
        }!n), 40, 2, 0.6);
});
)
Ndef(\bubbles).stop


 

//--pakt18
osx binary
c++ code
processing

Ndef(\grey).play
(
Ndef(\grey, {Mix({|i|
        var t= Impulse.ar(SinOsc.ar(0.1+(i*0.125), i/10*2pi+#[0, 0.1], 4, SinOsc.ar(0.01+(i*0.01), 0, 4, 12)));
        Pan2.ar(
                FreeVerb.ar(
                        BPF.ar(
                                GrayNoise.ar(
                                        Decay2.ar(
                                                t,
                                                TRand.ar(0.005, 0.015, t),
                                                TRand.ar(0.1, 0.15, t),
                                                TRand.ar(0.35, 0.5, t)
                                        )
                                ),
                                SinOsc.ar(i+1*0.032, #[0, 0.1]+i).exprange(i+1*300, i+1*600),
                                SinOsc.ar(i+1*0.025, #[0, 0.1]+i).range(0.1, 1)
                        ),
                        0.3
                ),
                SinOsc.ar(0.1, #[0, 0.1]+i, 0.9)
        );
}!10)});
)
Ndef(\grey).stop


 

//--pakt17
osx binary
c++ code
processing

Ndef(\shades).play
(
Ndef(\shades, {Mix({|i|
        var x= SinOsc.ar(0, SinOsc.ar(0.01*i+0.03, i, 2pi));
        var y= SelectX.ar(x.range(0, 4), [WhiteNoise.ar, GrayNoise.ar, PinkNoise.ar, BrownNoise.ar]);
        var z= Pan2.ar(y, x*0.4);
        BPF.ar(Rotate2.ar(z[0], z[1], i/3*2-1), i+1*500, SinOsc.kr(0, SinOsc.ar(i*0.02+0.01, i, pi)).range(1, 10), 0.3);
}!4)});
)
Ndef(\shades).stop


 

//--pakt16
osx binary
c++ code
processing

Ndef(\wheel).play
(
Ndef(\wheel, {Splay.ar(BPF.ar(PinkNoise.ar(1!3)*SinOsc.ar(VarSaw.ar(#[0.011, 0.012, 0.013], #[0, 0.1, 0.2], 0.5, VarSaw.ar(#[0.01, 0.02, 0.03], #[0, 0.1, 0.2]).exprange(5, 50), #[300, 303, 309]), CombN.ar(Saw.ar(#[3, 2.5, 1], 0.5pi).sum, 0.05, 0.05), 3), VarSaw.ar(#[0.021, 0.022, 0.023], #[0.2, 0.1, 0.3]).exprange(500, 2000), VarSaw.ar(#[0.031, 0.032, 0.033], #[0, 0.1, 0.2]).exprange(0.06, 0.6)))});
)
Ndef(\wheel).stop


 

//--pakt15
osx binary
c++ code
processing

Ndef(\spin).play
(
Ndef(\spin, {GVerb.ar(Mix(Pan2.ar(Formlet.ar(LPF.ar(Saw.ar((5..1)*LFPulse.ar(SinOsc.ar(0.1, 0, 0.5, 1), 0.5, 0.5, 10, 50)+SinOsc.ar((6..2)*0.05).exprange(0.05, 50), 0.3), 300)+Impulse.ar((0..4)+SinOsc.ar((4..8)*0.02).exprange(0.3, 300)), (1..5)*SinOsc.ar((5..9)*0.05).exprange(200, 2000)*SinOsc.ar(SinOsc.ar((2..6)*0.1, 0, 0.1), 0, 0.1, 1), 0.001, 0.0015), SinOsc.ar(SinOsc.ar((3..7)*0.1, 0, 0.1)))))});
)
Ndef(\spin).stop


 

//--pakt14
osx binary
c++ code
processing

Ndef(\interfere).play
(
Ndef(\interfere, {var a= #[3, 1, 5, 2]; Limiter.ar(Splay.ar(Formlet.ar(LFPulse.ar(a*100+SinOsc.ar(a, 0, a/20), 0, SinOsc.ar(a/10, 0, 0.45, 0.5), LFPulse.ar(a+a, 0, SinOsc.ar(a/10, 0, 0.45, 0.5), 0.1)), a*100+LFPulse.ar(a/2, 0, 0.5, a*SinOsc.ar(a/100, 0, 150, 200)), SinOsc.ar(a/30, 0, 0.01, 0.0125), SinOsc.ar(a/60, 0, 0.05, 0.055), 0.2)))});
)
Ndef(\interfere).stop


 

//--pakt13
osx binary
c++ code
processing

Ndef(\pulse).play
(
Ndef(\pulse, {GVerb.ar(Splay.ar(Resonz.ar(LFPulse.ar(#[121, 232, 343]), LFPulse.ar(#[0.121, 0.232, 0.343]).exprange(LFPulse.ar(#[12.1, 23.2, 34.3]).range(80, 100), LFPulse.ar(#[1.21, 2.32, 3.43].reverse).range(800, 1000)).sum*LFPulse.ar(#[0.121, 0.232, 0.343]).range(0.5, 1), 0.3, 0.15)), 34, 3, 0.2)});
)
Ndef(\pulse).stop


 

//--pakt12
osx binary
c++ code
processing

Ndef(\waves).play
(
Ndef(\waves, {var n= 3; Mix({|i|
        var z= VarSaw.ar(i+1*0.01, 0, 0.5, 5, VarSaw.ar(i+1*10, 0, 0.5, 0.5, 10));
        var w= VarSaw.ar(i+1*VarSaw.ar(i+1*0.001, 0, 0.5, z, z*z), 0, 0.5, 0.5, 0.5);
        Pan2.ar(
                SinOsc.ar(0, VarSaw.ar(i+1*w*100, 0, w, 2pi), VarSaw.ar(i+1*w*0.1, 0, w, 0.5)),
                i.linlin(0, n-1, -0.9, 0.9),
                2/n
        )
}!n)});
)
Ndef(\waves).stop


 

//--pakt11
osx binary
c++ code
processing

Ndef(\hail).play
(
Ndef(\hail, {Splay.ar(Ringz.ar(SinOsc.ar(#[0.000101, 0.000202, 0.000303, 0.000404, 0.000505, 0.000606], SinOsc.ar(#[101, 202, 303, 404, 505, 606], 0, SinOsc.ar(#[0.0101, 0.0202, 0.0303, 0.0404, 0.0505, 0.0606], 0, pi)))*VarSaw.ar(#[1.01, 2.02, 3.03, 4.04, 5.05, 6.06], #[0.101, 0.202, 0.303, 0.404, 0.505, 0.606], SinOsc.ar(#[0.00101, 0.00202, 0.00303, 0.00404, 0.00505, 0.00606], 0, 0.5, 0.5)), #[1010, 2020, 3030, 4040, 5050, 6060], SinOsc.ar(#[10.1, 20.2, 30.3, 40.4, 50.5, 60.6], 0, 0.1, 0.2), 0.2))});
)
Ndef(\hail).stop


 

//--pakt10
osx binary
c++ code
processing

Ndef(\rain).play
(
Ndef(\rain, {
        var n= 30;
        Mix({|i|
                var z= SinOsc.ar(i+1*0.01, 0, 0.001);
                var f= i*100+100+SinOsc.ar(0.0123+z, i/n*2pi).exprange(1, 30);
                var q= SinOsc.ar(0.0234+z, i/n*2pi, 0.3, 0.7);
                var p= SinOsc.ar(0.0345+z, i/n*2pi);
                var a= SinOsc.ar(0.0456+z, i/n*2pi, 0.4, 0.45);
                var x= HPF.ar(BPF.ar(HPF.ar(ClipNoise.ar(2)*Crackle.ar(SinOsc.ar(0.0123+z, i/n*2pi, 0.1, 1.8))), f, q));
                Pan2.ar(x, p, a);
        }.dup(n));
});
)
Ndef(\rain).stop


 

//--pakt09
osx binary
c++ code
processing

Ndef(\snow).play
(
Ndef(\snow, {
        Mix({|i|
                var m= SinOsc.ar(0.005, i/5*2pi, 2pi);
                var p= WhiteNoise.ar(SinOsc.ar(i*5000+5000)*SinOsc.ar(i*500+500)*SinOsc.ar(i*50+50)*SinOsc.ar(i*5+5));
                Pan2.ar(SinOsc.ar(p, p*m, p), p, 0.5);
        }.dup(5));
});
)
Ndef(\snow).stop


 

//--pakt08
osx binary
c++ code
processing

Ndef(\redqueen3).play
(
Ndef(\redqueen3, {GVerb.ar(LeakDC.ar(
        Saw.ar(
                Saw.ar([100, 101]+Saw.ar([102, 103], Saw.ar([4, 5], Saw.ar([1, 2], 6, 7).sum).sum).sum).exprange(Saw.ar(1/12, 4, 50), Saw.ar(1/8, 3, Saw.ar(1/16, 4, 65))),
                Saw.ar([21, 20], Saw.ar([40, 41], 0, 0.1), 0.2)
        )), 60, 4, 0.5, 0.5, 5, 0.5, 0.5, 0.75)});
)
Ndef(\redqueen3).stop


 

//--pakt07
osx binary
c++ code
processing

Ndef(\redqueen2).play
(
Ndef(\redqueen2, {GVerb.ar(LeakDC.ar(
        SinOsc.ar(
                SinOsc.ar(
                        SinOsc.ar(
                                SinOsc.ar(
                                        SinOsc.ar(
                                                SinOsc.ar(
                                                        SinOsc.ar(
                                                                1,
                                                                0,
                                                                2,
                                                                SinOsc.ar(1/2).exprange(1, 2)
                                                        ),
                                                        0,
                                                        8,
                                                        SinOsc.ar(1/4).exprange(4, 8)
                                                ),
                                                0,
                                                32,
                                                SinOsc.ar(1/8).exprange(16, 32)
                                        ),
                                        0,
                                        128,
                                        SinOsc.ar(1/16).exprange(64, 128)
                                ),
                                0,
                                512,
                                SinOsc.ar(1/32).exprange(256, 512)
                        ),
                        0,
                        2048,
                        SinOsc.ar(1/64).exprange(1024, 2048)
                ), 0, 0.1)
        ), 16, 8, 0.75, 0.5)});
)
Ndef(\redqueen2).stop


 

//--pakt06
osx binary
c++ code
processing

Ndef(\redqueen).play
(
Ndef(\redqueen, {GVerb.ar(LeakDC.ar(SinOsc.ar(SinOsc.ar([1/16, 1/12], 0, 5), SinOsc.ar(0, SinOsc.ar([SinOsc.ar(3, 0, 5, 12), SinOsc.ar(4, 0, 4, 16)], SinOsc.ar([SinOsc.ar(1/64, SinOsc.ar(0.5, 0, pi)).exprange(1, 30), SinOsc.ar(1/48, SinOsc.ar(0.75, 0, pi)).exprange(1, 30)], SinOsc.ar(SinOsc.ar(1/32, 0, 4), 0, 2pi), SinOsc.ar([1/6, 1/8], 0, 0.5pi, 2pi)), SinOsc.ar([1/3, 2/3], 0, 0.5pi, SinOsc.ar(1/8, 0, 0.5pi, 2pi))), SinOsc.ar([4/3, 3/4], 0, 0.5pi, SinOsc.ar([SinOsc.ar(1/256).exprange(80, 800), SinOsc.ar(1/256).exprange(80.8, 808)], 0, 0.5pi, 2pi)))))*0.05, 10, 3, 0.5, 0.5)});
)
Ndef(\redqueen).stop


 

//--pakt05
osx binary
c++ code
processing

Ndef(\noises).play
(
Ndef(\noises, {
        var freq= SinOsc.ar(SinOsc.ar((4..0)/150+SinOsc.ar((0..4)/18, 0, 0.8)), SinOsc.ar((0..4)/80+SinOsc.ar((0..4)/20, 0, 0.1), 0, 2pi)).exprange(100, 1000);
        var rq= SinOsc.ar(SinOsc.ar((0..4)/6+SinOsc.ar((0..4)/19, 0, 0.7), SinOsc.ar((4..0)/5+SinOsc.ar((4..0)/2, 0, 0.1), 0, 2pi))).exprange(0.4, 4);
        Splay.ar(BPF.ar(BPF.ar(ClipNoise.ar(1!5), freq, rq), freq, rq), 0.85);
});
)
Ndef(\noises).stop


 

//--pakt04
osx binary
c++ code
processing

Ndef(\lines).play
(
Ndef(\lines, {Splay.ar(LeakDC.ar(SinOsc.ar([0.033, 0.066, 0.055, 0.044], SinOsc.ar([0.12, 0.13, 0.11, 0.14]*SinOsc.ar([0.151, 0.152, 0.153, 0.154], SinOsc.ar([5, 4, 3, 2], 0, 2pi), SinOsc.ar([0.043, 0.053, 0.063, 0.073], 0, [80, 60, 40, 100])), SinOsc.ar(([60, 64, 67, 71]+SinOsc.ar([0.024, 0.025, 0.026, 0.027], SinOsc.ar([0.01, 0.02, 0.03, 0.04], 0, pi), 1).round).midicps, 0, 2pi)), 0.2)))})
)
Ndef(\lines).stop


 

//--pakt03
osx binary
c++ code
processing

Ndef(\varsaws).play
(
Ndef(\varsaws, {GVerb.ar(CombC.ar(VarSaw.ar(SinOsc.ar([0.1, 0.11], 0, 5, 100+SinOsc.ar([0.05, 0.055], 0, 50, 50).round(50)), 0, SinOsc.ar([0.2, 0.22], 0, 0.5, SinOsc.ar([0.3, 0.33], 0, 0.1, 0.5)), 0.1), 1.01, SinOsc.ar([0.4, 0.44], 0, 0.01, 1), 8), 80, 5, 0.9)})
)
Ndef(\varsaws).stop


 

//--pakt02
osx binary
c++ code
processing

Ndef(\saws).play
(
Ndef(\saws, {Splay.ar(BPF.ar(LeakDC.ar(Saw.ar(SinOsc.ar((0..5)+1*0.02, SinOsc.ar((0..5)+1*101+300, 0, 2pi+SinOsc.ar(0.01, 0, 0.5*pi)), 400, 700))), SinOsc.ar((0..5)+1*0.004, 0, 100, 400), SinOsc.ar((0..5)+1*0.006, 0, 0.4, 0.8)))})
)
Ndef(\saws).stop


 

//--pakt01
osx binary
c++ code
processing

Ndef(\moreSines).play
(
Ndef(\moreSines, {LeakDC.ar(Splay.ar(SinOsc.ar((0..20)/70+0.01, SinOsc.ar((0..20)+1*50+50+SinOsc.ar((0..20)+1/30), 0, 2pi), SinOsc.ar((0..20)+1/80, (0..20)/40, 0.2).max(0))))})
)
Ndef(\moreSines).stop


 

//--pakt00
osx binary
c++ code
processing

Ndef(\sines).play
(
Ndef(\sines, {GVerb.ar(Splay.ar(SinOsc.ar([100, 200, 300]+SinOsc.ar([0.11, 0.22, 0.33]), SinOsc.ar([0.1, 0.2, 0.3], 0, 2pi), 0.1+SinOsc.ar([0.01, 0.02, 0.03], 0, 0.05)), SinOsc.ar(SinOsc.ar(SinOsc.ar(0.13, 0, 5, 6), 0, 8, 50), 0, 1, 1), 0.7, SinOsc.ar(1.2, 0, 0.6)), 20, 5, 1, 0.5, 25, 0, 1, 1)})
)
Ndef(\sines).stop


Pages

Subscribe to RSS - supercollider