huge chaos dec 2020
parent
c520d49c9e
commit
6353c35d8d
|
@ -0,0 +1,289 @@
|
||||||
|
// =====================================================================
|
||||||
|
// SuperCollider Workspace
|
||||||
|
// =====================================================================
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef("kick1", {arg out = 0, amp = 0.3, sinFreq = 60, glissf = 0.9, att = 0.01, rel = 0.45, pan = 0;
|
||||||
|
var gliss = XLine.kr(sinFreq, sinFreq*glissf, rel);
|
||||||
|
var snd = SinOsc.ar(gliss);
|
||||||
|
var env = Env.perc(att, rel).kr(doneAction: 2);
|
||||||
|
snd = snd * env * amp;
|
||||||
|
Out.ar(out, Pan2.ar(snd, pan));
|
||||||
|
},
|
||||||
|
metadata: (
|
||||||
|
credit: "Bruno Tucunduva Ruviaro",
|
||||||
|
category: \drums,
|
||||||
|
tags: [\percussion, \kick]
|
||||||
|
)
|
||||||
|
).add;
|
||||||
|
|
||||||
|
/* Recieved from
|
||||||
|
https://github.com/supercollider-quarks/SynthDefPool/blob/master/pool/kick_chrp.scd
|
||||||
|
A kick made using what radio folks would call a "chirp"
|
||||||
|
Modified by Bruno Ruviaro and Josh Mitchell 8/19.
|
||||||
|
*/
|
||||||
|
|
||||||
|
SynthDef(\kick_chirp, {
|
||||||
|
|
||||||
|
arg out = 0, amp = 0.1, pan = 0, curve = -20, att = 0.001, rel = 0.5, maxFreq = 500;
|
||||||
|
|
||||||
|
var env, snd;
|
||||||
|
|
||||||
|
env = Env.perc(attackTime: att, releaseTime: rel, curve: curve).exprange(0, maxFreq).kr(doneAction: 2);
|
||||||
|
|
||||||
|
snd = SinOsc.ar(freq: env, mul: amp);
|
||||||
|
snd = LeakDC.ar(snd);
|
||||||
|
|
||||||
|
Out.ar(out, Pan2.ar(snd, pan))
|
||||||
|
},
|
||||||
|
metadata: (
|
||||||
|
credit: "Original by dan stowell. public domain",
|
||||||
|
category: \drums,
|
||||||
|
tags: [\kick, \drum, \percussion, \chirp]
|
||||||
|
)
|
||||||
|
).add;
|
||||||
|
|
||||||
|
SynthDef("hihat1", {arg out = 0, amp = 0.5, att = 0.01, rel = 0.2, ffreq = 6000, pan = 0;
|
||||||
|
var snd = WhiteNoise.ar(amp);
|
||||||
|
var env = Env.perc(att, rel).kr(doneAction: 2);
|
||||||
|
snd = HPF.ar(snd * env, ffreq);
|
||||||
|
Out.ar(out, Pan2.ar(snd, pan));
|
||||||
|
},
|
||||||
|
metadata: (
|
||||||
|
credit: "Bruno Tucunduva Ruviaro",
|
||||||
|
category: \drums,
|
||||||
|
tags: [\percussion, \hihat]
|
||||||
|
)
|
||||||
|
).add;
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
TempoClock.default.tempo = 90/60;
|
||||||
|
Ndef(\kick).play
|
||||||
|
Ndef(\kick).stop
|
||||||
|
Ndef(\kick).proxyspace.quant = 8;
|
||||||
|
Ndef(\kick).proxyspace.tempo = 90;
|
||||||
|
Ndef(\kick).fadeTime = 0.001;
|
||||||
|
|
||||||
|
(
|
||||||
|
|
||||||
|
Ndef(\kick,
|
||||||
|
|
||||||
|
Ppar([
|
||||||
|
Pbind( \instrument, \kick1,
|
||||||
|
//\dur, Pseq([1.5,1,1.5], inf),
|
||||||
|
\dur, Pseq([0.75,0.75, 0.5], inf),
|
||||||
|
\rel, 1,
|
||||||
|
\glissf, 0.6,
|
||||||
|
\amp, 0.8
|
||||||
|
),
|
||||||
|
Pbind( \instrument, \kick_chirp,
|
||||||
|
\dur, Pseq([0.75, 1, 0.75, 0.25],inf),
|
||||||
|
\dur, Prand([
|
||||||
|
Pseq([0.75, 0.5, 0.75]),
|
||||||
|
Pseq([0.75, 0.75, 0.5]),
|
||||||
|
Pseq([0.75, 0.75, 0.25,0.25]),
|
||||||
|
Pseq([0.75, 0.25,0.25, 0.75]),
|
||||||
|
Pseq([0.75, 0.25,0.75, 0.25]),
|
||||||
|
Pseq([0.75, 0.25, 0.5, 0.5]),
|
||||||
|
//Pseq([0.25],8),
|
||||||
|
//Pseq([0.5],4),
|
||||||
|
Pseq([1],2),
|
||||||
|
], inf),
|
||||||
|
\amp, 0.02
|
||||||
|
),
|
||||||
|
Pbind(\instrument, \hihat1,
|
||||||
|
\dur, Pseq([Rest(0.27),0.23,0.25,0.25], inf),
|
||||||
|
\amp, Pseq([0, 0.04,0.09,0.01], inf) ,
|
||||||
|
\ffreq, 10000,
|
||||||
|
),
|
||||||
|
Pbind(\instrument, \hihat1,
|
||||||
|
\dur, Pseq([Pseq([0.26,0.24],7),Prand([1/8,Rest(1/8)]), 1/8],inf),
|
||||||
|
\amp, Pseq([0.01,0.02], inf) ,
|
||||||
|
\ffreq, 5000
|
||||||
|
),inf
|
||||||
|
])
|
||||||
|
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
{
|
||||||
|
EnvGen.kr(
|
||||||
|
Env([0, 1, 0, 0.2, 0, 0.5, 0.8, 0], [0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01], releaseNode: 5, loopNode: 1),
|
||||||
|
gate: Trig.kr(1, 3.9)
|
||||||
|
);
|
||||||
|
}.plot(duration: 4)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
( // synthdefi
|
||||||
|
SynthDef(\monitorInput, {
|
||||||
|
arg out = 0;
|
||||||
|
var snd = SoundIn.ar([0,1], 1);
|
||||||
|
Out.ar(out,snd);
|
||||||
|
}).play;
|
||||||
|
)
|
||||||
|
|
||||||
|
Ndef(\ndefMonIn).play
|
||||||
|
Ndef(\ndefMonIn).fadeTime = 10;
|
||||||
|
(
|
||||||
|
Ndef(\ndefMonIn, {
|
||||||
|
var snd = SoundIn.ar([0,1], 1);
|
||||||
|
|
||||||
|
snd*0.5;
|
||||||
|
}).fadeTime = 10;
|
||||||
|
)
|
||||||
|
|
||||||
|
// Execute the following in order
|
||||||
|
(
|
||||||
|
// allocate a Buffer
|
||||||
|
s = Server.local;
|
||||||
|
b = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
|
||||||
|
)
|
||||||
|
|
||||||
|
// record for four seconds
|
||||||
|
(
|
||||||
|
SynthDef(\help_RecordBuf, { arg out = 0, bufnum = 0;
|
||||||
|
var snd = SoundIn.ar(0,1);
|
||||||
|
RecordBuf.ar(snd, bufnum, doneAction: Done.freeSelf, loop: 0);
|
||||||
|
|
||||||
|
}).play(s,[\out, 0, \bufnum, b]);
|
||||||
|
)
|
||||||
|
|
||||||
|
// play it back
|
||||||
|
(
|
||||||
|
SynthDef(\help_RecordBuf_playback, { arg out = 0, bufnum = 0;
|
||||||
|
var playbuf;
|
||||||
|
playbuf = PlayBuf.ar(1,bufnum);
|
||||||
|
FreeSelfWhenDone.kr(playbuf); // frees the synth when the PlayBuf is finished
|
||||||
|
Out.ar(out, playbuf);
|
||||||
|
}).play(s, [\out, 0, \bufnum, b]);
|
||||||
|
)
|
||||||
|
b.plot
|
||||||
|
|
||||||
|
// overdub
|
||||||
|
(
|
||||||
|
SynthDef(\help_RecordBuf_overdub, { arg out=0, bufnum=0;
|
||||||
|
var formant;
|
||||||
|
formant = Formant.ar(XLine.kr(200, 1000, 4), 2000, 800, 0.125);
|
||||||
|
// mixes equally with existing data
|
||||||
|
RecordBuf.ar(formant, bufnum, 0, 0.3, 0.5, doneAction: Done.freeSelf, loop: 0);
|
||||||
|
}).play(s, [\out, 0, \bufnum, b]);
|
||||||
|
)
|
||||||
|
|
||||||
|
// play back the overdubbed version
|
||||||
|
Synth.new(\help_RecordBuf_playback, [\out, 0, \bufnum, b], s);
|
||||||
|
|
||||||
|
// write the contents of the buffer to a file (see Buffer for more options)
|
||||||
|
(
|
||||||
|
b.write(sampleFormat: 'int16');
|
||||||
|
thisProcess.platform.recordingsDir +/+ "SC_" ++ Date.localtime.stamp ++ ".aiff"; // generated path
|
||||||
|
)
|
||||||
|
|
||||||
|
b.close; b.free; // cleanup
|
||||||
|
|
||||||
|
Ndef(\bgrain).play
|
||||||
|
|
||||||
|
Ndef(\bgrain).fadeTime = 10;
|
||||||
|
|
||||||
|
(
|
||||||
|
Ndef(\bgrain, { |gate = 1, amp = 0, sndbuf, freq=90|
|
||||||
|
var snd, pan, env, freqdev;
|
||||||
|
// use mouse x to control panning
|
||||||
|
//pan = MouseX.kr(-1, 1);
|
||||||
|
pan = LFNoise1.kr(0.1).range(-1, 1) * LFNoise0.kr(freq).range(0.2,1);
|
||||||
|
env = EnvGen.kr(
|
||||||
|
Env([0, 1, 0], [1, 1], \sin, 1),
|
||||||
|
gate,
|
||||||
|
levelScale: amp,
|
||||||
|
doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = GrainBuf.ar(
|
||||||
|
numChannels:2,
|
||||||
|
trigger:Impulse.kr(LFNoise1.kr(freq).range(0.8,1) * freq),
|
||||||
|
dur: 0.2,
|
||||||
|
sndbuf: b,
|
||||||
|
rate: 1 * LFNoise1.kr.range(0.99, 1),
|
||||||
|
pos: LFNoise2.kr(0.1).range(0, 1) * LFNoise0.kr(freq).range(1,1.01),
|
||||||
|
interp: 2,
|
||||||
|
pan: pan) * env;
|
||||||
|
|
||||||
|
snd = RLPF.ar(snd, freq: LFNoise2.kr(0.1).exprange(400,10000));
|
||||||
|
|
||||||
|
//snd = snd + (Greyhole.ar(snd, delayTime: 0.4,feedback: 0.4 ) * 0.8);
|
||||||
|
});
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
c = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
|
||||||
|
// record for four seconds
|
||||||
|
(
|
||||||
|
SynthDef(\help_RecordBuf, { arg out = 0, bufnum = 0;
|
||||||
|
var snd = SoundIn.ar(0,1);
|
||||||
|
RecordBuf.ar(snd, bufnum, doneAction: Done.freeSelf, loop: 0);
|
||||||
|
|
||||||
|
}).play(s,[\out, 0, \bufnum, c]);
|
||||||
|
)
|
||||||
|
|
||||||
|
Ndef(\bgrain2).play;
|
||||||
|
Ndef(\bgrain2).fadeTime = 3;
|
||||||
|
(
|
||||||
|
Ndef(\bgrain2, { |gate = 1, amp = -6.db, sndbuf, freq=90|
|
||||||
|
var snd, pan, env, freqdev;
|
||||||
|
// use mouse x to control panning
|
||||||
|
//pan = MouseX.kr(-1, 1);
|
||||||
|
pan = LFNoise1.kr(0.1).range(-1, 1) * LFNoise0.kr(freq).range(0.2,1);
|
||||||
|
env = EnvGen.kr(
|
||||||
|
Env([0, 1, 0], [5, 1], \sin, 1),
|
||||||
|
gate,
|
||||||
|
//levelScale: amp,
|
||||||
|
doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = GrainBuf.ar(
|
||||||
|
numChannels:2,
|
||||||
|
trigger:Impulse.kr(LFNoise1.kr(freq).range(0.8,1) * freq),
|
||||||
|
dur: 0.2,
|
||||||
|
sndbuf: c,
|
||||||
|
rate: 1 * LFNoise1.kr.range(0.99, 1),
|
||||||
|
pos: LFNoise2.kr(0.03).range(0, 1) * LFNoise0.kr(freq).range(1,1.01),
|
||||||
|
interp: 2,
|
||||||
|
pan: pan) * env;
|
||||||
|
|
||||||
|
snd = RLPF.ar(snd, freq: LFNoise2.kr(0.1).exprange(100,7000)) * amp;
|
||||||
|
|
||||||
|
//snd = snd + (Greyhole.ar(snd, delayTime: 0.4,feedback: 0.4 ) * 0.8);
|
||||||
|
});
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Ndef(\ba).play(~reverBus, addAction: \addToHead)
|
||||||
|
|
||||||
|
~reverbDelay = Synth(\verbDelayFX, [\inBus, ~reverBus, \outBus, 0], addAction: \addAfter);
|
||||||
|
~reverbDelay.set(\revWet, 1);
|
||||||
|
~reverbDelay.set(\dlyWet, 1);
|
||||||
|
~reverbDelay.free
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
Quarks.gui
|
||||||
|
|
||||||
|
SynthDefPool.gui
|
|
@ -0,0 +1,108 @@
|
||||||
|
//AKJ to pattern femalemalenonbinary
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\akj1, {
|
||||||
|
arg freq=300, amp=0.1, out=0, gate=1;
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
freq = [freq,freq*1.01];
|
||||||
|
|
||||||
|
snd = LFPar.ar(freq) * 0.3
|
||||||
|
+ (LFTri.ar(freq*16/19, mul:0.3))
|
||||||
|
+ (Pulse.ar(freq*21/40, mul:0.1))
|
||||||
|
+ (SinOsc.ar(freq/8.01, mul:4).clip2(0.3));
|
||||||
|
|
||||||
|
|
||||||
|
env = Linen.kr(gate, attackTime:1, releaseTime:3, doneAction:2);
|
||||||
|
snd = Splay.ar(snd);
|
||||||
|
snd = snd * env * amp;
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\akjbz, {
|
||||||
|
arg freq=300, amp=0.1, out=0, gate=1;
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
//freq = [freq, freq*2.02, freq*1.98, freq];
|
||||||
|
snd = SinOsc.ar(freq/4, mul:0.7)!2;
|
||||||
|
//snd = snd * [1, 0.1, 0.1, 1];
|
||||||
|
snd = snd * Lag.ar(LFPulse.ar(freq/8.02, 0.5).range(1,0),0.005);
|
||||||
|
snd = snd.softclip(0.5) * 1.5 ;
|
||||||
|
|
||||||
|
env = Linen.kr(gate, 0,1,0, 2);
|
||||||
|
//snd = (snd + (snd.wrap2 * 0.54)).softclip;
|
||||||
|
|
||||||
|
snd = snd * env * amp;
|
||||||
|
|
||||||
|
Splay.ar(snd);
|
||||||
|
Out.ar(out, snd);
|
||||||
|
//LFPulse.ar(0.275, width:0.25).range(0,1);
|
||||||
|
|
||||||
|
}).add
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\click1, {
|
||||||
|
arg out=0, gate=1, freq=440, amp=0.1, releaseTime=0.1;
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
snd = LFPulse.ar([freq, freq * 2], width: LFNoise1.ar(0.1).exprange(0.001,0.004));
|
||||||
|
snd = snd + (WhiteNoise.ar(1) * snd);
|
||||||
|
snd = HPF.ar(snd, 200);
|
||||||
|
//snd = Limiter.ar((snd * 5));
|
||||||
|
|
||||||
|
env = EnvGen.ar(Env.perc(0,releaseTime));
|
||||||
|
|
||||||
|
snd = snd * env * amp * Linen.kr(gate, 0, 1, releaseTime, 2);
|
||||||
|
snd = Splay.ar(snd);
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
// -- disonant chord + click + bazz -------------------------------
|
||||||
|
TempoClock.tempo=1
|
||||||
|
// disonchord
|
||||||
|
Pdef(\akj1p).play;
|
||||||
|
(
|
||||||
|
Pbindef(\akj1p, *[
|
||||||
|
instrument: \akj1,
|
||||||
|
freq:300,
|
||||||
|
dur:5,
|
||||||
|
legato: 1,
|
||||||
|
amp: 1
|
||||||
|
]))
|
||||||
|
Pdef(\akj1p).stop;
|
||||||
|
|
||||||
|
|
||||||
|
// click
|
||||||
|
Pdef(\clickp).play(quant:4);
|
||||||
|
Pdef(\clickp).stop(quant:4);
|
||||||
|
(
|
||||||
|
Pbindef(\clickp, *[
|
||||||
|
instrument: \click1,
|
||||||
|
dur: Pseq([Pseq([1,2,3]/8, 2), Pseq([1,2,1,2,1,1]/8,3), Pseq([1]/8, 4), Pseq([1]/16, 2), ],inf),
|
||||||
|
//dur: Pseq([Pn(1/8, 31), Rest(1/8)],inf),
|
||||||
|
amp: Prand([5,7,8,9]/10, inf),
|
||||||
|
releaseTime: 0.3,
|
||||||
|
freq:1
|
||||||
|
|
||||||
|
])
|
||||||
|
)
|
||||||
|
|
||||||
|
// deep bass --
|
||||||
|
Pdef(\akjbp).play(quant:4)
|
||||||
|
(
|
||||||
|
Pbindef(\akjbp, *[
|
||||||
|
instrument: \akjbz,
|
||||||
|
freq: 300,
|
||||||
|
dur: 8,
|
||||||
|
amp: 0.5,
|
||||||
|
legato: 0.20
|
||||||
|
])
|
||||||
|
)
|
||||||
|
Pdef(\akjbp).stop
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
|
@ -0,0 +1,146 @@
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// GCD SINMODFEED /////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// feedback of modulated SinOsc
|
||||||
|
|
||||||
|
// low rumble 0 ------------------------------------
|
||||||
|
(
|
||||||
|
SynthDef(\dNoz, {
|
||||||
|
arg out=0, gate=1, amp=0.1, envattackTime=0.001, release=0.001;
|
||||||
|
var snd, env;
|
||||||
|
env = Linen.kr(gate, envattackTime, 1, release, doneAction:2);
|
||||||
|
snd = WhiteNoise.ar(1);
|
||||||
|
snd = snd + SinOsc.ar(SinOsc.kr(10).range(40,60), mul:0.2);
|
||||||
|
snd = snd + Pulse.ar(SinOsc.kr(12).range(40,60), mul:0.1);
|
||||||
|
snd = snd.clip2(0.8);
|
||||||
|
|
||||||
|
snd = LPF.ar(snd, LFNoise2.ar(0.4).range(60,100), mul:3);
|
||||||
|
|
||||||
|
snd = snd.dup;
|
||||||
|
snd[1] = DelayL.ar(snd[1], 0.05, SinOsc.kr(0.2).range(0.001,0.003));
|
||||||
|
snd = snd * env * amp;
|
||||||
|
Out.ar(out, snd);
|
||||||
|
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
(
|
||||||
|
// "LFTri bass drum kick" - by luka@lukaprincic.si
|
||||||
|
SynthDef(\tribd, {
|
||||||
|
arg out=0, gate=1, freq=77, amp=0.1;
|
||||||
|
var snd,snd1, aenv, fenv, senv;
|
||||||
|
|
||||||
|
fenv = Env(levels:[2, 1.2, 0], times: [0.1, 0.4]).kr;
|
||||||
|
freq = [freq,freq*2] * fenv;
|
||||||
|
freq = freq.max(10);
|
||||||
|
|
||||||
|
snd = LFTri.ar(freq) + SinOsc.ar(freq) * [1,0.3];
|
||||||
|
snd1 = SinOsc.ar(190, mul:3) * EnvGen.ar(Env.perc(releaseTime:0.1), gate) ;
|
||||||
|
snd = snd.sum * 0.9;
|
||||||
|
snd = LPF.ar(snd, freq * 4);
|
||||||
|
|
||||||
|
snd = snd + RLPF.ar( BrownNoise.ar(1),
|
||||||
|
Env(levels:[2000,500,90], times:[0.01,0.05]).kr, 0.3 );
|
||||||
|
|
||||||
|
snd = snd + ( BPF.ar(WhiteNoise.ar(0.5), 3000)
|
||||||
|
* Env([1,1,0], [0.004,0.005]).kr );
|
||||||
|
snd = snd + ( BPF.ar(WhiteNoise.ar(0.5), 7000)
|
||||||
|
* Env([1,1,0], [0.003,0.001]).kr );
|
||||||
|
|
||||||
|
aenv = Env([1,1,0], [0.2,2], curve: -9).kr;
|
||||||
|
snd = snd1 + snd * aenv;
|
||||||
|
snd = Limiter.ar(snd, 8);
|
||||||
|
|
||||||
|
senv = Linen.kr(releaseTime: 0.1, gate: gate, doneAction: Done.freeSelf);
|
||||||
|
snd = LeakDC.ar(snd);
|
||||||
|
snd = snd * amp * senv;
|
||||||
|
snd = Pan2.ar(snd, pos:0);
|
||||||
|
snd = snd.clip2;
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
(
|
||||||
|
~clk3 = TempoClock.new(2.2);
|
||||||
|
//~myClock = TempoClock.new(2.2);
|
||||||
|
|
||||||
|
//~clk3 = TempoClock.tempo= 2.2 / 1;
|
||||||
|
{ // routine starts here
|
||||||
|
1.wait;
|
||||||
|
Ndef(\gcdmod).proxyspace.clock = ~clk3;
|
||||||
|
Ndef(\gcdmod).proxyspace.quant = 1;
|
||||||
|
Ndef(\gcdmod, {
|
||||||
|
var a = TDuty.ar(Dseq((0..3), inf) + 5 * SampleDur.ir);
|
||||||
|
var b = TDuty.ar(Dseq((3..0), inf) + 5.01 * SampleDur.ir);
|
||||||
|
var mod = 50;
|
||||||
|
var t = PulseCount.ar(a) % mod;
|
||||||
|
var u = PulseCount.ar(b) % mod;
|
||||||
|
var n, j, d, e, c;
|
||||||
|
|
||||||
|
d = LocalIn.ar(2);
|
||||||
|
n = gcd(t, u + [0, 1]);
|
||||||
|
e = n.linexp(0, mod, 70, 10000);
|
||||||
|
j = SinOsc.ar(e);
|
||||||
|
LocalOut.ar(j * d);
|
||||||
|
c = CombC.ar(j, 1, [0.009,0.007,0.008, 0.006] * LFNoise1.ar([0.01,0.01]).range(1.3,0.7), 30, mul:0.05);
|
||||||
|
j = j * LFNoise1.ar(0.2).range(0,0.5) + Splay.ar(c);
|
||||||
|
j = Greyhole.ar(j, damp:0.5, diff:0.5 size:4);
|
||||||
|
j = Limiter.ar(LPF.ar(HPF.ar(j, 100), LFNoise1.kr(0.1).exprange(200,18000)), 0.5, 0.55);
|
||||||
|
j = j * LFPulse.ar([2.2,4.4]*2, 0.96, width:LFNoise1.ar(0.2).range(0.8,0.95)).range(LFNoise1.ar(0.1).range(0,1),1);
|
||||||
|
j = j + LFPulse.ar([2.2,4.4], 0.96, mul: LFNoise1.kr(1/10).range(0,0.5) * Line.kr(0,1,30));
|
||||||
|
j = LeakDC.ar(j);
|
||||||
|
|
||||||
|
// Out.ar(0, j * EnvGate())
|
||||||
|
});
|
||||||
|
|
||||||
|
Ndef(\gcdkick).proxyspace.clock = ~clk3;
|
||||||
|
Ndef(\gcdkick).proxyspace.quant = 1;
|
||||||
|
Pdef(\gcdkick, {
|
||||||
|
Pbind(*[
|
||||||
|
instrument: \tribd,
|
||||||
|
dur: Pseq([
|
||||||
|
Rest(32),
|
||||||
|
Pseq(
|
||||||
|
[
|
||||||
|
Prand( [ Pseq([1.5,1.5]), 3 ] ),
|
||||||
|
3,
|
||||||
|
Prand([
|
||||||
|
4,
|
||||||
|
Pn(1,3),
|
||||||
|
Pn(Pseq([1/2,1,Prand([1/2,1.5])]),1)
|
||||||
|
])
|
||||||
|
] / 2, 32)
|
||||||
|
],inf),
|
||||||
|
//dur: 1,
|
||||||
|
//dur: Pseq([1.5,1,1.5,1/2,2,1/2,1.5,1/2,1/4,1/2,1/4,3],inf),
|
||||||
|
freq:77 + Prand((1..10)/5, inf),
|
||||||
|
octave:2,
|
||||||
|
amp:0.1
|
||||||
|
])
|
||||||
|
};);
|
||||||
|
Ndef(\gcdkick).mold(2, \audio, \elastic);
|
||||||
|
Ndef(\gcdkick)[0] = Pdef(\gcdkick);
|
||||||
|
|
||||||
|
|
||||||
|
Pbindef(\n1,
|
||||||
|
\instrument, \dNoz,
|
||||||
|
\dur, Pseq([20,Rest(10)],inf),
|
||||||
|
\amp, 0.5,
|
||||||
|
\legato, 1,
|
||||||
|
);
|
||||||
|
//Pdef(\n1).stop;
|
||||||
|
//Pdef(\n1).clear;
|
||||||
|
|
||||||
|
1.wait;
|
||||||
|
|
||||||
|
s.makeBundle(0.25, {
|
||||||
|
Pdef(\n1).play(~clk3, quant:1);
|
||||||
|
Ndef(\gcdmod).play;
|
||||||
|
Ndef(\gcdkick).play;
|
||||||
|
});
|
||||||
|
|
||||||
|
}.fork(~clk3)
|
||||||
|
)
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
@ -0,0 +1,47 @@
|
||||||
|
// shippo ------------------------------------------------------
|
||||||
|
(
|
||||||
|
SynthDef(\shippo, {
|
||||||
|
arg amp=0.1, gate=1, out=0, freq=100;
|
||||||
|
var snd, env, rev;
|
||||||
|
freq = [freq/2, freq * 0.99, freq * 1.51];
|
||||||
|
snd = Pulse.ar( freq * LFNoise1.ar(1/10).range(1,1.03), mul:0.4 )
|
||||||
|
; //* Lag.ar(LFPulse.ar(1/5, iphase:0.98, width:0.1));
|
||||||
|
snd = Splay.ar(snd,spread:0.6);
|
||||||
|
snd = LPF.ar(snd, LFNoise1.ar(1/4).exprange(500,10000));
|
||||||
|
env = EnvGen.kr(Env.adsr(0.001,0,1, 0.1, 1), gate, doneAction:0);
|
||||||
|
snd = snd * env;
|
||||||
|
snd = snd;
|
||||||
|
rev = Array.fill (16, {
|
||||||
|
CombL.ar(
|
||||||
|
snd,
|
||||||
|
0.2,
|
||||||
|
LFNoise1.ar(1/3).range(0.98,1.02) * rrand(0.01, 0.3),
|
||||||
|
10)
|
||||||
|
});
|
||||||
|
rev = Splay.ar(rev);
|
||||||
|
rev = LeakDC.ar(rev);
|
||||||
|
rev = HPF.ar(rev, 100);
|
||||||
|
snd = snd + rev;
|
||||||
|
snd = Limiter.ar(snd, 0.8);
|
||||||
|
snd = snd * amp;
|
||||||
|
DetectSilence.ar(snd, doneAction:2);
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
~clksh = TempoClock.new(1);
|
||||||
|
Pdef(\shippoP).play(~clksh);
|
||||||
|
Pdef(\shippoP).stop;
|
||||||
|
(
|
||||||
|
Pbindef(\shippoP, *[
|
||||||
|
instrument: \shippo,
|
||||||
|
degree: 4,
|
||||||
|
octave: 3,
|
||||||
|
dur: Pseq([1,2,3], inf),
|
||||||
|
legato:0.2,
|
||||||
|
amp: 0.5
|
||||||
|
]);
|
||||||
|
)
|
||||||
|
Pdef(\shippoP).clear
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
Pdef(\s2).play
|
||||||
|
(
|
||||||
|
Pbindef(\s2,
|
||||||
|
\instrument, \bap,
|
||||||
|
\degree, -1,
|
||||||
|
\dur, 2,
|
||||||
|
\octave, [2,3],
|
||||||
|
\amp, 0.9,
|
||||||
|
\legato, 1,
|
||||||
|
// needs wrangled delay!
|
||||||
|
\out, ~wranglerBus,
|
||||||
|
\dlywet, Pstutter(8, Pfunc({~dlywrang1.set(\wet, rrand(0, ((3..6) * 0.1).choose ) ) })),
|
||||||
|
|
||||||
|
\d1, Prand((1..5),inf),
|
||||||
|
\d2, Prand((1..5),inf),
|
||||||
|
\d3, 5,
|
||||||
|
\ffreq, 460
|
||||||
|
)
|
||||||
|
)
|
||||||
|
Pdef(\s2).stop
|
||||||
|
|
||||||
|
|
||||||
|
SynthDef(\bap, {
|
||||||
|
arg freq=440, gate=1, out=0, amp=0.1, d1 = 5, d2 = 1, d3=5, ffreq=200;
|
||||||
|
var snd = Saw.ar([freq, freq*1.01]);
|
||||||
|
var env = Linen.kr(gate, releaseTime: 0.1, doneAction:2);
|
||||||
|
snd = snd + SinOsc.ar([freq*0.99, freq]);
|
||||||
|
snd = snd + Pulse.ar([freq*0.99, freq]);
|
||||||
|
|
||||||
|
snd = snd.clip2(LFNoise1.ar(0.3).range(0.3,0.8)) * d1;
|
||||||
|
snd = snd.wrap2(LFNoise1.ar(0.3).range(0.3,0.8)) * d2;
|
||||||
|
snd = snd.fold2(LFNoise1.ar(0.3).range(0.3,0.8)) * d3;
|
||||||
|
snd = LeakDC.ar(snd);
|
||||||
|
snd = LPF.ar(snd, ffreq);
|
||||||
|
snd = Limiter.ar(snd);
|
||||||
|
snd = Splay.ar(snd);
|
||||||
|
Out.ar(out, snd*env*amp);
|
||||||
|
}).add;
|
|
@ -0,0 +1,49 @@
|
||||||
|
(
|
||||||
|
SynthDef(\twoChPad, {
|
||||||
|
arg out=0, gate=1, amp=1, alag=10;
|
||||||
|
var sum, snd0, snd1, snd2, env, gen, faderosc, numosc;
|
||||||
|
|
||||||
|
numosc = 10;
|
||||||
|
env = Env.adsr(20, 0, 1, 30, 1, \sin);
|
||||||
|
gen = EnvGen.kr(env, gate, doneAction:2);
|
||||||
|
|
||||||
|
faderosc = SinOsc.ar(1/60).range(-1,2).min(1).max(0);
|
||||||
|
|
||||||
|
snd0 = Array.fill(numosc, {
|
||||||
|
var freq, local;
|
||||||
|
freq = [100,150,300,400] * 0.5;
|
||||||
|
local = Saw.ar(rrand(freq, freq * 1.03 ) * LFNoise1.kr(0.3).range(1, 1.03), -10.dbamp);
|
||||||
|
local = Mix(local);
|
||||||
|
});
|
||||||
|
snd0 = Splay.ar(snd0);
|
||||||
|
snd0 = faderosc * snd0;
|
||||||
|
snd0 = LPF.ar(snd0, LFNoise1.ar(0.06).exprange(300,10000));
|
||||||
|
snd0 = CombL.ar(snd0, 1, LFNoise1.ar(0.05).range([0.5,0.65],[0.53,0.68]), 15, -1.dbamp) + snd0;
|
||||||
|
|
||||||
|
snd1 = Array.fill(numosc, {
|
||||||
|
var freq, local;
|
||||||
|
freq = [100,150,300,400] * 0.8;
|
||||||
|
local = Saw.ar(rrand(freq, freq * 1.03 ) * LFNoise1.kr(0.3).range(1, 1.03), -10.dbamp);
|
||||||
|
local = Mix(local);
|
||||||
|
});
|
||||||
|
snd1 = Splay.ar(snd1);
|
||||||
|
snd1 = (0-faderosc+1) * snd1;
|
||||||
|
snd1 = LPF.ar(snd1, LFNoise1.ar(0.07).exprange(300,10000));
|
||||||
|
snd1 = CombL.ar(snd1, 1, LFNoise1.ar(0.05).range([0.77,0.65],[0.80,0.68]), 15, -1.dbamp) + snd1;
|
||||||
|
|
||||||
|
snd2 = WhiteNoise.ar * LFPulse.ar(0.06, width:0.02) * -25.dbamp;
|
||||||
|
snd2 = HPF.ar(snd2, 2000);
|
||||||
|
snd2 = snd2 + Dust.ar(LFNoise1.ar(0.1).range(1,100), mul:0.2);
|
||||||
|
|
||||||
|
sum = snd0 + snd1;
|
||||||
|
sum = sum * gen + snd2;
|
||||||
|
sum = sum * Lag.kr(amp, alag);
|
||||||
|
Out.ar(out, sum);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
~twoChPad = Synth(\twoChPad);
|
||||||
|
~twoChPad.set(\amp, 1.5)
|
||||||
|
~twoChPad.set(\amp, 1)
|
||||||
|
~twoChPad.release(30);
|
|
@ -0,0 +1,457 @@
|
||||||
|
// =====================================================================
|
||||||
|
// livecoding session, 2.october, 2020 - OSMOZA
|
||||||
|
// =====================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//(// test all )
|
||||||
|
//( // stop all? )
|
||||||
|
|
||||||
|
|
||||||
|
// delay busses
|
||||||
|
|
||||||
|
/*~reverBus = Bus.audio(s, numChannels:2);
|
||||||
|
~reverb = Synth(\reverb, [\inBus, ~reverBus, \out, 0, \amp, 1], addAction:\addToTail )
|
||||||
|
~reverb.set(\amp, 1)
|
||||||
|
~reverb.free
|
||||||
|
~reverBus.free
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
~reverBus = Bus.audio(s,2);
|
||||||
|
~reverbDelay = Synth(\verbDelayFX, [\inBus, ~reverBus, \outBus, 0, \revWet, 1, \dlyWet, 1], addAction: \addAfter);
|
||||||
|
~reverbDelay.set(\revWet, 1);
|
||||||
|
~reverbDelay.set(\dlyWet, 1);
|
||||||
|
~reverbDelay.free
|
||||||
|
~reverBus.free
|
||||||
|
|
||||||
|
b = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
|
||||||
|
c = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
|
||||||
|
d = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
|
||||||
|
e = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
|
||||||
|
|
||||||
|
Synth(\recIn, [\bufnum, b]);
|
||||||
|
b.normalize;
|
||||||
|
Synth(\recIn, [\bufnum, c]);
|
||||||
|
c.normalize;
|
||||||
|
Synth(\recIn, [\bufnum, d]);
|
||||||
|
d.normalize;
|
||||||
|
Synth(\recIn, [\bufnum, e]);
|
||||||
|
e.normalize;
|
||||||
|
|
||||||
|
b.plot
|
||||||
|
c.plot
|
||||||
|
d.plot
|
||||||
|
e.plot
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
~soil1 = Synth(\granSoil, [\sndbuf, ~getSnd.("forest"), \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
|
||||||
|
~soil1.release
|
||||||
|
|
||||||
|
|
||||||
|
e = Synth(\bgrain, [\out, ~reverBus, \bufnum, e, \amp, 0.01], addAction: \addToHead);
|
||||||
|
g = Synth(\bgrain, [\out, 0, \bufnum, b, \amp, 0.1], addAction: \addToHead);
|
||||||
|
e.set(\amp, 0.5);
|
||||||
|
e.set(\rate, 1);
|
||||||
|
e.free
|
||||||
|
g.release(1)
|
||||||
|
g.free
|
||||||
|
|
||||||
|
~grain1 = Synth(\bgrain, [\out, ~reverBus, \bufnum, ~getSmp.("caretaker"), \amp, 0.01], addAction: \addToHead);
|
||||||
|
~grain1.set(\amp, 0.4)
|
||||||
|
~grain1.set(\rate, 1)
|
||||||
|
~grain1.set(\bufnum, ~getSmp.("romantiq"))
|
||||||
|
~grain1.release(1)
|
||||||
|
|
||||||
|
~glitchgrain = Synth(\bgrain, [\out, ~reverBus, \bufnum, ~getSmp.("gl05"), \amp, 0.01], addAction: \addToHead);
|
||||||
|
~glitchgrain.set(\amp)
|
||||||
|
~glitchgrain.release(1)
|
||||||
|
|
||||||
|
~amygran = Synth(\bgrain, [\out, ~reverBus, \bufnum, ~getSmp.("amywars"), \amp, 0.1], addAction: \addToHead);
|
||||||
|
~amygran.set(\amp, 0.8)
|
||||||
|
~amygran.set(\rate, 1)
|
||||||
|
~amygran.release(3)
|
||||||
|
|
||||||
|
~romantiq = Synth(\bgrain, [\out, ~reverBus, \bufnum, ~getSmp.("romant"), \amp, 0.01], addAction: \addToHead);
|
||||||
|
~romantiq.set(\amp, 0.2)
|
||||||
|
~romantiq.set(\rate, 1)
|
||||||
|
~romantiq.release(10)
|
||||||
|
|
||||||
|
~ljuben = Synth(\bgrain, [\out, ~reverBus, \bufnum, ~getSmp.("Ljuben"), \amp, 0.1], addAction: \addToHead);
|
||||||
|
|
||||||
|
s.record(duration:120)
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\glgrain2, Pbind(\instrument, \bgrain, \bufnum, ~getSmp.("amywars"),
|
||||||
|
\dur, 30,
|
||||||
|
\legato, 0.9,
|
||||||
|
\amp, 0.5,
|
||||||
|
\rate, 1,
|
||||||
|
\out, ~reverBus
|
||||||
|
)).play);
|
||||||
|
Pdef(\glgrain2).stop
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\glgrain1, Pbind(\instrument, \bgrain, \bufnum, ~getSmp.("gl05"),
|
||||||
|
\dur, 30,
|
||||||
|
\legato, 0.8,
|
||||||
|
\amp, 0.1,
|
||||||
|
\out, ~reverBus
|
||||||
|
)).play);
|
||||||
|
|
||||||
|
Pdef(\glgrain1).stop
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
//Pdef(\fran, Pbind( \instrument, \bgrain, \bufnum, ~getSmp.("gl05"),
|
||||||
|
Pdef(\gran, Pbind( \instrument, \bgrain, \bufnum, b,
|
||||||
|
\dur, 4,
|
||||||
|
|
||||||
|
\amp, 0.05,
|
||||||
|
//\rate, Prand((90..110) * 0.01,inf),
|
||||||
|
// \pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
\out, ~reverBus
|
||||||
|
)).quant_(1)
|
||||||
|
);
|
||||||
|
|
||||||
|
Pdef(\gran).play
|
||||||
|
Pdef(\gran).stop
|
||||||
|
Pbindef(\gran, \amp, 0.01)
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
|
||||||
|
~henonS1 = Synth(\henonSynth1, [\out, ~reverBus, \amp, 0.4, \fadeTime, 4]);
|
||||||
|
~henonS1.set(\amp, 0.9);
|
||||||
|
~henonS1.set(\pan, -1);
|
||||||
|
~henonS1.set(\hpff, 12000);
|
||||||
|
~henonS1.set(\lpff, 400);
|
||||||
|
~henonS1.release(2);
|
||||||
|
~henonS1.free;
|
||||||
|
|
||||||
|
~henonS2 = Synth(\henonSynth1, [\amp, 0.2, \fadeTime, 20]);
|
||||||
|
~henonS2.set(\amp, 0.7);
|
||||||
|
~henonS2.set(\pan, 1);
|
||||||
|
~henonS2.set(\hpff, 13000);
|
||||||
|
~henonS2.set(\lpff, 300);
|
||||||
|
~henonS2.set(\gate, 0, \fadeTime, 1);
|
||||||
|
~henonS2.release(2);
|
||||||
|
~henonS2.free;
|
||||||
|
|
||||||
|
~darkHenon1 = Synth(\henonLsynth2, [\fadeTime, 10, \amp, 0.1]);
|
||||||
|
~darkHenon1.set(\amp, 0.5);
|
||||||
|
~darkHenon1.release(30);
|
||||||
|
~darkHenon1.free;
|
||||||
|
|
||||||
|
~darkHenon2 = Synth(\henonLsynth2, [\fadeTime, 10, \amp, 0.2]);
|
||||||
|
~darkHenon2.set(\amp, 0.7);
|
||||||
|
~darkHenon2.set(\gate, 0, \fadeTime, 3);
|
||||||
|
~darkHenon2.release(30);
|
||||||
|
~darkHenon2.free;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 210Hz
|
||||||
|
~fhnTrig1 = Synth(\fhnTrigRing, [\freq, 110, \amp, 0.5, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 10]);
|
||||||
|
~fhnTrig1.set(\freq, 60);
|
||||||
|
~fhnTrig1.release(3);
|
||||||
|
|
||||||
|
// 200Hz
|
||||||
|
~fhnTrig3 = Synth(\fhnTrigRing, [\out, ~octoBus2, \freq, 200, \amp, 0.5, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 10]);
|
||||||
|
~fhnTrig3.release(30);
|
||||||
|
|
||||||
|
// 2110
|
||||||
|
~fhnTrig2 = Synth(\fhnTrigRing, [\freq, 2110, \amp, 0.5, \min, 2, \max, 20, \amp, 0.5, \fadeTime, 10]);
|
||||||
|
~fhnTrig2.set(\out, 0)
|
||||||
|
~fhnTrig2.set(\ffreq, 8000)
|
||||||
|
~fhnTrig2.release(6)
|
||||||
|
|
||||||
|
~fhnTrig2 = Node.basicNew(nodeID:1369)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// =====================================================================
|
||||||
|
// Pbindefs ////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\bsln1).play.quant_(1);
|
||||||
|
Pbindef(\bsln1, \dur, Pseq([1,2,3] * 1/4, inf))
|
||||||
|
Pbindef(\bsln1, \degree, Pseq([2,2,4,1], inf))
|
||||||
|
Pbindef(\bsln1, \legato, 1, \releaseTime, 0.01)
|
||||||
|
Pbindef(\bsln1, \lpf, Prand([3,4,5,6,7,8],inf))
|
||||||
|
Pbindef(\bsln1, \lpf, Pseq([4,5,6,7,8,9,10,11],inf))
|
||||||
|
Pbindef(\bsln1, \freso, 0.5)
|
||||||
|
Pbindef(\bsln1, \fdist, 1)
|
||||||
|
Pbindef(\bsln1, \amp, 0.3)
|
||||||
|
Pdef(\bsln1).stop;
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\strng1).play;
|
||||||
|
|
||||||
|
// Pseq([3,2,1] * 1/6,inf)
|
||||||
|
Pbindef(\strng1, \dur, Pseq([3,2,1] * 1/6,inf))
|
||||||
|
|
||||||
|
// [4,9], 2, 8 , 4, 1
|
||||||
|
Pbindef(\strng1, \degree, 2)
|
||||||
|
Pbindef(\strng1, \degree, Pseq([[4,9],2,8,4,1], inf))
|
||||||
|
Pbindef(\strng1, \octave, 5)
|
||||||
|
// [6,5,7], [4,5,7], [7,5,4]
|
||||||
|
Pbindef(\strng1, \octave, Pseq([[4,5,7],[7,5,6],[5,7,4]],inf))
|
||||||
|
Pbindef(\strng1, \octave, Pseq([[6,5,7], [4,5,7], [7,5,4]],inf))
|
||||||
|
Pbindef(\strng1, \amp, 0.1)
|
||||||
|
// Pstutter(12, Pseq([1,0,-2,3,-3], inf))
|
||||||
|
Pbindef(\strng1, \mtranspose, Pstutter(12, Pseq([1, 0, -2, 3, -3],inf)))
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\strng1).stop;
|
||||||
|
Pdef(\strng1).clear;
|
||||||
|
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\perc1).play
|
||||||
|
Pbindef(\perc1, \amp, 0.4)
|
||||||
|
Pbindef(\perc1, \dur, Pseq([1.5, 2.5] * 1,inf))
|
||||||
|
Pdef(\perc1).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\perc2).play
|
||||||
|
Pbindef(\perc2, \amp, 0.3)
|
||||||
|
Pbindef(\perc2, \dur, Pseq([Rest(1), 2, 4] * 2/3,inf))
|
||||||
|
Pdef(\perc2).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\perc3).play
|
||||||
|
//* Pstutter(6, Prand([1/8,1/4],inf)),
|
||||||
|
Pbindef(\perc3, \dur, Pseq([4,3,2,1],inf) * 1/8)
|
||||||
|
Pbindef(\perc3, \bufnum, ~getSmp.("perc01"))
|
||||||
|
Pdef(\perc3).stop
|
||||||
|
Pdef(\perc3).clear
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\hh1).play
|
||||||
|
(Pbindef(\hh1, \dur, Pseq([
|
||||||
|
1/4, 1/4, 1/8, 1/4, 1/8, 1/8, 1/8, 1/4,
|
||||||
|
1/6, 1/6, 1/6, 1/6, 1/6, 1/12, 1/12
|
||||||
|
],inf)))
|
||||||
|
Pbindef(\hh1, \amp, 0.4)
|
||||||
|
Pbindef(\hh1, \bufnum, ~getSmp.("hh01"), \amp, 0.3)
|
||||||
|
Pdef(\hh1).stop
|
||||||
|
|
||||||
|
Pdef(\hh2).play
|
||||||
|
Pbindef(\hh2, \bufnum, ~getSmp.("hh06"), \amp, 0.4)
|
||||||
|
Pdef(\hh2).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\hh3).play
|
||||||
|
Pbindef(\hh3, \bufnum, ~getSmp.("hh05"))
|
||||||
|
Pbindef(\hh3, \amp, 0.4)
|
||||||
|
Pdef(\hh3).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\bd1).play
|
||||||
|
Pbindef(\bd1, \amp, 0.6)
|
||||||
|
Pbindef(\bd1, \dur, Pseq([3/4, 1, 1, 1, 1/4],inf))
|
||||||
|
Pbindef(\bd1, \dur, Pseq([3/4, 1, 1, 1, 1/8],inf)) // one 8th note shorter
|
||||||
|
Pbindef(\bd1, \bufnum, ~getSmp.("bd01"));
|
||||||
|
Pdef(\bd1).stop
|
||||||
|
Pbindef(\bd1, \dur, Pseq([1/4],32))
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\oh1).play
|
||||||
|
Pbindef(\oh1, \amp, 0.3)
|
||||||
|
Pbindef(\oh1, \dur, Prand([1/2,1,2,5/4],inf))
|
||||||
|
Pdef(\oh1).stop;
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\oh2).play
|
||||||
|
Pbindef(\oh2, \amp, 0.1, \dur, 3/4)
|
||||||
|
Pdef(\oh2).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\oh3).play
|
||||||
|
Pbindef(\oh3, \amp, 0.1, \dur, 5/4)
|
||||||
|
Pdef(\oh3).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\sn1).play;
|
||||||
|
Pbindef(\sn1, \amp, 0.8)
|
||||||
|
Pbindef(\sn1, \amp, 0.4, \dur, Pseq([Rest(1), Prand([1])],inf));
|
||||||
|
Pbindef(\sn1, \amp, 0.4, \dur, Pseq([Rest(1), Prand([0.5,1,1.5])],inf));
|
||||||
|
Pdef(\sn1).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\sn2).play
|
||||||
|
Pbindef(\sn2, \dur, Pseq([1/2,2,3/8,1],inf), \amp, 0.2)
|
||||||
|
Pdef(\sn2).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\sn3).play
|
||||||
|
Pbindef(\sn3, \dur, Pseq([1/2,2,3/8,1],inf), \amp, 0.7)
|
||||||
|
Pdef(\sn3).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\cl1).play
|
||||||
|
// Pbindef(\cl1, \dur, ...)
|
||||||
|
Pdef(\cl1).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\cl2).play
|
||||||
|
// Pbindef(\cl2, \dur, ...)
|
||||||
|
Pdef(\cl2).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\cl3).play
|
||||||
|
// Pbindef(\cl3, \dur, ...)
|
||||||
|
Pdef(\cl3).stop
|
||||||
|
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\gl1).play
|
||||||
|
// Pbindef(\gl1, \dur, ...)
|
||||||
|
Pbindef(\g1, \revWet, 1)
|
||||||
|
Pdef(\gl1).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\gl2).play
|
||||||
|
// Pbindef(\gl2, \dur, ...)
|
||||||
|
Pdef(\gl2).stop
|
||||||
|
|
||||||
|
//--
|
||||||
|
|
||||||
|
Pdef(\gl3).play
|
||||||
|
Pbindef(\gl3, \dur, Pseq([1,1,1,1,2]/8,inf))
|
||||||
|
Pbindef(\gl3, \amp, 0.2)
|
||||||
|
Pdef(\gl3).stop
|
||||||
|
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// =====================================================================
|
||||||
|
// SuperCollider Workspace
|
||||||
|
// =====================================================================
|
||||||
|
|
||||||
|
|
||||||
|
~soil1 = Synth(\granSoil, [\sndbuf, ~getSnd.("forest"), \dur, 0.0001, \fadeTime, 30, \amp, 0.5])
|
||||||
|
~soil1.set(\amp, 1)
|
||||||
|
~soil1.release(60)
|
||||||
|
|
||||||
|
e = Synth(\bgrain, [\bufnum, d, \amp, 0.05])
|
||||||
|
e.set(\amp, 0.1)
|
||||||
|
e.release(30)
|
||||||
|
|
||||||
|
~grain1 = Synth(\bgrain, [\out, ~reverBus, \bufnum, ~getSmp.("caretaker"), \amp, 0.005])
|
||||||
|
~grain1.set(\amp, 0.15)
|
||||||
|
~grain1.release(30)
|
||||||
|
|
||||||
|
~glgrain1 = Synth(\bgrain, [\out, ~reverBus, ~getSmp.("gl05"), \amp, 0.1])
|
||||||
|
~glgrain1.set(\amp, 0.5)
|
||||||
|
~glgrain1.release(30)
|
||||||
|
|
||||||
|
~lj = Synth(\bgrain, [\bufnum, ~getSmp.("Ljuben"), \amp, 0.1])
|
||||||
|
~lj.set(\amp, 0.2)
|
||||||
|
~lj.release(60)
|
||||||
|
|
||||||
|
~amy = Synth(\bgrain, [\bufnum, ~getSmp.("amywars"), \amp, 0.3 \rate, 1])
|
||||||
|
~amy.set(\amp, 1)
|
||||||
|
~amy.release(60)
|
||||||
|
|
||||||
|
~hS1 = Synth(\henonSynth1, [\out, ~reverBus, \amp, 0.3, \fadeTime, 10])
|
||||||
|
~hS1.set(\amp, 0.2 )
|
||||||
|
~hS1.set(\pan, -1 )
|
||||||
|
~hS1.set(\pan, -1 )
|
||||||
|
~hS1.release(60)
|
||||||
|
|
||||||
|
~hS2 = Synth(\henonSynth1, [\amp, 0.3, \fadeTime, 10])
|
||||||
|
~hS2.set(\pan, 1 )
|
||||||
|
~hS2.set(\amp, 0.1 )
|
||||||
|
~hS2.release(60)
|
||||||
|
|
||||||
|
~dH1 = Synth(\henonLsynth2, [\amp, 0.1, \fadeTime, 30])
|
||||||
|
~dH1.set(\amp, 0.8)
|
||||||
|
~dH1.release(120)
|
||||||
|
|
||||||
|
~esma = Synth(\bgrain, [\bufnum, ~getSmp.("esma1"), \amp, 0.1, \rate, 1])
|
||||||
|
~esma.set(\amp, 0.01)
|
||||||
|
~esma.set(\out, ~reverBus)
|
||||||
|
|
||||||
|
~bgr = Synth(\bgrain, [\bufnum, b, \amp, 0.1])
|
||||||
|
~bgr.set(\amp, 0.01)
|
||||||
|
|
||||||
|
~bgr2 = Synth(\bgrain, [\out, ~reverBus, \bufnum, b, \amp, 0.1, \rate, 1])
|
||||||
|
~bgr2.set(\amp, 0.05)
|
||||||
|
~bgr2.release(10)
|
||||||
|
|
||||||
|
~cgr1 = Synth(\bgrain, [\bufnum, c, \amp, 0.2, \rate, 1 ])
|
||||||
|
~cgr1.set(\amp, 0.05)
|
||||||
|
|
||||||
|
Pdef(\bsln1).play.quant_(1);
|
||||||
|
Pbindef(\bsln1, \dur, Pseq([1,2,3] * 1/4, inf))
|
||||||
|
Pbindef(\bsln1, \amp, 0.05)
|
||||||
|
Pbindef(\bsln1, \degree, Pseq([2,2,4,1], inf))
|
||||||
|
Pbindef(\bsln1, \legato, 1, \releaseTime, 0.01)
|
||||||
|
|
||||||
|
Pdef(\bsln1).stop;
|
||||||
|
Pdef(\bsln1).stop;
|
||||||
|
|
||||||
|
Pdef(\strng1).play;
|
||||||
|
Pdef(\strng1).stop;
|
||||||
|
Pbindef(\strng1, \degree, 2)
|
||||||
|
Pbindef(\strng1, \oct, Pseq([[6,5,7], [4,5,7], [7,5,4]] -1,inf))
|
||||||
|
Pbindef(\strng1, \oct, 3)
|
||||||
|
Pbindef(\strng1, \oct, 0)
|
||||||
|
Pbindef(\strng1, \dur, Pseq([3,2,1] * 2/6,inf))
|
||||||
|
|
||||||
|
Pbindef(\strng1, \mtranspose, Pstutter(12, Pseq([1, 0, -2, 3, -3],inf)))
|
||||||
|
Pbindef(\strng1, \mtranspose, Pseq([1, 0, -2, 3, -3],inf))
|
||||||
|
Pbindef(\strng1, \mtranspose, Pseq([1, 0, -2, 3, -3],inf))
|
||||||
|
Pbindef(\strng1, \mtranspose, 1)
|
||||||
|
Pbindef(\strng1, \degree, 2)
|
||||||
|
P
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,669 @@
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\bufCyc, {
|
||||||
|
arg bufnum, gate=1, freq=440, chanDetune=1, out=0, amp = 1, attackTime=0.01, releaseTime=1;
|
||||||
|
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
env = Linen.kr(gate, attackTime:attackTime, releaseTime:releaseTime, doneAction:2);
|
||||||
|
|
||||||
|
freq = [freq, freq * (1 + (chanDetune * 0.0005))];
|
||||||
|
|
||||||
|
snd = BufRd.ar(
|
||||||
|
numChannels: 1,
|
||||||
|
bufnum: bufnum,
|
||||||
|
//phase: LFSaw.ar(BufDur.ir(bufnum).reciprocal).range(0, BufFrames.ir(bufnum)),
|
||||||
|
phase: LFSaw.ar(freq).range(0, BufFrames.ir(bufnum)),
|
||||||
|
loop: 1,
|
||||||
|
interpolation: 2);
|
||||||
|
|
||||||
|
snd = snd * amp * env;
|
||||||
|
Out.ar(out, snd);
|
||||||
|
|
||||||
|
}).add;
|
||||||
|
)
|
||||||
|
|
||||||
|
Pdef(\x32).play
|
||||||
|
Pdef(\x32).fadeTime = 0;
|
||||||
|
(
|
||||||
|
Pdef(\x32,
|
||||||
|
Pbind(
|
||||||
|
\instrument, \bufCyc,
|
||||||
|
\bufnum, [~getSmp.value("0043"),~getSmp.value("0043")],
|
||||||
|
\octave, [3,2,4],
|
||||||
|
\degree, Pseq([2,2,4,1], inf),
|
||||||
|
\detune, [0.1,0],
|
||||||
|
\chanDetune, 20,
|
||||||
|
\dur, Pseq([0.20,0.40,0.60],inf),
|
||||||
|
\legato, 1,
|
||||||
|
\amp, [0.3,0.5,0.1] * 0.5,
|
||||||
|
\releaseTime, 0.01
|
||||||
|
));
|
||||||
|
)
|
||||||
|
|
||||||
|
Pdef(\x33).play
|
||||||
|
Pdef(\x33).fadeTime = 0;
|
||||||
|
(
|
||||||
|
Pdef(\x33,
|
||||||
|
Pbind(
|
||||||
|
\instrument, \bufCyc,
|
||||||
|
\bufnum, [~getSmp.value("0229"),~getSmp.value("0229")],
|
||||||
|
\octave, Prand([[6,5,7],[4,5,7],[7,5,4]],inf),
|
||||||
|
\degree, Pseq([[4,9],2,8,4,1], inf),
|
||||||
|
\mtranspose, Pseq([Pn([1],10),Pn([0],10)],inf),
|
||||||
|
\detune, [0,0.3],
|
||||||
|
\chanDetune, Pseq([-10,0,5,10,-5],inf),
|
||||||
|
\dur, Pseq([0.20,0.40,0.60],inf),
|
||||||
|
\legato, 0.1,
|
||||||
|
\amp, [0.3,0.5,0.1] * 0.1,
|
||||||
|
\releaseTime, Prand([1,2,3,4],inf)
|
||||||
|
));
|
||||||
|
)
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
s.scope
|
||||||
|
s.meter
|
||||||
|
x = Synth(\bufCyc, [\bufnum, ~getSmp.value("AKWF_0001"),\freq, 41.midicps, \chanDetune, 100]);
|
||||||
|
y = Synth(\BufCycle, [\bufnum, ~getSmp.value("AKWF_0001"),\freq, 42.midicps, \chanDetune, 0]);
|
||||||
|
x = Synth(\BufCycle, [\bufnum, ~getSmp.value("AKWF_0043"),\freq, 75]);
|
||||||
|
x = Synth(\BufCycle, [\bufnum, ~getSmp.value("AKWF_0001")]);
|
||||||
|
~getSmp.value("AKWF_0001").plot
|
||||||
|
|
||||||
|
s.makeGui
|
||||||
|
(
|
||||||
|
Ppar([
|
||||||
|
Pbind(
|
||||||
|
\instrument, \bufCyc,
|
||||||
|
\bufnum, ~getSmp.value("AKWF_0043"),
|
||||||
|
\octave, 4,
|
||||||
|
\degree, Pseq([2,5,4,1], inf),
|
||||||
|
\detune, -1,
|
||||||
|
\dur, 1,
|
||||||
|
\legato, 0.5,
|
||||||
|
\amp, 0.5,
|
||||||
|
\releaseTime, 0.5
|
||||||
|
),
|
||||||
|
|
||||||
|
Pbind(
|
||||||
|
\instrument, \bufCyc,
|
||||||
|
\bufnum, ~getSmp.value("AKWF_0043"),
|
||||||
|
\octave, 4,
|
||||||
|
\degree, Pseq([2,5,4,1], inf),
|
||||||
|
\detune, 0,
|
||||||
|
\dur, 1,
|
||||||
|
\legato, 0.5,
|
||||||
|
\amp, 0.5,
|
||||||
|
\releaseTime, 0.5
|
||||||
|
)]).play;
|
||||||
|
)
|
||||||
|
|
||||||
|
s.scope
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{SinOsc.ar(75) * [0,0.5]}.play
|
||||||
|
x.free
|
||||||
|
|
||||||
|
a = { 10.rand }; b = a.reciprocal; postln("a: " + a.value); postln("1/" + a.value + " = " + b.value);
|
||||||
|
|
||||||
|
3.reciprocal
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
~smpBuffers.postln;
|
||||||
|
|
||||||
|
x = Synth(\softSaw);
|
||||||
|
x.release
|
||||||
|
|
||||||
|
y = Synth(\granulator, [\bufnum, ~smpBuffers.at(0)])
|
||||||
|
y.set(\amp,0.4)
|
||||||
|
y.set(\spread,1)
|
||||||
|
y.set(\pan, 0)
|
||||||
|
y.set(\gate, 0)
|
||||||
|
|
||||||
|
// how to match filename to bufnum
|
||||||
|
z = Synth(\bufPlayer, [\bufnum, ~smpBuffers.at("Ljuben Dimkaroski plays the Divje Babe Bone Flute-AZCWFcyxUhQ.wav")])
|
||||||
|
z = Synth(\bufPlayer, [\bufnum, ~smpBuffers.detect { |buf| buf.path == "/home/random/Cloud/cloud.tmp.si/Projects/ark'd betwix/scd/smp/Ljuben Dimkaroski plays the Divje Babe Bone Flute-AZCWFcyxUhQ.wav" }])
|
||||||
|
z = Synth(\bufPlayer, [\bufnum, ~smpBuffers.detect { |buf| "Divje Babe Bone Flute".matchRegexp(buf.path) }])
|
||||||
|
z = Synth(\bufPlayer, [\bufnum, ~getSmp.value("Divje Babe Bone Flute")])
|
||||||
|
~getSmp.value("AKWF_0043"),
|
||||||
|
~smpBuffers.detect { |buf| buf.path == .... }
|
||||||
|
|
||||||
|
z.free
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
~smpBuffers.dump
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
~smpBuffers[1].plot
|
||||||
|
|
||||||
|
// buffer oscilator
|
||||||
|
(
|
||||||
|
Ndef(\bosc, {
|
||||||
|
var buffer = ~getSmp.value("AKWF_0001"), freq = 30, oscDetune = 1.01, amp = 0.2;
|
||||||
|
BufRd.ar(1, bufnum:buffer, phase: LFSaw.ar([freq,freq*oscDetune]) * BufFrames.ir(buffer)) * amp
|
||||||
|
//+ SinOsc.ar(60.2) * 0.5;
|
||||||
|
} );
|
||||||
|
)
|
||||||
|
|
||||||
|
Ndef(\bosc).play
|
||||||
|
Ndef(\bosc).fadeTime=2;
|
||||||
|
Ndef(\bosc).clear
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// creating buffers and filling them with waveforms
|
||||||
|
|
||||||
|
a = Harmonics.new(16); // just returns an instance of Harmonics with size
|
||||||
|
b = Buffer.alloc(s, 512, 1);
|
||||||
|
(
|
||||||
|
z = SynthDef("help-Osc",{ arg out=0,bufnum=0;
|
||||||
|
Out.ar(out,
|
||||||
|
LeakDC.ar(
|
||||||
|
Osc.ar(bufnum, [50,50.2], 0, 0.5) +
|
||||||
|
Osc.ar(bufnum, [50.01,50.21], 0, 0.5)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
});
|
||||||
|
)
|
||||||
|
a.ramp(1.0, 2.0);
|
||||||
|
a.ramp(0.5, -0.025)
|
||||||
|
|
||||||
|
(
|
||||||
|
b.sine2(
|
||||||
|
freqs: a.ramp(1,1).postln,
|
||||||
|
amps: a.ramp(0, 0.01).postln,
|
||||||
|
amps: [0.8,0,0.1,0,0,0.1,0,0,0.01,0,0.01,0,0.02,0,0,0].postln,
|
||||||
|
normalize:false, asWavetable:true, clearFirst:true);
|
||||||
|
)
|
||||||
|
b.plot
|
||||||
|
|
||||||
|
|
||||||
|
a.formant(6, 4);
|
||||||
|
(
|
||||||
|
b.sine2(
|
||||||
|
freqs: a.ramp(0,0.1).postln,
|
||||||
|
amps: a.ramp(1,3),
|
||||||
|
normalize:true, asWavetable:true, clearFirst:true).plot;
|
||||||
|
)
|
||||||
|
b.sine2(a.ramp(1.0,0.1).postln, a.geom(1.2), true, true, true);
|
||||||
|
c = b.plot;
|
||||||
|
|
||||||
|
y = z.play(s,[\out, 0, \bufnum, b]);
|
||||||
|
y.free;
|
||||||
|
|
||||||
|
{SinOsc.ar()}.play
|
||||||
|
|
||||||
|
(
|
||||||
|
z = SynthDef("help-Osc",{ arg out=0,bufnum=0;
|
||||||
|
Out.ar(out,
|
||||||
|
Osc.ar(bufnum, 200, 0, 0.5)
|
||||||
|
)
|
||||||
|
});
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
a.ramp(1.0, 1.0); // returns a harmonic series
|
||||||
|
|
||||||
|
b = Buffer.alloc(s, 512, 1);
|
||||||
|
// harmonic series for freqs, ramp down for amps
|
||||||
|
b.sine2(a.ramp(1.0, 1.0).postln, a.ramp(0.5, -0.025).postln, true, true, true);
|
||||||
|
(
|
||||||
|
z = SynthDef("help-Osc",{ arg out=0,bufnum=0;
|
||||||
|
Out.ar(out,
|
||||||
|
Osc.ar(bufnum, 200, 0, 0.5)
|
||||||
|
)
|
||||||
|
});
|
||||||
|
)
|
||||||
|
y = z.play(s,[\out, 0, \bufnum, b]);
|
||||||
|
y.free;
|
||||||
|
|
||||||
|
a.decay(1.0);
|
||||||
|
|
||||||
|
b.sine2(a.rand(0.1, 0.9).postln, a.rand(0,1).postln, true, true, true);
|
||||||
|
b.plot
|
||||||
|
y = z.play(s,[\out, 0, \bufnum, b]);
|
||||||
|
y.free;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a.teeth(6, 4);
|
||||||
|
|
||||||
|
b.sine2(a.teeth(6, 4).postln, a.teett(2.2).postln, true, true, true);
|
||||||
|
y = z.play(s,[\out, 0, \bufnum, b]);
|
||||||
|
b.sine2(a.teeth(9, 1).postln, a.geom(1.2), true, true, true);
|
||||||
|
b.sine2(a.teeth(1, 3).postln, a.geom(1.2), true, true, true);
|
||||||
|
b.sine2(a.teeth(2, 3).postln, a.geom(1.2), true, true, true);
|
||||||
|
y.free;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// create a stere bus of verbDelayFX
|
||||||
|
~reverBus = Bus.audio(s,2);
|
||||||
|
|
||||||
|
|
||||||
|
Ndef(\ba).play(~reverBus, addAction: \addToHead)
|
||||||
|
|
||||||
|
// reverb delay
|
||||||
|
~reverbDelay = Synth(\verbDelayFX, [\inBus, ~reverBus, \outBus, 0], addAction: \addAfter);
|
||||||
|
~reverbDelay = Synth(\verbDelayFX, [\inBus, ~reverBus, \outBus, 0], addAction: \addToTail);
|
||||||
|
~reverbDelay = Synth(\verbDelayFX, [\inBus, ~reverBus, \outBus, 0]);
|
||||||
|
|
||||||
|
~reverbDelay.set(\revWet, 1);
|
||||||
|
~reverbDelay.set(\dlyWet, 0.5);
|
||||||
|
|
||||||
|
~reverbDelay.free
|
||||||
|
|
||||||
|
|
||||||
|
Ndef(\ba).fadeTime=0.01; // for Patterns we don't want crossfade, but quantization
|
||||||
|
|
||||||
|
// set default quant
|
||||||
|
Ndef(\ba).proxyspace.quant = 2;
|
||||||
|
|
||||||
|
(
|
||||||
|
Ndef(\ba,
|
||||||
|
Pbindf(
|
||||||
|
Ppar([
|
||||||
|
Pbind(
|
||||||
|
\octave, [4,5,7],
|
||||||
|
\amp, [0.1,0.2,0.005],
|
||||||
|
\degree, Pseq([0,3,4,2,6,Prand([3,4,2,6])], inf),
|
||||||
|
\dur, Prand([1,0.5,2], 250),
|
||||||
|
),
|
||||||
|
Pbind(
|
||||||
|
\octave, [3,6],
|
||||||
|
\degree, Pseq([[0,-3],4,6,3,2], inf),
|
||||||
|
\dur, Pseq([Rest(30),Pseq([3.5,5], 30)]),
|
||||||
|
//\dur, Pseq([3.5,5], 30),
|
||||||
|
\amp, 0.05,
|
||||||
|
\legato, 0.6,
|
||||||
|
\attackTime, 2,
|
||||||
|
\releaseTime, 2,
|
||||||
|
)]),
|
||||||
|
// common parameters
|
||||||
|
\instrument, \sinPulz,
|
||||||
|
\oscDetune, Prand([1,3,5,7]*0.01, inf),
|
||||||
|
\scale, Pseq([Scale.minor.tuning_(\et12),Scale.minor.tuning_(\et12),Scale.minor.tuning_(\just)],inf),
|
||||||
|
\cutoff, Prand([0.5,1,1.5], inf),
|
||||||
|
\mtranspose, Pseq([Pn([1],30),Pn([2],10),Pn([1],20),Pn([0],5)],inf),
|
||||||
|
\out, ~reverBus
|
||||||
|
))
|
||||||
|
)
|
||||||
|
|
||||||
|
Ndef(\ba).play
|
||||||
|
|
||||||
|
Tuning.directory
|
||||||
|
Ndef(\ba).stop(1);
|
||||||
|
Ndef(\ba).clear;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//testng patterns
|
||||||
|
|
||||||
|
(
|
||||||
|
Pbind(
|
||||||
|
\instrument, \softSaw,
|
||||||
|
\octave, 2,
|
||||||
|
\degree, Pseq([2,5,4,1], inf),
|
||||||
|
\dur, 3,
|
||||||
|
\legato, 1,
|
||||||
|
\amp, 0.5,
|
||||||
|
\releaseTime, 0
|
||||||
|
).play;
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// PlayBufer:
|
||||||
|
(
|
||||||
|
SynthDef(\bufPlayer, {|out = 0, bufnum = 0 |
|
||||||
|
Out.ar(out,
|
||||||
|
PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum), loop: 1.0)
|
||||||
|
)
|
||||||
|
}).play(s, [\bufnum, ~smpBuffers.at(0)]);
|
||||||
|
)
|
||||||
|
|
||||||
|
~bufplay = Synth(\bufPlayer, [ \bufnum, ~smpBuffers.at(0)])
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\granulator, {
|
||||||
|
arg out = 0, bufnum = ~smpBuffers.ar(2), dur=0.2, freq=140, amp=0.2;
|
||||||
|
var snd;
|
||||||
|
|
||||||
|
snd = GrainBuf.ar(numChannels: 2,
|
||||||
|
trigger: Impulse.kr(freq * LFNoise0.kr(freq).range(0.5,1.5)),
|
||||||
|
dur: dur,
|
||||||
|
sndbuf: bufnum,
|
||||||
|
rate: [0.2,0.3,0.4,0.5],
|
||||||
|
pos:LFTri.ar(0.0001, iphase:[0.5,1,0,2]).range(0,1),
|
||||||
|
interp: 4,
|
||||||
|
maxGrains: 1024,
|
||||||
|
pan: [
|
||||||
|
LFNoise1.kr(0.1).range(-1,1),
|
||||||
|
LFNoise1.kr(0.1).range(-1,1),
|
||||||
|
LFNoise1.kr(0.1).range(-1,1),
|
||||||
|
LFNoise1.kr(0.1).range(-1,1)
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
snd = Splay.ar(snd, spread:1);
|
||||||
|
|
||||||
|
Out.ar(out, snd * amp);
|
||||||
|
}).play;
|
||||||
|
)
|
||||||
|
|
||||||
|
~smpBuffers.do(_.free);
|
||||||
|
~smpBuffers.at(0).free;
|
||||||
|
s.meter
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef("sawM", {
|
||||||
|
arg out=0, freq=90, gate=1, fadeTime=1, amp=0.5;
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
snd = Saw.ar({freq/2 * LFNoise1.ar().range(0.95,1.05) } ! 2)
|
||||||
|
+ Saw.ar({freq * LFNoise1.ar().range(0.95,1.05) } ! 2, )
|
||||||
|
//+ (Saw.ar({freq * 2 * LFNoise1.ar().range(0.95,1.05) } ! 2) * 0.4)
|
||||||
|
// + (Saw.ar({freq * 4 * LFNoise1.ar().range(0.95,1.05) } ! 2) * 0.2)
|
||||||
|
;
|
||||||
|
//snd = Saw.ar({freq/2 * LFNoise1.ar().range(0.95,1.05)} ! 4);
|
||||||
|
//snd = snd + Saw.ar([freq/2,freq]/2 * LFNoise1.ar().range(0.95,1.05))!3;
|
||||||
|
snd = Splay.ar(snd, spread:1, level:1, center:0);
|
||||||
|
env = EnvGen.kr( Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
|
||||||
|
gate, doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = snd * env * amp;
|
||||||
|
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).play;
|
||||||
|
);
|
||||||
|
s.scope
|
||||||
|
|
||||||
|
// load samples
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// load busses
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// load patterns
|
||||||
|
|
||||||
|
2.rand
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
x = { arg spread=1, level=1, center=0.0;
|
||||||
|
Splay.ar(
|
||||||
|
SinOsc.ar( { |i| LFNoise2.kr(1).exprange(200, 4000) } ! 10) * -12.dbamp,
|
||||||
|
spread,
|
||||||
|
level,
|
||||||
|
center
|
||||||
|
);
|
||||||
|
}.play;
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
|
||||||
|
|
||||||
|
(
|
||||||
|
x = {
|
||||||
|
arg out = 0, bufnum, dur=0.2, freq=140, amp=0.5;
|
||||||
|
var snd;
|
||||||
|
|
||||||
|
snd = GrainBuf.ar(numChannels: 2,
|
||||||
|
trigger: Impulse.kr(freq * LFNoise0.kr(freq).range(0.5,1.5)),
|
||||||
|
dur: dur,
|
||||||
|
sndbuf: bufnum,
|
||||||
|
rate: [0.2,0.3,0.4,0.5],
|
||||||
|
pos:LFTri.ar(0.01, iphase:[0.5,1,0,2]).range(0,1),
|
||||||
|
interp: 4
|
||||||
|
);
|
||||||
|
|
||||||
|
//snd = [snd.at(0),snd.at(1)] + [snd.at(3),snd.at(2)] * 0.2;
|
||||||
|
snd = Splay.ar(snd * amp, spread:1);
|
||||||
|
//Mix(snd * 0.25);
|
||||||
|
|
||||||
|
//Out.ar(out, snd);
|
||||||
|
}.play(s,[\bufnum, b]);
|
||||||
|
)
|
||||||
|
|
||||||
|
s.scope
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ Mix.new([ PinkNoise.ar(0.1), FSinOsc.ar(801, mul:0.1), LFSaw.ar(40, mul:0.1)]) }.play
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
play({
|
||||||
|
VarSaw.ar(
|
||||||
|
freq: LFPulse.kr([1,4], 0, 0.3, 200, 200), // freq
|
||||||
|
iphase: 0,
|
||||||
|
width: LFTri.kr(0.2).range(0,1), //width
|
||||||
|
mul: 0.1)
|
||||||
|
});
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
play({
|
||||||
|
VarSaw.ar([50,50.5], 0, SinOsc.kr(0.01,1).range(0.05,0.95), 0.5)!2
|
||||||
|
+ VarSaw.ar([101,99.3], 0, SinOsc.kr(0.06,0).range(0.2,0.8) , 0.5)!2 * 0.2
|
||||||
|
});)
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\softSaw, {
|
||||||
|
arg out = 0, freq = 40, detune = 0.1, amp = 1, pan = 0,
|
||||||
|
gate = 1, attackTime = 0.1, susLevel = 1.0, releaseTime = 1.0;
|
||||||
|
var env, snd;
|
||||||
|
detune = detune * 0.1;
|
||||||
|
amp = amp * 0.4;
|
||||||
|
|
||||||
|
env = Linen.kr(gate, attackTime, susLevel, releaseTime);
|
||||||
|
|
||||||
|
snd = VarSaw.ar(
|
||||||
|
freq: [freq, freq * (1.003+detune)],
|
||||||
|
width: SinOsc.kr(0.01,0.2).range(0.05,0.095));
|
||||||
|
snd = snd + VarSaw.ar(
|
||||||
|
freq: [(freq*2 * (1.001-detune)),(freq*2 * (1+detune))],
|
||||||
|
width: SinOsc.kr(0.06,0.8).range(0.2,0.8));
|
||||||
|
|
||||||
|
|
||||||
|
snd = Balance2.ar(snd.at(0), snd.at(1), pos: pan);
|
||||||
|
|
||||||
|
snd = snd * amp * env;
|
||||||
|
|
||||||
|
Out.ar(out, snd);
|
||||||
|
|
||||||
|
}).play);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Linen.kr()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\granulator, {
|
||||||
|
|
||||||
|
arg out = 0, bufnum = ~getSmp.value("AKWF_0042"), grainDur=0.2, grainFreq=40, amp=0.2,
|
||||||
|
gate = 1, attackTime = 0.1, susLevel = 1.0, releaseTime = 1.0,
|
||||||
|
spread = 1, pan = 0, seed = 1924, id=0;
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
RandID.ir(id);
|
||||||
|
RandSeed.ir(1, seed);
|
||||||
|
spread = spread * abs(abs(pan)-1);
|
||||||
|
|
||||||
|
env = Linen.kr(gate, attackTime, susLevel, releaseTime);
|
||||||
|
snd = GrainBuf.ar(numChannels: 1,
|
||||||
|
trigger: Impulse.kr(grainFreq * LFNoise0.kr(grainFreq).range(0.5,1.5)),
|
||||||
|
dur: grainDur,
|
||||||
|
sndbuf: bufnum,
|
||||||
|
//rate: [0.2,0.3,0.4,0.5],
|
||||||
|
rate: 1,
|
||||||
|
pos:LFTri.ar(0.0001, iphase:[IRand(0,1),IRand(0,1),IRand(0,1),IRand(0,1)]).range(0,1),
|
||||||
|
interp: 4,
|
||||||
|
maxGrains: 1024,
|
||||||
|
pan: [ LFNoise1.kr(0.1).range(-1,1),
|
||||||
|
LFNoise1.kr(0.1).range(-1,1),
|
||||||
|
LFNoise1.kr(0.1).range(-1,1),
|
||||||
|
LFNoise1.kr(0.1).range(-1,1) ]
|
||||||
|
);
|
||||||
|
snd = Splay.ar(snd, spread:spread, level:amp, center: pan);
|
||||||
|
snd = snd * env;
|
||||||
|
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).play;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\amodulor, {
|
||||||
|
arg out = 0;
|
||||||
|
var snd;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
snd = Pan2.ar(snd);
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).play;
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Ndef(\amodulor).play;
|
||||||
|
Ndef(\amodulor).fadeTime = 1;
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\amodulor, {
|
||||||
|
var snd, freq, ampmod;
|
||||||
|
freq = Env.new([500, 70, 40],[0.02, 1]).kr;
|
||||||
|
ampmod = LFSaw.ar(SinOsc.kr(0.1).range(22,39)).range(0,1);
|
||||||
|
snd = SinOsc.ar([freq,freq*1.9], mul:ampmod) * Env.perc(0.01, 1).kr(2)!2;
|
||||||
|
snd = LPF.ar(snd, Env.perc(0.001,0.3).kr(0) * 5000 + 200);
|
||||||
|
Out.ar(0, snd * 0.5);
|
||||||
|
}).add;
|
||||||
|
)
|
||||||
|
|
||||||
|
Pdef(\kicker).play(t)
|
||||||
|
|
||||||
|
TempoClock.default = 90/60;
|
||||||
|
t = TempoClock.tempo = 90/60;
|
||||||
|
TempoClock.default;
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\kicker, Ppar([
|
||||||
|
Pbind(\instrument, \amodulor,
|
||||||
|
\dur, Pseq([3/4,2/4,4/4,4/4,1/8,2/4,1/8], inf)
|
||||||
|
|
||||||
|
),
|
||||||
|
Pbind(\instrument, \sn,
|
||||||
|
\dur, Pseq([Rest(1),4/4]/2, inf),
|
||||||
|
\amp, 0.7
|
||||||
|
//\dur, 1
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
]))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
{SinOsc.ar * 0}.play
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
|
||||||
|
// LOADS ALL .scd files in lib/ folder and samples in smp/ folder
|
||||||
|
|
||||||
|
// library path
|
||||||
|
var libPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "lib");
|
||||||
|
// samples path
|
||||||
|
var smpPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "smp");
|
||||||
|
|
||||||
|
|
||||||
|
// load samples
|
||||||
|
"\n--- load samples: ...".postln;
|
||||||
|
|
||||||
|
// free all buffers to restart buffer count
|
||||||
|
~smpBuffers.do(_.free);
|
||||||
|
|
||||||
|
// create Dictionary
|
||||||
|
~smpBuffers = Dictionary();
|
||||||
|
|
||||||
|
// iterate over each file in the folder
|
||||||
|
smpPath.filesDo({ |smpfile,i|
|
||||||
|
|
||||||
|
// tell me what you are loading:
|
||||||
|
postln(" " + i + smpfile.fileName );
|
||||||
|
|
||||||
|
// add a sample into a buffer, store object to Dictionary
|
||||||
|
~smpBuffers.add(smpfile.fileName -> Buffer.readChannel(s,
|
||||||
|
smpfile.fullPath, channels:[0]));
|
||||||
|
});
|
||||||
|
|
||||||
|
// load libs
|
||||||
|
"\n--- load libs: ...".postln;
|
||||||
|
|
||||||
|
// for each files in that lib folder
|
||||||
|
libPath.filesDo({|afile|
|
||||||
|
// tell me what you're executing:
|
||||||
|
postln(" ." + afile.fileName);
|
||||||
|
|
||||||
|
// execute it:
|
||||||
|
this.executeFile(afile.fullPath);
|
||||||
|
});
|
||||||
|
|
||||||
|
"\n\n=== \n".postln;
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
SynthDef(\bufCyc, {
|
||||||
|
arg bufnum, gate=1, freq=440, chanDetune=1, out=0, amp = 1,
|
||||||
|
attackTime=0.01, releaseTime=1
|
||||||
|
//, lpf=10, freso=0, fdist=0
|
||||||
|
;
|
||||||
|
var snd, env, lpfreq;
|
||||||
|
|
||||||
|
env = Linen.kr(gate, attackTime:attackTime, releaseTime:releaseTime, doneAction:2);
|
||||||
|
freq = [freq, freq * (1 + (chanDetune * 0.0005))];
|
||||||
|
snd = BufRd.ar(
|
||||||
|
numChannels: 1,
|
||||||
|
bufnum: bufnum,
|
||||||
|
phase: LFSaw.ar(freq).range(0, BufFrames.ir(bufnum)),
|
||||||
|
loop: 1,
|
||||||
|
interpolation: 2);
|
||||||
|
|
||||||
|
/* lpfreq = freq * lpf;
|
||||||
|
lpfreq = lpfreq.max(100);
|
||||||
|
lpfreq = lpfreq.min(18000);
|
||||||
|
|
||||||
|
//snd = RLPFD.ar(snd, lpfreq, freso, fdist) * 3;
|
||||||
|
*/
|
||||||
|
|
||||||
|
snd = snd * amp * env;
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,3 +5,21 @@ SynthDef(\bufPlayer, {|out = 0, bufnum = 0 |
|
||||||
)
|
)
|
||||||
}).add;
|
}).add;
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\smplr, {|out = 0, revBus, bufnum = 0, gate = 1, amp = 1, pan = 0, rate = 1, revWet = 0 |
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
snd = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum) * rate, loop: 0);
|
||||||
|
env = EnvGen.kr(envelope: Env.cutoff(0.001,1), gate: gate, doneAction:Done.freeSelf);
|
||||||
|
snd = snd * env * amp;
|
||||||
|
snd = Pan2.ar(snd, pan);
|
||||||
|
Out.ar(out, snd);
|
||||||
|
|
||||||
|
//Out.ar(revBus * revWet, snd);
|
||||||
|
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,226 @@
|
||||||
|
|
||||||
|
// "additive synth kick"
|
||||||
|
SynthDef(\addbd, {
|
||||||
|
arg out=0, freq=77, amp=0.1;
|
||||||
|
var osc, clip, env, penv, nenv;
|
||||||
|
|
||||||
|
penv = EnvGen.ar(
|
||||||
|
Env(levels: [1, 1, 0.5 ], times:[ 0.01, 0.3 ], curve:[0,0])
|
||||||
|
);
|
||||||
|
osc = FSinOsc.ar([freq,freq*1.01] * penv);
|
||||||
|
|
||||||
|
nenv = EnvGen.ar(Env(levels:[1,1,0], times:[0.001,0.008], curve:0));
|
||||||
|
osc = osc + (BPF.ar(WhiteNoise.ar(0.05), freq * 100,0.1) * nenv);
|
||||||
|
osc = osc + (BPF.ar(WhiteNoise.ar(0.05), freq * 70,0.1) * nenv);
|
||||||
|
osc = osc + (BPF.ar(WhiteNoise.ar(0.1), freq * 33,0.1) * nenv);
|
||||||
|
|
||||||
|
osc = osc + (BPF.ar(WhiteNoise.ar(0.1), freq * 19, 0.3)
|
||||||
|
* EnvGen.ar(Env(levels: [1,1,0], times: [0.1,1], curve:-9)) * 0.1
|
||||||
|
);
|
||||||
|
|
||||||
|
env = EnvGen.ar(Env.perc(0, 0.55), doneAction: 2);
|
||||||
|
osc = osc * env;
|
||||||
|
osc = osc.softclip;
|
||||||
|
Out.ar(out, Pan2.ar(osc[0]+osc[1] * amp, 0));
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
(
|
||||||
|
// "LFTri bass drum kick" - by luka@lukaprincic.si
|
||||||
|
SynthDef(\tribd, {
|
||||||
|
arg out=0, gate=1, freq=77, amp=0.1;
|
||||||
|
var snd, aenv, fenv, senv;
|
||||||
|
|
||||||
|
fenv = Env(levels:[2, 1.2, 0], times: [0.1, 0.4]).kr;
|
||||||
|
freq = [freq,freq*2] * fenv;
|
||||||
|
freq = freq.max(10);
|
||||||
|
|
||||||
|
snd = LFTri.ar(freq) + SinOsc.ar(freq) * [1,0.3];
|
||||||
|
snd = snd.sum * 0.9;
|
||||||
|
snd = LPF.ar(snd, freq * 4);
|
||||||
|
|
||||||
|
snd = snd + RLPF.ar( BrownNoise.ar(1),
|
||||||
|
Env(levels:[2000,500,90], times:[0.01,0.05]).kr, 0.3 );
|
||||||
|
|
||||||
|
snd = snd + ( BPF.ar(WhiteNoise.ar(0.9), 3000)
|
||||||
|
* Env([1,1,0], [0.004,0.005]).kr );
|
||||||
|
snd = snd + ( BPF.ar(WhiteNoise.ar(2), 9000)
|
||||||
|
* Env([1,1,0], [0.013,0.001]).kr );
|
||||||
|
|
||||||
|
aenv = Env([1,1,0], [0.2,2], curve: -9).kr;
|
||||||
|
snd = snd * aenv;
|
||||||
|
snd = Limiter.ar(snd, 8);
|
||||||
|
|
||||||
|
senv = Linen.kr(releaseTime: 0.1, gate: gate, doneAction: Done.freeSelf);
|
||||||
|
snd = LeakDC.ar(snd);
|
||||||
|
snd = snd * amp * senv;
|
||||||
|
snd = Pan2.ar(snd, pos:0);
|
||||||
|
snd = snd.clip2;
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// SC-808 drum kit
|
||||||
|
|
||||||
|
// SC808 drum snare
|
||||||
|
SynthDef.new(\sc808sn, {
|
||||||
|
arg amp=2, tone=340, tone2=189, snappy=0.7, gate=1, amp2=1, out=0;
|
||||||
|
var noiseEnv, atkEnv, sig, noise, osc1, osc2, sum;
|
||||||
|
noiseEnv = EnvGen.kr(Env.perc(0.001, 4.2, 1, -115), doneAction:0);
|
||||||
|
atkEnv = EnvGen.kr(Env.perc(0.001, 0.8,curve:-95), doneAction:2);
|
||||||
|
noise = WhiteNoise.ar;
|
||||||
|
noise = HPF.ar(noise, 1800);
|
||||||
|
noise = LPF.ar(noise, 8850);
|
||||||
|
noise = noise * noiseEnv * snappy;
|
||||||
|
osc1 = SinOsc.ar(tone2, pi/2) * 0.6;
|
||||||
|
osc2 = SinOsc.ar(tone, pi/2) * 0.7;
|
||||||
|
sum = (osc1+osc2) * atkEnv * amp2;
|
||||||
|
sig = Pan2.ar(((noise*1) + sum) * amp * 2.5, 0);
|
||||||
|
sig = HPF.ar(sig, 340);
|
||||||
|
Out.ar(out, sig);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
SynthDef.new(\sc808clap, {
|
||||||
|
arg amp=1, gate=0, out=0;
|
||||||
|
var atkenv, atk, decay, sum, denv;
|
||||||
|
atkenv = EnvGen.kr(Env.new([0.5,1,0],[0, 0.3], -160), doneAction:2);
|
||||||
|
denv = EnvGen.kr(Env.dadsr(0.026, 0, 6, 0, 1, 1, curve:-157), doneAction:0);
|
||||||
|
atk = WhiteNoise.ar * atkenv * 1.4;
|
||||||
|
decay = WhiteNoise.ar * denv;
|
||||||
|
sum = atk + decay * amp;
|
||||||
|
sum = HPF.ar(sum, 500);
|
||||||
|
sum = BPF.ar(sum, 1062, 0.5);
|
||||||
|
Out.ar(out, Pan2.ar(sum * 1.5, 0));
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
SynthDef.new(\sc808rimshot, {
|
||||||
|
arg amp=1, out=0;
|
||||||
|
var fenv, env, sig, punch, tri1, tri2;
|
||||||
|
env = EnvGen.kr(Env.new([1, 1, 0], [0.00272, 0.07], -42), doneAction:2);
|
||||||
|
tri1 = LFTri.ar(1667 * 1.1, 1) * env;
|
||||||
|
tri2 = LFPulse.ar(455 * 1.1, width:0.8) * env;
|
||||||
|
punch = WhiteNoise.ar * env * 0.46;
|
||||||
|
sig = tri1 + tri2 + punch;
|
||||||
|
sig = BPeakEQ.ar(sig, 464, 0.44, 8);
|
||||||
|
sig = HPF.ar(sig, 315);
|
||||||
|
sig = LPF.ar(sig, 7300);
|
||||||
|
sig = Pan2.ar(sig * amp, 0);
|
||||||
|
Out.ar(out, sig);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
SynthDef.new(\sc808claves, {
|
||||||
|
arg amp=1, out=0;
|
||||||
|
var env, sig;
|
||||||
|
env = EnvGen.kr(Env.new([1, 1, 0], [0, 0.1], -20), doneAction:2);
|
||||||
|
sig = SinOsc.ar(2500, pi/2) * env * amp;
|
||||||
|
sig = Pan2.ar(sig, 0);
|
||||||
|
Out.ar(out, sig);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
SynthDef.new(\sc808cow, {
|
||||||
|
arg amp=1, out=0;
|
||||||
|
var sig, pul1, pul2, env, atk, atkenv, datk;
|
||||||
|
atkenv = EnvGen.kr(Env.perc(0, 1, 1, -215),doneAction:0);
|
||||||
|
env = EnvGen.kr(Env.perc(0.01, 9.5, 1, -90),doneAction:2);
|
||||||
|
pul1 = LFPulse.ar(811.16);
|
||||||
|
pul2 = LFPulse.ar(538.75);
|
||||||
|
atk = (pul1 + pul2) * atkenv * 6;
|
||||||
|
datk = (pul1 + pul2) * env;
|
||||||
|
sig = (atk + datk) * amp;
|
||||||
|
sig = HPF.ar(sig, 250);
|
||||||
|
sig = LPF.ar(sig, 4500);
|
||||||
|
sig = Pan2.ar(sig, 0);
|
||||||
|
Out.ar(out, sig);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
SynthDef.new(\sc808hh, {
|
||||||
|
arg decay=0.42, amp=1, pan=0, out=0;
|
||||||
|
var sig, sighi,siglow, sum, env, osc1, osc2, osc3, osc4, osc5, osc6;
|
||||||
|
env = EnvGen.kr(Env.perc(0.005, decay, 1, -30),doneAction:2);
|
||||||
|
osc1 = LFPulse.ar(203.52);
|
||||||
|
osc2 = LFPulse.ar(366.31);
|
||||||
|
osc3 = LFPulse.ar(301.77);
|
||||||
|
osc4 = LFPulse.ar(518.19);
|
||||||
|
osc5 = LFPulse.ar(811.16);
|
||||||
|
osc6 = LFPulse.ar(538.75);
|
||||||
|
sighi = (osc1 + osc2 + osc3 + osc4 + osc5 + osc6);
|
||||||
|
siglow = (osc1 + osc2 + osc3 + osc4 + osc5 + osc6);
|
||||||
|
sighi = BPF.ar(sighi, 8900, 1);
|
||||||
|
sighi = HPF.ar(sighi, 9000);
|
||||||
|
siglow = BBandPass.ar(siglow, 8900, 0.8);
|
||||||
|
siglow = BHiPass.ar(siglow, 9000, 0.3);
|
||||||
|
sig = BPeakEQ.ar((siglow+sighi), 9700, 0.8, 0.7);
|
||||||
|
sig = sig * env * amp;
|
||||||
|
sig = Pan2.ar(sig, pan);
|
||||||
|
Out.ar(out, sig);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
SynthDef.new(\sc808oh, {
|
||||||
|
arg decay=0.5, amp=4, pan=0, out=0;
|
||||||
|
var sig, siga, sigb, env1, env2, osc1, osc2, osc3, osc4, osc5, osc6, sum;
|
||||||
|
env1 = EnvGen.kr(Env.perc(0.1, decay, curve:-3), doneAction:2);
|
||||||
|
env2 = EnvGen.kr(Env.new([0, 1, 0], [0, decay*5], curve:-150), doneAction:0);
|
||||||
|
osc1 = LFPulse.ar(203.52) * 0.6;
|
||||||
|
osc2 = LFPulse.ar(366.31) * 0.6;
|
||||||
|
osc3 = LFPulse.ar(301.77) * 0.6;
|
||||||
|
osc4 = LFPulse.ar(518.19) * 0.6;
|
||||||
|
osc5 = LFPulse.ar(811.16) * 0.6;
|
||||||
|
osc6 = LFPulse.ar(538.75) * 0.6;
|
||||||
|
sig = osc1 + osc2 + osc3 + osc4 + osc5 +osc6;
|
||||||
|
sig = BLowShelf.ar(sig, 990, 2, -3);
|
||||||
|
sig = BPF.ar(sig, 7700);
|
||||||
|
sig = BPeakEQ.ar(sig, 7200, 0.5, 5);
|
||||||
|
sig = BHiPass4.ar(sig, 8100, 0.7);
|
||||||
|
sig = BHiShelf.ar(sig, 9400, 1, 5);
|
||||||
|
siga = sig * env1 * 0.6;
|
||||||
|
sigb = sig * env2;
|
||||||
|
sum = siga + sigb;
|
||||||
|
sum = LPF.ar(sum, 4000);
|
||||||
|
sum = Pan2.ar(sum, 0);
|
||||||
|
sum = sum * amp * 2;
|
||||||
|
Out.ar(out, sum);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
SynthDef.new(\sc808cymb, {
|
||||||
|
arg decay=2, amp=20, pan=0, gate=0, tone=0.002, out=0;
|
||||||
|
var sig, sig1,sig2, sig2a, sig2b, sig3, env1, env2, env2b, env3, osc1, osc2, osc3, osc4, osc5, osc6, sum;
|
||||||
|
env1 = EnvGen.kr(Env.perc(0.3, decay, curve:-3), doneAction:2);
|
||||||
|
env2 = EnvGen.kr(Env.new([0, 0.6, 0], [0.1, decay*0.7], -5), doneAction:0);
|
||||||
|
env2b = EnvGen.kr(Env.new([0, 0.3, 0], [0.1, decay*20], -120), doneAction:0);
|
||||||
|
env3 = EnvGen.kr(Env.new([0, 1, 0], [0, decay*5], curve:-150), doneAction:0);
|
||||||
|
osc1 = LFPulse.ar(203.52) * 0.6;
|
||||||
|
osc2 = LFPulse.ar(366.31) * 0.6;
|
||||||
|
osc3 = LFPulse.ar(301.77) * 0.6;
|
||||||
|
osc4 = LFPulse.ar(518.19) * 0.6;
|
||||||
|
osc5 = LFPulse.ar(811.16) * 0.6;
|
||||||
|
osc6 = LFPulse.ar(538.75) * 0.6;
|
||||||
|
sig = osc1 + osc2 + osc3 + osc4 + osc5 +osc6;
|
||||||
|
sig1 = BLowShelf.ar(sig, 2000, 1, 5);
|
||||||
|
sig1 = BPF.ar(sig1, 3000);
|
||||||
|
sig1 = BPeakEQ.ar(sig1, 2400, 0.5, 5);
|
||||||
|
sig1 = BHiPass.ar(sig1, 1550, 0.7);
|
||||||
|
sig1 = LPF.ar(sig1, 3000);
|
||||||
|
sig1 = BLowShelf.ar(sig1, 1000, 1, 0);
|
||||||
|
sig1 = sig1 * env1 * tone;
|
||||||
|
sig2 = BLowShelf.ar(sig, 990, 2, -5);
|
||||||
|
sig2 = BPF.ar(sig2, 7400);
|
||||||
|
sig2 = BPeakEQ.ar(sig2, 7200, 0.5, 5);
|
||||||
|
sig2 = BHiPass4.ar(sig2, 6800, 0.7);
|
||||||
|
sig2 = BHiShelf.ar(sig2, 10000, 1, -4);
|
||||||
|
sig2a = sig2 * env2 * 0.3;
|
||||||
|
sig2b = sig2 * env2b * 0.6;
|
||||||
|
sig3 = BLowShelf.ar(sig, 990, 2, -15);
|
||||||
|
sig3 = BPF.ar(sig3, 6500);
|
||||||
|
sig3 = BPeakEQ.ar(sig3, 7400, 0.35, 10);
|
||||||
|
sig3 = BHiPass4.ar(sig3, 10500, 0.8, 2);
|
||||||
|
sig3 = sig3 * env3;
|
||||||
|
sum = sig1 + sig2a + sig2b + sig3;
|
||||||
|
sum = LPF.ar(sum, 4000);
|
||||||
|
sum = Pan2.ar(sum, 0);
|
||||||
|
sum = sum * amp;
|
||||||
|
Out.ar(out, sum);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
(
|
||||||
|
// function to partially match filename for buffers
|
||||||
|
~getSmp = { |regexp|
|
||||||
|
~smpBuffers.detect { |buf|
|
||||||
|
regexp.matchRegexp(buf.path)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
)
|
|
@ -0,0 +1,17 @@
|
||||||
|
( // reverb
|
||||||
|
SynthDef(\reverb, {
|
||||||
|
arg inBus, out=0, amp=1;
|
||||||
|
var input, snd;
|
||||||
|
input = In.ar(inBus, numChannels:2);
|
||||||
|
|
||||||
|
snd = JPverb.ar(input * amp);
|
||||||
|
|
||||||
|
Out.ar(out, snd * amp);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
// ( // delay )
|
||||||
|
|
||||||
|
//s.options.memSize_(65536 * 4);
|
||||||
|
//s.reboot;
|
||||||
|
|
|
@ -0,0 +1,502 @@
|
||||||
|
(
|
||||||
|
SynthDef(\recIn, { arg out = 0, bufnum = 0;
|
||||||
|
var snd = SoundIn.ar(0,1);
|
||||||
|
RecordBuf.ar(snd, bufnum, doneAction: Done.freeSelf, loop: 0);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\verbDelayFX, {
|
||||||
|
arg inBus, outBus, revWet=0.8, dlyWet=0.8, feedback = 0.5 ;
|
||||||
|
|
||||||
|
var snd = In.ar(inBus, 2);
|
||||||
|
var verb = JPverb.ar(snd);
|
||||||
|
var delay = Greyhole.ar(snd, feedback: feedback);
|
||||||
|
|
||||||
|
snd = snd + (verb * revWet) + (delay * dlyWet) * 0.5;
|
||||||
|
Out.ar(outBus, snd);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\bgrain, { |out = 0, gate = 1, amp = 0, bufnum, gfreq=90, rate=0.5|
|
||||||
|
var snd, pan, env, freqdev;
|
||||||
|
pan = LFNoise1.kr(0.1).range(-1, 1) * LFNoise0.kr(gfreq).range(0.2,1);
|
||||||
|
env = EnvGen.kr(
|
||||||
|
Env([0, 1, 0], [1, 1], \sin, 1),
|
||||||
|
gate,
|
||||||
|
doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = GrainBuf.ar(
|
||||||
|
numChannels:2,
|
||||||
|
trigger:Impulse.kr(LFNoise1.kr(gfreq).range(0.8,1) * gfreq),
|
||||||
|
dur: 0.2 * LFNoise0.kr(gfreq).range(1,1.2),
|
||||||
|
sndbuf: bufnum,
|
||||||
|
rate: [rate * LFNoise1.kr.range(0.99, 1), rate * LFNoise1.kr.range(0.99, 1)],
|
||||||
|
pos: LFNoise2.kr(0.05).range(0, 1) * LFNoise0.kr(gfreq).range(1,1.02),
|
||||||
|
//pos: LFTri.kr(0.25),
|
||||||
|
interp: 2,
|
||||||
|
pan: pan);
|
||||||
|
|
||||||
|
snd = RLPF.ar(snd, freq: LFNoise2.kr(0.1).exprange(400,10000));
|
||||||
|
snd = snd * LFTri.ar(0.073).range(0.1,1);
|
||||||
|
snd = snd * env * amp;
|
||||||
|
|
||||||
|
Out.ar(out, snd);
|
||||||
|
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\henonSynth1, {
|
||||||
|
|
||||||
|
arg out=0, amp=0.5, gate=1, fadeTime=1, lpff=200, hpff=200, pan=0;
|
||||||
|
var sig, freq, env, lpfsig, hpfsig;
|
||||||
|
|
||||||
|
freq = HenonN.ar(
|
||||||
|
freq: 5000,
|
||||||
|
a: LFNoise2.kr(1, 0.2, 1.2),
|
||||||
|
b: LFNoise2.kr(1, 0.15, 0.15),
|
||||||
|
mul: 0.6
|
||||||
|
);
|
||||||
|
|
||||||
|
// used as frequency modulator
|
||||||
|
sig = Pulse.ar(
|
||||||
|
freq: freq.range(40, LFNoise2.kr(0.1).range(1000,10000)),
|
||||||
|
mul: 0.2);
|
||||||
|
sig = sig.ring3(0.5);
|
||||||
|
sig = sig.clip2(0.8);
|
||||||
|
lpfsig = LPF.ar(sig, lpff.max(50));
|
||||||
|
hpfsig = HPF.ar(sig, hpff.max(50));
|
||||||
|
sig = lpfsig + hpfsig;
|
||||||
|
sig = LeakDC.ar(sig);
|
||||||
|
|
||||||
|
env = EnvGen.kr( Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
|
||||||
|
gate, doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
sig = sig * env * amp;
|
||||||
|
sig = Pan2.ar(sig, pan);
|
||||||
|
|
||||||
|
Out.ar(out,sig);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
( // henonN + henonC controlling filter * volume
|
||||||
|
SynthDef(\henonLsynth1, {
|
||||||
|
arg out=0, hpfreqmin=100, pan=0;
|
||||||
|
var snd;
|
||||||
|
|
||||||
|
snd = (BrownNoise.ar() + Mix(SinOsc.ar(HenonN.ar(4,a:[1.4,1.1] ).range(200,400)))) * HenonN.ar(freq:1).range(0,0.5);
|
||||||
|
snd = RHPF.ar(snd, HenonC.ar(freq:1).fold(0,1).exprange(hpfreqmin,7000), rq:1);
|
||||||
|
snd = snd * HenonC.ar(0.5).range(0.6,1);
|
||||||
|
snd = Pan2.ar(snd, pan);
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
// henonLsynth = dark brooding melodic drone-noise
|
||||||
|
SynthDef(\henonLsynth2, {
|
||||||
|
arg out, gate=1, fadeTime=1, amp=1, pan=0;
|
||||||
|
var sig, sinfreq, env;
|
||||||
|
|
||||||
|
env = EnvGen.kr(Env(levels: [0,1,0], times: [fadeTime, fadeTime], curve: \sin, releaseNode: 1),
|
||||||
|
gate, doneAction: 2);
|
||||||
|
|
||||||
|
sinfreq = LFPulse.kr( freq: 0.9, width:0.1);
|
||||||
|
sinfreq = sinfreq.range(
|
||||||
|
LFPulse.kr(0.073).range(37).midicps,
|
||||||
|
[44.midicps,53.3.midicps]
|
||||||
|
);
|
||||||
|
sinfreq = sinfreq * SinOsc.kr(1).range(1,1.02);
|
||||||
|
|
||||||
|
sig = SinOsc.ar(sinfreq);
|
||||||
|
sig = sig + (BrownNoise.ar(0.4) * SinOsc.kr(0.1).range(0,1));
|
||||||
|
sig = sig * HenonN.ar(20).range(0,1).clip(0,1);
|
||||||
|
sig = RLPF.ar(sig, HenonC.ar(1).fold(0,1).exprange(40,1000), rq:0.4);
|
||||||
|
sig = sig.clip2(0.5);
|
||||||
|
sig = sig * HenonC.ar(0.5).range(0,0.5);
|
||||||
|
// sig = RHPF.ar(sig,5000);
|
||||||
|
|
||||||
|
sig = sig + Greyhole.ar(sig * 0.6, feedback: 0.8, diff: 0.7, delayTime: 0.78123);
|
||||||
|
|
||||||
|
sig = sig * env * amp;
|
||||||
|
|
||||||
|
sig = Mix.new(sig);
|
||||||
|
sig = Pan2.ar(sig, pan);
|
||||||
|
Out.ar(out, sig);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
( // henonSquare being thrown around
|
||||||
|
SynthDef(\henonSquare, {
|
||||||
|
|
||||||
|
arg out=0, gate=1, amp=0.5, pan=0;
|
||||||
|
|
||||||
|
var env = EnvGen.kr(Env([0, 1, 0], [1, 4], \sin, 1), gate);
|
||||||
|
|
||||||
|
var trig = HenonTrig.kr();
|
||||||
|
|
||||||
|
// wandering attractor into variable 'freq':
|
||||||
|
var freq = HenonN.ar(
|
||||||
|
TRand.kr(trig:trig).exprange(1,20),
|
||||||
|
// parameters:
|
||||||
|
//a: LFNoise2.kr(0.5).range(0.3,1.6),
|
||||||
|
//b: LFNoise2.kr(0.5).range(0,0.6)
|
||||||
|
//a: 1.4,
|
||||||
|
a: LFTri.kr(0.01,3).range(1,1.5), // ramp up and down, slowly
|
||||||
|
b: 0.3
|
||||||
|
).exprange(40,1000);
|
||||||
|
|
||||||
|
// wandering attractor applied as frequency to squarewave:
|
||||||
|
var sig = Pulse.ar([freq,freq]);
|
||||||
|
|
||||||
|
// adding sinwave for more clean deep/soft sound
|
||||||
|
sig = sig + SinOsc.ar([freq,freq*0.995]);
|
||||||
|
|
||||||
|
// back to mono:
|
||||||
|
sig = Mix(sig);
|
||||||
|
|
||||||
|
// fold distortion
|
||||||
|
sig = sig.fold2(0.5) * 2;
|
||||||
|
|
||||||
|
// low pass filter to give sense of closing and opening
|
||||||
|
sig = LPF.ar(sig, LFNoise2.kr(0.2).exprange(100,20000));
|
||||||
|
|
||||||
|
sig = sig * env;
|
||||||
|
|
||||||
|
// add space. lots of space
|
||||||
|
//sig = (sig * 0.5) + Greyhole.ar(sig * 0.5, delayTime:0.6, damp: 0.8, diff: 0, feedback:0.6,);
|
||||||
|
|
||||||
|
DetectSilence.ar(sig, doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
sig = Pan2.ar(sig, pan);
|
||||||
|
|
||||||
|
sig = sig * amp;
|
||||||
|
|
||||||
|
Out.ar(out,sig);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\granSoil, {
|
||||||
|
arg out=0, gate = 1, amp = 0.5, sndbuf, envbuf = -1, fadeTime=1, rate=0.8, dur=0.01, pan=0;
|
||||||
|
var snd, env, freqdev;
|
||||||
|
// use mouse x to control panning
|
||||||
|
//pan = MouseX.kr(-1, 1);
|
||||||
|
env = EnvGen.kr(
|
||||||
|
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
|
||||||
|
gate,
|
||||||
|
//levelScale: amp,
|
||||||
|
doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = GrainBuf.ar(
|
||||||
|
numChannels: 1,
|
||||||
|
trigger: Impulse.kr(200 * LFNoise2.kr(0.1).range(0.9,1.1)),
|
||||||
|
//dur: MouseY.kr.range(0.001,1),
|
||||||
|
//dur: SinOsc.kr(0.1).range(0.001,0.1),
|
||||||
|
dur: dur,
|
||||||
|
sndbuf: sndbuf,
|
||||||
|
rate: rate, // the playback rate of the sampled sound
|
||||||
|
//pos: MouseX.kr.range(0, 25) * LFNoise2.kr(20).range(0.999,1.001),
|
||||||
|
pos: LFNoise2.kr(0.001).range(0, 25) * LFNoise2.kr(20).range(0.999,1.001),
|
||||||
|
interp: 4, // 2: liner, 4: cubic
|
||||||
|
pan: 0,
|
||||||
|
envbufnum: envbuf,
|
||||||
|
maxGrains: 1024);
|
||||||
|
|
||||||
|
|
||||||
|
snd = Pan2.ar(snd, pan);
|
||||||
|
snd = snd * env * amp;
|
||||||
|
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\latooTrigRing, {
|
||||||
|
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1, pan=0;
|
||||||
|
var snd, in, env;
|
||||||
|
|
||||||
|
in = LatoocarfianTrig.ar(min,max);
|
||||||
|
snd = Ringz.ar(in, freq, decay);
|
||||||
|
snd = LPF.ar(snd, ffreq);
|
||||||
|
env = EnvGen.kr(
|
||||||
|
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
|
||||||
|
gate, doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = snd * env * amp;
|
||||||
|
snd = Pan2.ar(snd, pan);
|
||||||
|
Out.ar(out,snd)
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\lorenzTrigRing, {
|
||||||
|
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1, pan=0;
|
||||||
|
var snd, in, env;
|
||||||
|
|
||||||
|
in = LorenzTrig.ar(min,max);
|
||||||
|
snd = Ringz.ar(in, freq, decay);
|
||||||
|
snd = LPF.ar(snd, ffreq);
|
||||||
|
env = EnvGen.kr(
|
||||||
|
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
|
||||||
|
gate, doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = snd * env * amp;
|
||||||
|
snd = Pan2.ar(snd, pan);
|
||||||
|
Out.ar(out,snd)
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
SynthDef(\fhnTrigRing, {
|
||||||
|
arg out=0, freq=1000, min=1, max=10, decay=0.1, ffreq=1000, amp=1, gate=1, fadeTime=1, pan=0;
|
||||||
|
var snd, in, env;
|
||||||
|
|
||||||
|
in = FhnTrig.ar(min,max);
|
||||||
|
snd = Ringz.ar(in, freq, decay);
|
||||||
|
snd = LPF.ar(snd, ffreq);
|
||||||
|
env = EnvGen.kr(
|
||||||
|
Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1),
|
||||||
|
gate, doneAction: Done.freeSelf);
|
||||||
|
|
||||||
|
snd = snd * env * amp;
|
||||||
|
snd = Pan2.ar(snd, pan);
|
||||||
|
Out.ar(out,snd)
|
||||||
|
}).add;
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// =====================================================================
|
||||||
|
// 'pre-Pdefs'
|
||||||
|
// =====================================================================
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\bd1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("bd01"),
|
||||||
|
\dur, Pseq([3/4, 1, 1, 1, 1/4],inf),
|
||||||
|
\amp, 0.5
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\bd2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("bd02"),
|
||||||
|
\dur, Pseq([1+(1/4), 1, 1, 1/4],inf),
|
||||||
|
\amp, 0.5
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\bd3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("bd03"),
|
||||||
|
\dur, Pseq([1+(1/4), 1, 1, 1/4],inf),
|
||||||
|
\amp, 0.5
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\hh1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("hh01"),
|
||||||
|
\dur, 1/2,
|
||||||
|
\amp, Prand([1,1.2,0.8],inf),
|
||||||
|
\rate, Prand([0.99,1,1.01],inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\hh2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("hh02"),
|
||||||
|
\dur, 1/2,
|
||||||
|
\amp, Prand([1,1.2,0.8],inf),
|
||||||
|
\rate, Prand([0.99,1,1.01],inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\hh3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("hh03"),
|
||||||
|
\dur, 1/4,
|
||||||
|
\amp, Prand([1,1.2,0.8],inf),
|
||||||
|
\rate, Prand([0.99,1,1.01],inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\oh1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("oh01"),
|
||||||
|
\dur, Pseq([Rest(13/4),3/4],inf),
|
||||||
|
\amp, 0.4,
|
||||||
|
\pan, 0
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\oh2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("oh02"),
|
||||||
|
\dur, Pseq([Rest(13/4),3/4],inf),
|
||||||
|
\amp, 0.4,
|
||||||
|
\pan, 0
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\oh3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("oh03"),
|
||||||
|
\dur, Pseq([Rest(13/4),3/4],inf),
|
||||||
|
\amp, 0.4,
|
||||||
|
\pan, 0
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\sn1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("sn01"),
|
||||||
|
\dur, Pseq([Rest(1),1],inf),
|
||||||
|
\amp, 2
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\sn2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("sn02"),
|
||||||
|
\dur, Pseq([Rest(1),1],inf),
|
||||||
|
\amp, 2
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\sn3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("sn03"),
|
||||||
|
\dur, Pseq([Rest(1),1],inf),
|
||||||
|
\amp, 2
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\perc1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("perc07"),
|
||||||
|
\dur, Pseq([2],inf),
|
||||||
|
\amp, 1,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf)
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
(
|
||||||
|
Pdef(\perc2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("perc04"),
|
||||||
|
\dur, Pseq([ Pn(1/2,6), 1/4, 1/2, 1/4 ],inf),
|
||||||
|
\amp, 1,
|
||||||
|
\rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)).quant_(8)
|
||||||
|
);
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\perc3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("perc05"),
|
||||||
|
\dur, Pseq([ Pn(1/2,6), 1/4, 1/2, 1/4 ],inf),
|
||||||
|
// \amp, 0.5,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)).quant_(8)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\cl1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("cl01"),
|
||||||
|
\dur, Pseq([ Rest(1), 1.5 ],inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
(
|
||||||
|
Pdef(\cl2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("cl04"),
|
||||||
|
\dur, Pseq([ Rest(1.5), 3/4 ],inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)).quant_(8)
|
||||||
|
);
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\cl3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("cl05"),
|
||||||
|
\dur, Pseq([ Rest(3/4), 6/4],inf),
|
||||||
|
// \amp, 0.5,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf),
|
||||||
|
// \pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)).quant_(8)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\gl1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("gl01"),
|
||||||
|
\dur, Pseq([1,3,2,3 ] / 3,inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)
|
||||||
|
).quant_(8));
|
||||||
|
//Pdef(\gl1).play
|
||||||
|
//s.scope(4)
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\gl2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("gl04"),
|
||||||
|
\dur, Pseq([ 3,4,2,3,1 ] / 2,inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)).quant_(8)
|
||||||
|
);
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\gl3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("gl05"),
|
||||||
|
\dur, Pseq([ 4,3,4,3,4,2,1 ] / 4,inf),
|
||||||
|
// \amp, 0.5,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf),
|
||||||
|
// \pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)).quant_(8)
|
||||||
|
);
|
||||||
|
|
||||||
|
// BASSLINE + MELODIC LINES with buffer cycler
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\bsln1, Pbind( \instrument, \bufCyc,
|
||||||
|
\bufnum, [~getSmp.("0043"),~getSmp.("0043")],
|
||||||
|
\octave, [3,2],
|
||||||
|
\detune, [0.1,0],
|
||||||
|
\chanDetune, 20,
|
||||||
|
\legato, 0.2,
|
||||||
|
\amp, [0.3,0.9,0.1] * 0.5,
|
||||||
|
\releaseTime, 0.1,
|
||||||
|
\degree, 2,
|
||||||
|
// \dur, 1
|
||||||
|
)).quant_(2)
|
||||||
|
);
|
||||||
|
|
||||||
|
(
|
||||||
|
Pdef(\strng1, Pbind( \instrument, \bufCyc,
|
||||||
|
\bufnum, [~getSmp.("sincyc06"),~getSmp.("sincyc06")],
|
||||||
|
|
||||||
|
//\dur, Pseq([3/4,2/4,1/4]*2/3,inf),
|
||||||
|
//\degree, Pseq([[4,9],2,8,4,1], inf),
|
||||||
|
//\octave, Prand([[6,5,7],[4,5,7],[7,5,4]],inf),
|
||||||
|
\octave, 4,
|
||||||
|
//\mtranspose, Pstutter(12, Pseq([1,0,-2,3,-3],inf)),
|
||||||
|
|
||||||
|
\detune, [0,0.3,-0.3],
|
||||||
|
\chanDetune, Pseq([-10,0,5,10,-5],inf),
|
||||||
|
\amp, [0.3,0.5,0.1] * 0.05,
|
||||||
|
\legato, 0.1,
|
||||||
|
\releaseTime, Prand([1,2,3,4],inf)
|
||||||
|
|
||||||
|
)).quant_(8)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
(
|
||||||
|
SynthDef(\sinPulz, {
|
||||||
|
arg gate = 1, freq, out=0, amp = 1, attackTime=0.01, releaseTime=1, oscDetune=0.05, cutoff=1;
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
oscDetune = oscDetune * 0.1 + 1;
|
||||||
|
|
||||||
|
env = Linen.kr(gate, attackTime:attackTime, releaseTime:releaseTime, doneAction:2);
|
||||||
|
|
||||||
|
freq = freq * LFNoise1.kr(20).exprange(0.995,1.005);
|
||||||
|
snd = SinOsc.ar([freq, freq*oscDetune]) ;
|
||||||
|
snd = snd + SinOsc.ar([freq*2, freq*oscDetune*2]) ;
|
||||||
|
snd = snd + Pulse.ar([freq/2,(freq/2)*oscDetune]) * LFNoise1.kr(0.5).exprange(2,40);
|
||||||
|
|
||||||
|
snd = snd.softclip;
|
||||||
|
snd = RLPF.ar(snd, freq:
|
||||||
|
//LFNoise1.kr(0.01).exprange(4000,300),
|
||||||
|
freq * cutoff,
|
||||||
|
rq:0.4);
|
||||||
|
|
||||||
|
snd = snd * env * amp * 0.4;
|
||||||
|
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
);
|
|
@ -0,0 +1,13 @@
|
||||||
|
(
|
||||||
|
SynthDef(\verbDelayFX, {
|
||||||
|
arg inBus, outBus, revWet=0.8, dlyWet=0.8, feedback = 0.5 ;
|
||||||
|
|
||||||
|
var snd = In.ar(inBus, 2);
|
||||||
|
var verb = JPverb.ar(snd);
|
||||||
|
var delay = Greyhole.ar(snd, feedback: feedback);
|
||||||
|
|
||||||
|
snd = snd + (verb * revWet) + (delay * dlyWet) * 0.5;
|
||||||
|
|
||||||
|
Out.ar(outBus, snd);
|
||||||
|
}).add;
|
||||||
|
);
|
|
@ -0,0 +1,43 @@
|
||||||
|
// on-the-fly, 21. oct 2020
|
||||||
|
|
||||||
|
100.do({post(".... hola every1, I'm luka, Luka P.!!!!!")})
|
||||||
|
|
||||||
|
~counter.play
|
||||||
|
|
||||||
|
Ndef(\n1).play
|
||||||
|
Ndef(\n1).fadeTime=15
|
||||||
|
(
|
||||||
|
Ndef(\n1,{
|
||||||
|
var flt1, flt2, flt3, snd = WhiteNoise.ar;
|
||||||
|
flt1 = BPF.ar(snd, LFNoise1.ar(0.1).range(100,5000), 0.2);
|
||||||
|
flt2 = BPF.ar(snd, LFNoise1.ar(0.1).range(100,5000), 0.2);
|
||||||
|
flt3 = BPF.ar(snd, LFNoise1.ar(0.1).range(100,5000), 0.2);
|
||||||
|
snd = flt1 + flt2 + flt3;
|
||||||
|
snd!2 * 0;
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
Pdef(\bsln1).play
|
||||||
|
Pbindef(\bsln1, \dur, Pseq([1,2,3] * 1/2, 2))
|
||||||
|
(
|
||||||
|
Pbindef(\bsln1,
|
||||||
|
\degree, Pxrand([0, 1,2,3], inf),
|
||||||
|
\legato, Pseq([1,2,3]/3, inf)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
Pdef(\strng1).play
|
||||||
|
|
||||||
|
(
|
||||||
|
Pbindef(\strng1,
|
||||||
|
\degree, Pseq([[9,4],2,8,4,1],inf),
|
||||||
|
\dur, Pseq([3,2,1] * 1/4, 5),
|
||||||
|
\octave, [7,4,5],
|
||||||
|
\mtranspose, Pseq([1,0,-2,3,-3],inf)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
// THANK YOU FOR LISTENING!!!!!!!!!!!!!!!!!
|
||||||
|
// HUGE PROPS to hangar!!!
|
||||||
|
// next is my pal from slovenia BLAŽ PAVLICA!!!!
|
|
@ -0,0 +1,404 @@
|
||||||
|
|
||||||
|
|
||||||
|
// ideas:
|
||||||
|
/*
|
||||||
|
|
||||||
|
- bassline
|
||||||
|
- harmonic line/melody
|
||||||
|
- long strings - low
|
||||||
|
- kick, hihat, perc, snare.
|
||||||
|
- effects? - buses!
|
||||||
|
|
||||||
|
- prep underlaying elements.
|
||||||
|
- preload samples
|
||||||
|
- preload synthdefs
|
||||||
|
- preload Pdefs
|
||||||
|
|
||||||
|
- print or note patterns and ideas on paper.
|
||||||
|
- train 3x at least. print out.
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
// preload samples
|
||||||
|
var smpPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "smp");
|
||||||
|
// load samples
|
||||||
|
"\n--- load samples: ...".postln;
|
||||||
|
|
||||||
|
// free all buffers to restart buffer count
|
||||||
|
~smpBuffers.do(_.free);
|
||||||
|
|
||||||
|
// create Dictionary
|
||||||
|
~smpBuffers = Dictionary();
|
||||||
|
|
||||||
|
// iterate over each file in the folder
|
||||||
|
smpPath.filesDo({ |smpfile,i|
|
||||||
|
|
||||||
|
// tell me what you are loading:
|
||||||
|
postln(" " + i + smpfile.fileName );
|
||||||
|
|
||||||
|
// add a sample into a buffer, store object to Dictionary
|
||||||
|
~smpBuffers.add(smpfile.fileName -> Buffer.readChannel(s,
|
||||||
|
smpfile.fullPath, channels:[0]));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// function to partially match filename for buffers
|
||||||
|
~getSmp = { |regexp|
|
||||||
|
~smpBuffers.detect { |buf|
|
||||||
|
regexp.matchRegexp(buf.path)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// counter for 9 minutes
|
||||||
|
~counter = Routine {
|
||||||
|
(9 * 60).do(
|
||||||
|
{ arg item;
|
||||||
|
var timeleft = (9*60)-item;
|
||||||
|
if (timeleft.mod(10)==0, {postln("--- toGo:" + ((9*60)-item) + "---")});
|
||||||
|
1.wait;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
(1000).do({
|
||||||
|
100.do({post("..time is up!!!!!")});
|
||||||
|
1.wait;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// ~counter.play
|
||||||
|
// ~counter.stop
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// Synthdefs predefined
|
||||||
|
postln("--- synthdefs ...");
|
||||||
|
// synthdefs?
|
||||||
|
|
||||||
|
SynthDef(\bufCyc, {
|
||||||
|
arg bufnum, gate=1, freq=440, chanDetune=1, out=0, amp = 1,
|
||||||
|
attackTime=0.01, releaseTime=1, lpf=10;
|
||||||
|
var snd, env, lpfreq;
|
||||||
|
|
||||||
|
env = Linen.kr(gate, attackTime:attackTime, releaseTime:releaseTime, doneAction:2);
|
||||||
|
freq = [freq, freq * (1 + (chanDetune * 0.0005))];
|
||||||
|
snd = BufRd.ar(
|
||||||
|
numChannels: 1,
|
||||||
|
bufnum: bufnum,
|
||||||
|
phase: LFSaw.ar(freq).range(0, BufFrames.ir(bufnum)),
|
||||||
|
loop: 1,
|
||||||
|
interpolation: 2);
|
||||||
|
|
||||||
|
lpfreq = freq * lpf;
|
||||||
|
lpfreq = lpfreq.max(100);
|
||||||
|
lpfreq = lpfreq.min(18000);
|
||||||
|
|
||||||
|
snd = LPF.ar(snd, lpfreq);
|
||||||
|
|
||||||
|
snd = snd * amp * env;
|
||||||
|
Out.ar(out, snd);
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
|
||||||
|
SynthDef(\smplr, {|out = 0, revBus, bufnum = 0, gate = 1, amp = 1, pan = 0, rate = 1, revWet = 0 |
|
||||||
|
var snd, env;
|
||||||
|
|
||||||
|
snd = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum) * rate, loop: 0);
|
||||||
|
env = EnvGen.kr(envelope: Env.cutoff(0.001,1), gate: gate, doneAction:Done.freeSelf);
|
||||||
|
snd = snd * env * amp;
|
||||||
|
snd = Pan2.ar(snd, pan);
|
||||||
|
Out.ar(out, snd);
|
||||||
|
|
||||||
|
//Out.ar(revBus * revWet, snd);
|
||||||
|
|
||||||
|
}).add;
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// pdef predefined
|
||||||
|
postln("--- pdefs ...");
|
||||||
|
|
||||||
|
Pdef(\bsln1, Pbind( \instrument, \bufCyc,
|
||||||
|
\bufnum, [~getSmp.("0043"),~getSmp.("0043")],
|
||||||
|
\octave, [3,2],
|
||||||
|
\detune, [0.1,0],
|
||||||
|
\chanDetune, 20,
|
||||||
|
\legato, 0.2,
|
||||||
|
\amp, [0.3,0.9,0.1] * 0.5,
|
||||||
|
\releaseTime, 0.1,
|
||||||
|
\degree, 2,
|
||||||
|
// \dur, 1
|
||||||
|
)).quant_(2);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\strng1, Pbind( \instrument, \bufCyc,
|
||||||
|
\bufnum, [~getSmp.("sincyc06"),~getSmp.("sincyc06")],
|
||||||
|
|
||||||
|
//\dur, Pseq([3/4,2/4,1/4]*2/3,inf),
|
||||||
|
//\degree, Pseq([[4,9],2,8,4,1], inf),
|
||||||
|
//\octave, Prand([[6,5,7],[4,5,7],[7,5,4]],inf),
|
||||||
|
\octave, 4,
|
||||||
|
//\mtranspose, Pstutter(12, Pseq([1,0,-2,3,-3],inf)),
|
||||||
|
|
||||||
|
\detune, [0,0.3,-0.3],
|
||||||
|
\chanDetune, Pseq([-10,0,5,10,-5],inf),
|
||||||
|
\amp, [0.3,0.5,0.1] * 0.15,
|
||||||
|
\legato, 0.1,
|
||||||
|
\releaseTime, Prand([1,2,3,4],inf)
|
||||||
|
|
||||||
|
)).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
// =====================================================================
|
||||||
|
// percussion with sampler
|
||||||
|
// =====================================================================
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\bd1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("bd01"),
|
||||||
|
//\dur, Pseq([3/4, 1, 1, 1, 1/4],inf),
|
||||||
|
//\dur, Pseq([3/4, 1, 1, 1, 1/4],inf),
|
||||||
|
\amp, 0.6
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Pdef(\bd2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("bd02"),
|
||||||
|
\dur, Pseq([1+(1/4), 1, 1, 1/4],inf),
|
||||||
|
\amp, 0.5
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\bd3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("bd03"),
|
||||||
|
\dur, Pseq([1+(1/4), 1, 1, 1/4],inf),
|
||||||
|
\amp, 0.5
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
*/
|
||||||
|
|
||||||
|
Pdef(\hh1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("hh01"),
|
||||||
|
\dur, 1/2,
|
||||||
|
\amp, Prand([1,1.2,0.8]*0.5,inf),
|
||||||
|
\rate, Prand([0.99,1,1.01],inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\hh2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("hh02"),
|
||||||
|
\dur, 1/2,
|
||||||
|
\amp, Prand([1,1.2,0.8] * 0.7,inf),
|
||||||
|
\rate, Prand([0.99,1,1.01],inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\hh3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("hh03"),
|
||||||
|
\dur, 1/4,
|
||||||
|
\amp, Prand([1,1.2,0.8]*0.2,inf),
|
||||||
|
\rate, Prand([0.99,1,1.01],inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\oh1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("oh01"),
|
||||||
|
\dur, Pseq([Rest(13/4),3/4],inf),
|
||||||
|
\amp, 0.4,
|
||||||
|
\pan, 0
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\oh2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("oh02"),
|
||||||
|
\dur, Pseq([Rest(13/4),3/4],inf),
|
||||||
|
\amp, 0.4,
|
||||||
|
\pan, 0
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\oh3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("oh03"),
|
||||||
|
\dur, Pseq([Rest(13/4),3/4],inf),
|
||||||
|
\amp, 0.4,
|
||||||
|
\pan, 0
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\sn1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("sn01"),
|
||||||
|
//\dur, Pseq([Rest(1),1],inf),
|
||||||
|
//\dur, Pseq([Rest(1),1],inf),
|
||||||
|
\amp, 1
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\sn2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("sn02"),
|
||||||
|
\dur, Pseq([Rest(1),1],inf),
|
||||||
|
\amp, 0.5
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\sn3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("sn03"),
|
||||||
|
\dur, Pseq([Rest(1),1],inf),
|
||||||
|
\amp, 2
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\perc1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("perc07"),
|
||||||
|
//\dur, Pseq([2],inf),
|
||||||
|
\dur, 1,
|
||||||
|
\amp, 0.6,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf)
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\perc2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("perc03"),
|
||||||
|
//\dur, Pseq([ Pn(1/2,6), 1/4, 1/2, 1/4 ],inf),
|
||||||
|
\dur, 1,
|
||||||
|
\amp, 0.7,
|
||||||
|
\rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\perc3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("perc05"),
|
||||||
|
\dur, Pseq([ Pn(1/2,6), 1/4, 1/2, 1/4 ],inf),
|
||||||
|
// \amp, 0.5,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf),
|
||||||
|
\pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\cl1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("cl01"),
|
||||||
|
\dur, Pseq([ Rest(1), 1.5 ],inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\cl2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("cl04"),
|
||||||
|
\dur, Pseq([ Rest(1.5), 3/4 ],inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\cl3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("cl05"),
|
||||||
|
\dur, Pseq([ Rest(3/4), 6/4],inf),
|
||||||
|
// \amp, 0.5,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf),
|
||||||
|
// \pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)).quant_(8);
|
||||||
|
|
||||||
|
Pdef(\gl1, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("gl01"),
|
||||||
|
\dur, Pseq([1,3,2,3 ] / 3,inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)
|
||||||
|
).quant_(8);
|
||||||
|
//Pdef(\gl1).play
|
||||||
|
//s.scope(4)
|
||||||
|
|
||||||
|
Pdef(\gl2, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("gl04"),
|
||||||
|
\dur, Pseq([ 3,4,2,3,1 ] / 2,inf),
|
||||||
|
\amp, 1,
|
||||||
|
// \rate, Prand([0.8,0.9,1,1.1,1.2,1.5],inf)
|
||||||
|
)).quant_(8);
|
||||||
|
|
||||||
|
|
||||||
|
Pdef(\gl3, Pbind( \instrument, \smplr, \bufnum, ~getSmp.("gl05"),
|
||||||
|
\dur, Pseq([ 4,3,4,3,4,2,1 ] / 4,inf),
|
||||||
|
// \amp, 0.5,
|
||||||
|
\rate, Prand((90..110) * 0.01,inf),
|
||||||
|
// \pan, Prand([-0.2, 0, 0.2], inf)
|
||||||
|
)).quant_(8);
|
||||||
|
|
||||||
|
postln("--- init finished.");
|
||||||
|
"";
|
||||||
|
);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// pre-score help!
|
||||||
|
100.do({post("... hola every1, I'm Luka. Luka P. :)")})
|
||||||
|
~counter.reset
|
||||||
|
~counter.play
|
||||||
|
~counter.stop
|
||||||
|
|
||||||
|
Ndef(\n1).play
|
||||||
|
Ndef(\n1).fadeTime = 15
|
||||||
|
(
|
||||||
|
Ndef(\n1, {
|
||||||
|
var flt1, flt2, flt3, snd = WhiteNoise.ar;
|
||||||
|
flt1 = BPF.ar(snd, LFNoise1.ar(0.1).range(100,1000), 0.3);
|
||||||
|
flt2 = BPF.ar(snd, LFNoise1.ar(0.1).range(100,1000), 0.3);
|
||||||
|
flt3 = BPF.ar(snd, LFNoise1.ar(0.1).range(100,1000), 0.3);
|
||||||
|
snd = flt1 + flt2 + flt3;
|
||||||
|
snd!2 * 0.5;
|
||||||
|
});
|
||||||
|
)
|
||||||
|
// possible development
|
||||||
|
Pdef(\bsln1).play;
|
||||||
|
(
|
||||||
|
Pbindef(\bsln1,
|
||||||
|
\dur, Pseq([1,2,3] * 1/4, inf),
|
||||||
|
\degree, Pstutter(2, Pxrand([1,2,3,0] , inf)),
|
||||||
|
\mtranspose, Pstutter(20, Pxrand([1,2,3], inf) ),
|
||||||
|
\legato, Pxrand([1,2,3]*0.3, inf),
|
||||||
|
\amp, [0.3,0.9,0.1] * 0.5,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
Pdef(\strng1).play
|
||||||
|
(
|
||||||
|
Pbindef(\strng1,
|
||||||
|
\degree, Pseq([[9,4],2,8,4,1], inf),
|
||||||
|
\dur, Pseq([3,2,1]*2/8, 3),
|
||||||
|
\mtranspose, Pstutter(10,Pseq([1,0,-2,3,-3],inf)),
|
||||||
|
\ctranspose, Pseq([Pn(0,60), Pn(7,60)],inf), //later!!!
|
||||||
|
\octave, Pseq([[4,5,6],[5,6,7],[7,4,5]]-1,inf),
|
||||||
|
\octave, [3,4],
|
||||||
|
\legato, 0.1,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
Pbindef(\bd1, \dur, Pseq([3/4, 1, 1, 1, 1/4], inf))
|
||||||
|
Pbindef(\bd1, \dur, Pseq([3/4, 1, 1/2, 1/2, 1, 1/4], inf))
|
||||||
|
Pbindef(\bd1, \dur, Pseq([1/2], inf))
|
||||||
|
Pdef(\bd1).play
|
||||||
|
Pdef(\bd1).clear
|
||||||
|
|
||||||
|
Pbindef(\hh1, \dur, 1/2)
|
||||||
|
Pdef(\hh1).play
|
||||||
|
|
||||||
|
Pbindef(\hh2, \dur, Pseq([Rest(1/4),1/4],inf))
|
||||||
|
Pdef(\hh2).play
|
||||||
|
|
||||||
|
Pbindef(\hh3, \dur, 1/4)
|
||||||
|
Pbindef(\hh3, \dur, 1/8)
|
||||||
|
Pbindef(\hh3, \dur, 1/6)
|
||||||
|
Pbindef(\hh3, \dur, 1/3)
|
||||||
|
Pbindef(\hh3, \dur, Pxrand([Pn(1/8, 16), Pn(1/6,12)],inf)
|
||||||
|
Pbindef(\hh3, \dur, Pseq([Pxrand([Pn(1/8, 16), Pn(1/6,12)], 8), Rest(8)],inf))
|
||||||
|
Pdef(\hh3).play
|
||||||
|
Pdef(\hh3).stop
|
||||||
|
Pdef(\hh3).clear
|
||||||
|
|
||||||
|
Pbindef(\perc1, \dur, Pseq([2,1.5],inf))
|
||||||
|
Pdef(\perc1).play
|
||||||
|
|
||||||
|
Pbindef(\perc2, \dur, Pseq([ Pn(1/2, 3), 1/4, 1/8, 1/4 ],inf))
|
||||||
|
Pdef(\perc2).play
|
||||||
|
|
||||||
|
Pbindef(\sn1, \dur, Pseq([Rest(1),1,Rest(1), Prand([1,1/2],1)],inf) )
|
||||||
|
Pdef(\sn1).play
|
||||||
|
|
||||||
|
Pbindef(\sn2, \dur, Pseq([Rest(1),1, 1/2, 2, 1/2, 1/4],inf))
|
||||||
|
Pdef(\sn2).play; ////////////////////////////////////////////////
|
||||||
|
(
|
||||||
|
Pdef(\bsln1).stop;
|
||||||
|
Pdef(\bd1).stop;
|
||||||
|
Pdef(\bd2).stop;
|
||||||
|
Pdef(\hh1).stop;
|
||||||
|
Pdef(\hh2).stop;
|
||||||
|
Pdef(\hh3).stop;
|
||||||
|
Pdef(\sn1).stop;
|
||||||
|
Pdef(\sn2).stop;
|
||||||
|
Pdef(\perc1).stop;
|
||||||
|
Pdef(\perc2).stop;
|
||||||
|
)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue