Glitch Aesthetics and digital music

posted by on 2013.03.29, under Supercollider
29:

Here’s a little Supercollider code which tries to emulate the sonorities of artists like Alva Noto, Ryoji Ikeda, etc., with their blend of broken sine waves and percussive tones.

s.boot;

(
SynthDef(\main,{arg out=0, f=50,t_trig=0,p=0,i=0,d=10,l=0.1,a=0.5,n=1;
  var fmod=SinOsc.ar(f/60,0,f/60);
  var sig=[SinOsc.ar([f,f+600]+fmod,0,[d,0.005]).mean.tanh,HPF.ar(WhiteNoise.ar(1),8000),SinOsc.ar(30,0,1),VarSaw.ar(f/40,mul:d*10000)];
  var env=EnvGen.ar(Env([0.0,1.0,0.0],[0.0,l]),gate:t_trig);
  Out.ar(out,Pan2.ar(((Select.ar(i,sig)*env).fold(-1,1)*0.7+SinOsc.ar(40,0,0.3))*(1+HPF.ar(WhiteNoise.ar(0.02*n),8000)),p)*a);
}).add;
SynthDef(\hat,{arg out=0, f=50,t_trig=0,p=0,a=1;
  var sig=HPF.ar(WhiteNoise.ar(1),6000);
  var env=EnvGen.ar(Env([0.0,1.0,0.0],[0.0,0.01]),gate:t_trig);
  Out.ar(out,Pan2.ar((sig*env*a),p));
}).add;

y=Pmono(\main,\dur,Pxrand((1/8!8)++(1/4!8)++Pseq([1/16,1/16],Prand([1,2],1)),inf),\trig,1,\p,{rrand(-1,1)},\i,Pwrand([0,1,3,4],[0.946,0.03,0.02,0.004],inf),\d,Pwrand([1,30],[0.98,0.02],inf),\f,Pwrand([35,40,6000,20000],[0.30,0.65,0.03,0.02],inf),\l,{rrand(0.1,0.5)},\n,{[1,2,3,30].wchoose([0.8,0.1,0.05,0.05])});
z=Pmono(\hat,\dur,Pxrand((1/8!8)++(1/4!8)++Pseq([1/32,1/32,1/32,1/32],Prand([1,2],1)),inf),\trig,1,\p,{rrand(-1,1)},\a,0.1);

w=Ppar([y,z],inf).play;

)

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.

The main idea is to produce the percussive elements by a discontinuous volume envelope, so the “clicks” you hear are just the sine waves having a discontinuity. For this reason also I’ve preferred to use a Pmono, rather than a Pbind as the main rythmical sequencer. Also, via the Select UGen, one can obtain abrupt changes in the sound wave, producing again clicks and quirky noises.
The idea of the rythmic part comes from some post on the Supercollider Mailing List (can’t recall which one right now) using duty UGens, though.
Of course, to get what Noto and Ikeda do, it takes a long route: it’s when techniques end, and art begins. :)
I highly suggest these, if you are curious about this type of stuff


pagetop