More colorful synthesis

This commit is contained in:
2024-05-18 13:13:40 +02:00
parent 011cef1023
commit 2b15a9edfc
5 changed files with 102 additions and 46 deletions

View File

@ -7,50 +7,50 @@ Boot {
*new {
arg configPath, samplePath, serverOptions;
var p; var c; var t; var s; var d; var e; var b;
var pspace; var server; var d; var e;
BuboUtils.banner().postln;
Server.killAll;
if (serverOptions == nil, {
"-> Booting using default server configuration".postln;
s = Server.default;
s.options.numBuffers = (2048 * 2048) * 2;
s.options.maxLogins = 1;
s.options.memSize = 8192 * 64;
s.options.numWireBufs = 2048;
s.options.maxNodes = 1024 * 32;
s.options.numOutputBusChannels = 24;
s.options.numInputBusChannels = 16;
server = Server.default;
server.options.numBuffers = (2048 * 2048) * 2;
server.options.maxLogins = 1;
server.options.memSize = 8192 * 64;
server.options.numWireBufs = 2048;
server.options.maxNodes = 1024 * 32;
server.options.numOutputBusChannels = 24;
server.options.numInputBusChannels = 16;
}, {
"-> Booting using custom server configuration".postln;
s = Server.default;
server = Server.default;
// Imposing a very high number of buffers!
serverOptions.numBuffers = (2048 * 512) * 2;
s.options = serverOptions;
server.options = serverOptions;
});
// Using Ableton Link Clock to sync with other peers
this.clock = LinkClock(130 / 60).latency_(Server.default.latency).permanent_(true);
TempoClock.default = this.clock;
c = this.clock;
t = this.clock.tempo;
// Defaut local path for configuration files if not configPath
this.localPath = this.class.filenameSymbol.asString.dirname +/+ "Configuration";
this.samplePath = samplePath;
p = ProxySpace.push(s.boot, clock: this.clock);
p.quant = 4;
p.fadeTime = 0.01;
pspace = ProxySpace.push(server.boot, clock: this.clock);
pspace.quant = 4;
pspace.fadeTime = 0.01;
// Setting up the audio samples/buffers manager
Bank.lazyLoading = true;
Bank.root = this.samplePath;
"=> Loading audio samples:".postln;
Bank.list.postln;
// Post actions: installing behavior after server boot
Server.default.waitForBoot({
s.latency = 0.3;
server.latency = 0.3;
// Resume normal boot sequence
(this.localPath +/+ "Startup.scd").load;
@ -64,8 +64,10 @@ Boot {
// Installing Safety
Safety.all;
Safety(s).defName = \safeLimit;
Safety(server).defName = \safeLimit;
Safety.setLimit(1);
// Configuring the MIDI Out now
MIDIClient.init;
});

View File

@ -1,3 +1,20 @@
+ ProxySpace {
solo {
arg name, fadeTime=4;
var names = name.isArray.if({ name }, { [name] });
this.do({ |proxy|
if (names.includes(proxy.key).not, {
proxy.stop(fadeTime: fadeTime);
});
});
}
silence {|fadeTime=0|
this.stop(fadeTime: fadeTime)
}
}
+ NodeProxy {
@ -76,7 +93,6 @@
var fade = BuboUtils.getFadeFromPattern(pattern);
pattern = EventShortener.process(pattern, this.key, 'buboEvent', 1);
pattern = EffectChain.process(pattern, this.key);
"Je suis trigger".postln;
this[0] = Pbind(*pattern);
this.prepareToPlay(this, quant, fade);
^this

View File

@ -9,3 +9,5 @@ c = currentEnvironment.clock;
// Debug during development
// OSCFunc.trace(true);
a = Archive.global

View File

@ -139,7 +139,7 @@ d.list = { arg obj; obj.keys.do({arg i; i.postln}); };
),1,1,0,1,2);
sig = SinOscFB.ar(
\freq.kr(400),
\fb.kr(0),
\fb.kr(0.5),
1
);
sig = sig * env;
@ -184,10 +184,10 @@ d.list = { arg obj; obj.keys.do({arg i; i.postln}); };
var sig;
sig = MiPlaits.ar(
pitch: \freq.kr(400).cpsmidi,
timbre: \timbre.kr(0),
harm: \harm.kr(0),
timbre: \timbre.kr(0.5),
harm: \harm.kr(0.5),
engine: index,
morph: \morph.kr(0),
morph: \morph.kr(0.5),
level: \level.kr(1),
decay: \lpgdecay.kr(0),
lpg_colour: \lpgcolour.kr(0),
@ -260,8 +260,8 @@ d.list = { arg obj; obj.keys.do({arg i; i.postln}); };
var freq = \freq.kr;
sig = MiBraids.ar(
pitch: freq.cpsmidi,
timbre: \timbre.kr(0),
color: \color.kr(0),
timbre: \timbre.kr(0.5),
color: \color.kr(0.5),
resamp: 0,
decim: \decim.kr(32),
model: index,
@ -296,26 +296,6 @@ d.list = { arg obj; obj.keys.do({arg i; i.postln}); };
d.tides = z;
);
// (
// z = SynthDef('pink', {
// arg out;
// var pink = PinkTrombone.ar(
// noiseSource: BPF.ar(WhiteNoise.ar(), \noiseFilter.kr(2000)),
// freq: \freq.kr(800),
// tenseness: \tenseness.kr(0.4),
// tongueIndex: \tongueIndex.kr(30),
// tongueDiameter: \tongueDiameter.kr(3.5),
// constrictionX: \constrictionX.kr(1.5),
// constrictionY: \constrictionY.kr(2.5),
// fricativeIntens: \fricativeIntens.kr(1.5)
// );
// var env = Env.perc(\attack.kr(0.01), releaseTime: \release.kr(2.0)).kr(doneAction: 2);
// var sound = pink * env;
// OffsetOut.ar(out, Pan2.ar(sound, pos: \pan.kr(0.0)))
// }).add;
// d.pink = z;
// );
(
z = SynthDef('kick', {
arg out;
@ -336,6 +316,21 @@ d.list = { arg obj; obj.keys.do({arg i; i.postln}); };
);
(
z = SynthDef('nnkick', {
arg out;
var sig, env;
env = Env.perc(\attack.kr(0.001), \release.kr(0.8)).ar(Done.freeSelf);
sig = SinOsc.ar(\freq.kr(50) * (1 + (8 * Env.perc(0, 0.13, curve:-8).ar)));
sig = sig + (SinOsc.ar(XLine.ar(\sweep.kr(8000), 100, 0.01)) * Env.perc(0.0001,0.01).ar * -8.dbamp);
sig = sig +(BPF.ar(WhiteNoise.ar, \cutoff.kr(10120), 0.5)*Env.perc(0.0001, 0.03).ar * -8.dbamp);
sig = sig.tanh;
sig = sig * env * \amp.kr(-10).dbamp;
OffsetOut.ar(out, Pan2.ar(sig, \pan.kr(0.0)));
}).add;
d.nnkick = z;
);
(
z = SynthDef('kraut', {
/*
@ -355,7 +350,7 @@ d.list = { arg obj; obj.keys.do({arg i; i.postln}); };
var env = Env.perc(\attack.kr, \release.kr(0.5)).ar(doneAction: 2);
var sound = sin.lincurve(-1, 1, -1, 1, \curve.kr(4));
sound = sound * \amp.kr(-6).dbamp;
OffsetOut.ar(out, DirtPan.ar(sound, ~dirt.numChannels, \pan.kr(0), env))
OffsetOut.ar(out, Pan2.ar(sound, \pan.kr(0)));
}).add;
d.kraut = z;
);

View File

@ -0,0 +1,41 @@
VLPF2 {
*ar {
arg input, freq=500, resonance=1.0;
^VadimFilter.ar(input, freq: freq, resonance: resonance, type: 0)
}
}
VLPF4 {
*ar {
arg input, freq=500, resonance=1.0;
^VadimFilter.ar(input, freq: freq, resonance: resonance, type: 1)
}
}
VBPF2 {
*ar {
arg input, freq=500, resonance=1.0;
^VadimFilter.ar(input, freq: freq, resonance: resonance, type: 2)
}
}
VBPF4 {
*ar {
arg input, freq=500, resonance=1.0;
^VadimFilter.ar(input, freq: freq, resonance: resonance, type: 3)
}
}
VHPF2 {
*ar {
arg input, freq=500, resonance=1.0;
^VadimFilter.ar(input, freq: freq, resonance: resonance, type: 4)
}
}
VHPF4 {
*ar {
arg input, freq=500, resonance=1.0;
^VadimFilter.ar(input, freq: freq, resonance: resonance, type: 5)
}
}