Voices

posted by on 2013.02.17, under Supercollider
17:

Here’s a little code inspired by a yoga session. During the meditation part, it is customary to sing some words which have the effect of a long note (a variation of the popular “oooom”, so to say): the different voices are not in phase, though, and at each iteration not all the partecipants sing. Neverthless, you have a nice harmonizing effect, sort of a long drone.
The code below explores this very simple idea: I have also added some very slight inharmonicity to the VarSaws. This makes for an almost unnoticeable beating effect, which I think suits well.
You may notice that I’m using Ndef and Tdef: I always like to use the JitLib extension when experimenting in Supercollider, since it makes the process much more flexible and fun.

s.boot;

SynthDef(\voice,{arg out=0,n=0,p=0,d=10,r=10;
var sig=Array.fill(3,{|i| VarSaw.ar(n.midicps*(i+1.0001),mul:0.05/(i+1))}).sum;
var sig2=Ringz.ar(WhiteNoise.ar(0.0003),TRand.ar(n.midicps,(n+1).midicps,Impulse.ar(10)));
var env=EnvGen.kr(Env.linen(d,1,r),gate:1,doneAction:2);
Out.ar(out,Pan2.ar((sig+sig2)*env*(0.8+SinOsc.kr(0.1,0,0.2)),p));
}).add;

Ndef(\rev,{
Out.ar(0,Limiter.ar(FreeVerb.ar(LPF.ar(In.ar([0,1]),10000),mix:0.33),0.7));
};
);

Tdef(\voices,{
inf.do{
10.do{
if ((0.8).coin,{
Synth(\voice,[\n:[24,28,29,48,36,40,41,52,53,60,64,65].choose,\p:{rrand(-0.5,0.5)},\d:{rrand(5,13)},\r:{rrand(8,14)}]);
});
rrand(0.1,1).wait;
};
18.wait;
};
});

Tdef(\voices).play;
Tdef(\voices).stop;

s.quit;

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

pagetop