0% found this document useful (0 votes)
74 views3 pages

SuperCollider Audio Synthesis Script

This document defines SynthDefs and patterns for playing samples, beeps, and drones in SuperCollider. It initializes a reverb bus, creates Synth and Group nodes, and schedules events to play the patterns with timing and effects processing. It also demonstrates adding and removing functions from the ServerTree.

Uploaded by

Leandro Yako
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views3 pages

SuperCollider Audio Synthesis Script

This document defines SynthDefs and patterns for playing samples, beeps, and drones in SuperCollider. It initializes a reverb bus, creates Synth and Group nodes, and schedules events to play the patterns with timing and effects processing. It also demonstrates adding and removing functions from the ServerTree.

Uploaded by

Leandro Yako
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

(

~count = 0;

[Link];

[Link];
~reverbBus = [Link](s, 2);

~makeNodes = {
[Link]({
~fxGroup = [Link];
~reverb = Synth(\reverb, [\in, ~reverbBus], ~fxGroup);
});
};

~events = [
{~sampPlayer = ~[Link](quant:1)},
{~beepPlayer = ~[Link](quant:1)},
{~dronesPlayer = ~[Link]},
{
~[Link];
~[Link];
},
{~[Link]}
];

[Link]({

[Link];
[Link];

[Link];

[Link](\beep, {
var sig, env;
sig = [Link](\[Link](1000));
env = Env(
[0,1,1,0],
[\[Link](0), \[Link](0.03), \[Link](0)],
[\[Link](2),0,\[Link](-2)]
).ar(2);
sig = sig * env;
sig = [Link](sig, \[Link](0), \[Link](0.3));
[Link](\[Link](0), sig);
[Link](\[Link](0), sig * \[Link](-30).dbamp);
}).add;

SynthDef(\samp, {
var sig, env;
sig = [Link](1, \[Link](0), [Link](\[Link](0)) *
\[Link](1), 1, \[Link](0));
env = Env(
[0,1,1,0],
[\[Link](0), \[Link](0.1), \[Link](0)],
\lin
).ar(2);
sig = sig * env;
sig = [Link](sig, \[Link](0), \[Link](0.3));
[Link](\[Link](0), sig);
[Link](\[Link](0), sig * \[Link](-30).dbamp);
}).add;

SynthDef(\reverb, {
var sig, wet;
sig = [Link](\[Link](0), 2);
sig = [Link](sig[0], sig[1], mix:1, room:0.99, damp:0.99);
sig = [Link](sig, 900);
[Link](\[Link](0), sig);
}).add;

[Link];

~bufPath = [Link]([Link]).parentPath ++
"calibration_tone/";

b = [Link](~bufPath).[Link]({
arg pathname;
[Link](s, [Link]);
});

[Link];

[Link](~makeNodes);
[Link];

[Link];

~sampPat = Pbind(
\instrument, \samp,
\dur, 1/8,
\type, Pwrand([\note, \rest], [0.6, 0.4], inf),
\buf, Prand(b, inf),
\rate, Pwhite(-12, 12, inf).midiratio,
\amp, Pexprand(0.02, 0.5, inf),
\atk, 0,
\sus, 0,
\rel, Pexprand(0.02, 0.5, inf),
\out, 0,
\outfx, ~reverbBus,
\send, Pwhite(-40, -10, inf),
);

~beepPat = Pbind(
\instrument, \beep,
\dur, 2,
\atk, 0,
\sus, 0.02,
\rel, 0.02,
\freq, 1000,
\amp, Pexprand(0.02, 0.2, inf),
\pan, Pseq([-1, 0, 1, 0],inf),
\out, 0,
\outfx, ~reverbBus,
\send, -10,
);

~dronesPat = Pbind(
\instrument, \beep,
\dur, 5,
\atk, 4,
\sus, 0,
\rel, 4,
\freq, Pexprand(150,300,inf) * Pfuncn({[Link](16, -1.0,
1.0).midiratio}, inf),
\amp, 0.02,
\out, 0,
\outfx, ~reverbBus,
\send, -10,
);

});
)

(
~events[~count].value;
~count = ~count + 1;
//if(~count >= ~[Link], {~count = 0});
//~count;
)

//////////////////////////////
//demonstration of ServerTree;

~fn = {"***rebuilt***".postln};

[Link](~fn);

[Link];

[Link](~fn);
[Link];

You might also like