Friday, June 23, 2006

Creative Computing (Major)

I pose the question:
What's better, SuperCollider, or spending the last 3 hours of your life in a Gas chamber waiting until your lungs turn to water?
Well that's a difficult question. They're both equally as good in my opinion.

I present to you, my SuperCollider,

"Piece of Shit"

The idea for this piece was to create a sequence of audio textures using SynthDef’s for instruments, and Pbind patterns for sequencing. I chose to use rough white-noise-like sound textures because of their soothing nature. – (Soothing, bah, like they could sooth the pain of SuperCollider)

Here is a summary of the sound based Ugen’s for each SynthDef.

Gendy:

- Gendy1.ar

PingPong:

- Blip.ar
- SinOsc.ar
- PingPong.ar

Gray:

- GrayNoise.ar
- Resonz.ar
















This is the best score I could whip up with the crappy graphics program on the G5's. I remember a while ago asking Christian whether the open-source "GIMP" could be installed on the G5's, but I forgot what his response was. I must ask him again at some point.

Enjoy! – (if that is at all possible)

6 ‘ 09


// Tech Major Semester 1 , "Piece of Shit"
(
// Gendy
SynthDef("Gendy",
{
// Arguments
arg ampdist = 1.0,
durdist = 1.0,
adparam = 1.0,
ddparam = 1.0,
minfreq = 20,
maxfreq = 200,
ampscale = 1.0,
durscale = 1.0,
initCPs = 12,
knum = 10,
amp = 1.0,
mul = 0.9,
pan = 0.8,
envdur = 1
;

// Variables
var out,
gendy,
env
;

// Envelope
env = EnvGen.kr(
envelope: Env([0, 0.9, 0.8, 0.7, 0], [2, 3, 2, 4] * envdur,'sine'),
doneAction: 2,
timeScale: 1.0 + 6.0.rand,
levelScale: 0.3
);

// Ugens
gendy = Pan2.ar( // Need to add a filter here
in: Gendy1.ar(
ampdist: ampdist, // 0.0001 to 1
durdist: durdist, // 0.0001 to 1
adparam: adparam, // 0.0001 to 1
ddparam: ddparam, // 0.0001 to 1
minfreq: minfreq,
maxfreq: maxfreq,
ampscale: ampscale, // 0.0 to 1
durscale: durscale, // 0.0 to 1
initCPs: initCPs,
knum: knum,
mul: mul
),
pos: pan,
level: amp
);

gendy = gendy * env;

// Output

out = Out.ar(
bus: 0,
channelsArray: gendy
);
}).store;

// PingPong
SynthDef("PP",
{

// Arguments
arg out = [0,1],
amp, // AMPLITUDE
pan,
freq, // FREQUENCY
har = 4, // NUMBER OF HARMONICS
delaytime = 0.5,
feedback = 0.2
;

// Variables

var left,
right,
pingpong
;

// Left
left = Blip.ar(
freq,
har,
amp
);

left = left * EnvGen.kr(
envelope: Env([0, 0.9, 0.8, 0.7, 0], [0.2, 0.5, 0.5, 0.2],'sine'),
doneAction: 2,
timeScale: 1.0,
levelScale: 0.3
);

// Right
right = SinOsc.ar(
freq: freq * 1.05,
mul: amp
);

right = right * EnvGen.kr(
envelope: Env([0, 0.9, 0.8, 0.7, 0], [0.4, 1, 1, 0.4],'sine'),
doneAction: 2,
timeScale: 1.0,
levelScale: 0.3
);

// PingPong

pingpong = PingPong.ar(
b.bufnum,
[left, right],
delaytime,
feedback,
1
);

// Allocate Buffer // mmm, samples. I would have liked to incorporate some real samples into this
b = Buffer.alloc(
server: s,
numFrames: s.sampleRate*8.0,
numChannels: 2
);

// Output
Out.ar(
bus: out,
channelsArray: pingpong
)
}).store;

// Gray
SynthDef("Gray",
{

// Arguments
arg out = [0,1], // Output
amp,
pan,
freq
;

// Variables
var noise,
rezonator
;

// Noise
noise = GrayNoise.ar(1.0)
;

// Rezonator
rezonator = Pan2.ar(
in: Resonz.ar(noise, freq, 0.5),
pos: pan,
level: 0.3
);

// Envelope
rezonator = rezonator *
EnvGen.kr(
envelope: Env([0, 0.9, 0.8, 0.7, 0], [1.0, 0.2, 0.2, 0.4],'sine'),
doneAction: 2,
timeScale: 1.0 + 6.0.rand,
levelScale: 0.3
)
;

// Output
Out.ar(
bus: out,
channelsArray: rezonator
)
}
).store;
)

// Sequencer (I'm sure there would be a more effective way of doing this)
// Not sure about creating extra instances of an instrument...
(
// 0:00
h = Pbind(
\instrument, "PP",
\freq, Prand([100, 202, 500, 900, 1500], 220),
\dur, Pseq([ Pgeom(0.05, 1.1, 16), Pgeom(0.5, 0.909, 16)], 220),
\pan, Pfunc({rrand(-0.3, 0.8)}),
\har, 1,
\legato, 0.1,
\amp, 0.1
);

// 0:45
c = Pbind(
\instrument, "Gray",
\dur, 6,
\freq, Prand([Pfunc({rrand(200, 2000)}), Pfunc({rrand(5000, 8000)})], 3),
\pan, Pfunc({rrand(-0.8, 0.8)}, 6),
\amp, Pfunc({rrand(0.1, 0.2)}, 6)
);

// 1:30
d = Pbind(
\instrument, "Gendy",
\ampdist, 1.0,
\durdist, 1.0,
\adparam, 1.0,
\ddparam, 1.0,
\minfreq, 30,
\maxfreq, 80,
\ampscale, 0.3,
\durscale, 0.4,
\initCPs, 6,
\knum, 50,
\amp, 0.3,
\mul, 0.1,
\pan, Pfunc({rrand(-0.5, 0.5)}, 20)
);

// 2:20
e = Pbind(
\instrument, "Gendy",
\ampdist, 1.0,
\durdist, 1.0,
\adparam, 1.0,
\ddparam, 1.0,
\minfreq, 100,
\maxfreq, 200,
\ampscale, 0.3,
\durscale, 0.4,
\initCPs, 50,
\knum, 50,
\amp, 0.2,
\mul, 0.1,
\pan, Pfunc({rrand(-0.5, 0.5)}, 10)
);

// 3:20
f = Pbind(
\instrument, "PP",
\freq, Prand([20, 80, 500, 2000], 500),
\dur, Pseq([ Pgeom(0.05, 1.1, 24), Pgeom(0.5, 0.909, 24)], 500),
\pan, Pfunc({rrand(-0.3, 0.8)}),
\har, 4,
\legato, 0.1,
\amp, 0.1
);

// 4:20
g = Pbind(
\instrument, "Gendy",
\ampdist, 1.0,
\durdist, 1.0,
\adparam, 1.0,
\ddparam, 1.0,
\minfreq, Pxrand([800, 950, 850, 750], 1.5),
\maxfreq, Pxrand([1000, 1100, 950, 1150], 1.5),
\ampscale, 1.0,
\durscale, 1.0,
\initCPs, 12,
\knum, 10,
\amp, 0.4,
\mul, 0.1,
\pan, Pfunc({rrand(-0.5, 0.5)}, 3)
);

// 5:00
i = Pbind(
\instrument, "Gendy",
\ampdist, 1.0,
\durdist, 1.0,
\adparam, 1.0,
\ddparam, 1.0,
\minfreq, Pxrand([30, 40, 50, 60], 2),
\maxfreq, Pxrand([70, 80, 90, 120], 2),
\ampscale, 1.0,
\durscale, 1.0,
\initCPs, 12,
\knum, 50,
\amp, 0.4,
\mul, 0.1,
\pan, Pfunc({rrand(-0.5, 0.5)}, 2)
);

// FADE OUT...

// TIMELINE

Ptpar(
list: [00.00, h, // Patterns and place on timeline
45.00, c, // Hmm, how could I more effectively manipulate the
90.00, d, // streams with say (x).mute, instead of just chaning the number of repeats
140.00, e,
200.00, f,
260.00, g,
300.00, i],
repeats: 1 // Number of Repeats
).play;
)

0 Comments:

Post a Comment

<< Home