You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

266 lines
6.9 KiB

/*
This file is part of "Interface Fractures III - Silicon".
Copyright (c) 2015 Luka Prinčič, All right reserved.
This program is free software distributed under
GNU General Public Licence. See COPYING for more info.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
sdefs.scd - should contain most of SynthDefs ...
********************************************************** */
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NOISE
SynthDef(\StandardMap, {
arg out=0, minfreq=10, maxfreq=22,
k=1.4, x0=4.9789799812499, y0=5.7473416156381,
ampN=0, ampL=0, ampC=0,
amp=0, bpffreq=20000, bpfrq = 100 ;
var signal ;
postln("~~~ Loading StandardMap to server...");
// poor man's stereo expander
minfreq = [minfreq, minfreq +1 ];
maxfreq = [maxfreq, maxfreq -1 ];
/* Standard2DN.ar(minfreq: 11025, maxfreq: 22050,
k: 1.4, x0: 4.9789799812499, y0: 5.7473416156381, mul: 1, add: 0) */
signal = Standard2DN.ar( minfreq, maxfreq, k, x0, y0, ampN )
+ Standard2DL.ar( minfreq, maxfreq, k, x0, y0, ampL )
+ Standard2DC.ar( minfreq, maxfreq, k, x0, y0, ampC );
// band pass filter // ----- BPF.ar(in: 0, freq: 440, rq: 1, mul: 1, add: 0)
signal = BPF.ar(in: signal, freq: bpffreq.min(bpffreq / bpfrq), rq: bpfrq);
signal = signal * amp;
signal = signal.clip2(0.99);
Out.ar(out, signal)
}).add;
//Gbman2DN Gbman2DL Gbman2DC GbmanTrig
//(minfreq: 11025, maxfreq: 22050, x0: 1.2, y0: 2.1, mul: 1, add: 0)
SynthDef(\GbmanMap, {
arg out=0, minfreq=10, maxfreq=22,
x0=1.2, y0=2.1,
ampN=0, ampL=0, ampC=0,
amp=0, bpffreq=20000, bpfrq = 100 ;
var signal ;
postln("~~~ Loading GbmanMap to server...");
// poor man's stereo expander
minfreq = [minfreq, minfreq +1 ];
maxfreq = [maxfreq, maxfreq -1 ];
signal = Gbman2DN.ar( minfreq, maxfreq, x0, y0, ampN )
+ Gbman2DL.ar( minfreq, maxfreq, x0, y0, ampL )
+ Gbman2DC.ar( minfreq, maxfreq, x0, y0, ampC );
// band pass filter // ----- BPF.ar(in: 0, freq: 440, rq: 1, mul: 1, add: 0)
signal = BPF.ar(in: signal, freq: bpffreq.min(bpffreq / bpfrq), rq: bpfrq);
signal = signal * amp;
signal = signal.clip2(0.99);
Out.ar(out, signal)
}).add;
//Henon2DN
// a: 1.4, b: 0.3,
// x0: 0.30501993062401, y0: 0.20938865431933,
SynthDef(\HenonMap, {
arg out=0, minfreq=10, maxfreq=22,
a = 1.4, b = 0.3,
x0 = 0.30501993062401, y0 = 0.20938865431933,
ampN=0, ampL=0, ampC=0,
amp=0, bpffreq=20000, bpfrq = 100 ;
var signal ;
// poor man's stereo expander
minfreq = [minfreq, minfreq +1 ];
maxfreq = [maxfreq, maxfreq -1 ];
signal = Henon2DN.ar( minfreq, maxfreq, a, b, x0, y0, ampN )
+ Henon2DL.ar( minfreq, maxfreq, a, b, x0, y0, ampL )
+ Henon2DC.ar( minfreq, maxfreq, a, b, x0, y0, ampC );
// band pass filter // ----- BPF.ar(in: 0, freq: 440, rq: 1, mul: 1, add: 0)
signal = BPF.ar(in: signal, freq: bpffreq.min(bpffreq / bpfrq), rq: bpfrq);
signal = signal * amp;
signal = signal.clip2(0.99);
Out.ar(out, signal);
postln("~~~ Loading HenonMap to server...");
}).add;
SynthDef(\LatoocarfianMap, {
/* a: 1, b: 3, c: 0.5, d: 0.5,
x0: 0.34082301375036, y0: -0.38270086971332, */
arg out=0, minfreq=10, maxfreq=22,
a = 1, b = 3, c = 0.5, d = 0.5,
x0 = 0.34082301375036, y0 = -0.38270086971332,
ampN=0, ampL=0, ampC=0,
amp=0, bpffreq=20000, bpfrq = 100 ;
var signal ;
// poor man's stereo expander
minfreq = [minfreq, minfreq +1 ];
maxfreq = [maxfreq, maxfreq -1 ];
/* Latoocarfian2DN.ar(minfreq: 11025, maxfreq: 22050,
k: 1.4, x0: 4.9789799812499, y0: 5.7473416156381, mul: 1, add: 0) */
signal = Latoocarfian2DN.ar( minfreq, maxfreq, a, b, c, d, x0, y0, ampN )
+ Latoocarfian2DL.ar( minfreq, maxfreq, a, b, c, d, x0, y0, ampL )
+ Latoocarfian2DC.ar( minfreq, maxfreq, a, b, c, d, x0, y0, ampC );
// band pass filter // ----- BPF.ar(in: 0, freq: 440, rq: 1, mul: 1, add: 0)
signal = BPF.ar(in: signal, freq: bpffreq.min(bpffreq / bpfrq), rq: bpfrq);
signal = signal * amp;
signal = signal.clip2(0.99);
Out.ar(out, signal);
postln("~~~ Loading LatoocarfianMap to server...");
}).add;
/*
s: 10, r: 28, b: 2.6666667, h: 0.02,
x0: 0.090879182417163, y0: 2.97077458055, z0: 24.282041054363, */
SynthDef(\LorenzMap, {
/* a: 1, b: 3, c: 0.5, d: 0.5,
x0: 0.34082301375036, y0: -0.38270086971332, */
arg out=0, minfreq=10, maxfreq=22,
s = 10, r = 28, b = 2.6666667, h = 0.02,
x0 = 0.090879182417163, y0 = 2.97077458055, z0 = 24.282041054363,
ampN=0, ampL=0, ampC=0,
amp=0, bpffreq=20000, bpfrq = 100 ;
var signal ;
// poor man's stereo expander
minfreq = [minfreq, minfreq +1 ];
maxfreq = [maxfreq, maxfreq -1 ];
signal = Lorenz2DN.ar( minfreq, maxfreq, s, r, b, h, x0, y0, z0, ampN )
+ Lorenz2DL.ar( minfreq, maxfreq, s, r, b, h, x0, y0, z0, ampL )
+ Lorenz2DC.ar( minfreq, maxfreq, s, r, b, h, x0, y0, z0, ampC );
// band pass filter // ----- BPF.ar(in: 0, freq: 440, rq: 1, mul: 1, add: 0)
signal = BPF.ar(in: signal, freq: bpffreq.min(bpffreq / bpfrq), rq: bpfrq);
signal = signal * amp;
signal = signal.clip2(0.99);
Out.ar(out, signal);
postln("~~~ Loading LorenzMap to server...");
}).add;
/* urate: 0.1, wrate: 0.1,
b0: 0.6, b1: 0.8,
i: 0, u0: 0, w0: 0, */
SynthDef(\FhnMap, {
arg out=0, minfreq=10, maxfreq=22,
urate = 0.1, wrate = 0.1,
b0 = 0.6, b1 = 0.8,
i = 0, u0 = 0, w0 = 0,
ampN=0, ampL=0, ampC=0,
amp=0, bpffreq=20000, bpfrq = 100 ;
var signal ;
// poor man's stereo expander
minfreq = [minfreq, minfreq +1 ];
maxfreq = [maxfreq, maxfreq -1 ];
signal = Fhn2DN.ar( minfreq, maxfreq, urate, wrate, b0, b1, i, u0, w0, ampN )
+ Fhn2DL.ar( minfreq, maxfreq, urate, wrate, b0, b1, i, u0, w0, ampL )
+ Fhn2DC.ar( minfreq, maxfreq, urate, wrate, b0, b1, i, u0, w0, ampC );
// band pass filter // ----- BPF.ar(in: 0, freq: 440, rq: 1, mul: 1, add: 0)
signal = BPF.ar(in: signal, freq: bpffreq.min(bpffreq / bpfrq), rq: bpfrq);
signal = signal * amp;
signal = signal.clip2(0.99);
Out.ar(out, signal);
postln("~~~ Loading FhnMap to server...");
}).add;
// GRANULATORS
SynthDef(\Granny, {
arg bufnum,
freq = 10, fvar = 1,
dur = 0.1, durvar = 0,
pos = 0, posvar = 0,
pitch = 1, pitchvar = 0,
width = 0.2,
gain = 0.5,
lpfFreq = 400
;
var signal;
signal = GrainBuf.ar(
numChannels: 2, // we want stereo!
trigger: Impulse.kr(freq + (freq * (fvar * LFNoise2.kr(freq)))), // a UGen?
dur: dur + (durvar * LFNoise2.kr(freq)), // in seconds
sndbuf: bufnum,
rate: pitch + (pitchvar * LFNoise2.kr(5)), // pitch !! WHAT IS THE SPEED OF VARIATIONS? setable??
pos: pos + (posvar * LFNoise2.kr(freq)), // position 0-1
interp: 2, // interpolation for pitchshifting
pan: LFNoise1.kr(10).range(width.neg, width), // if numChannels=2, similar to Pan2, -1 left, +1 right
// envbunum: -1, // the buffer number cont. grain envelope
maxGrains: 512,
mul: gain,
add: 0
);
signal = LPF.ar(
in: signal,
freq: lpfFreq);
Out.ar(0, signal);
postln("~~~ adding SynthDef: Granny ...");
}).add;