You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.7 KiB
Plaintext
89 lines
2.7 KiB
Plaintext
s.boot;
|
|
~irA = Buffer.read(s, "/home/lcoogan/snd/samples/convolution/ir_chunks/ir_chunk_000.wav");
|
|
~irB = Buffer.read(s, "/home/lcoogan/snd/samples/freesound/vocals/ymaaela/fvocal.wav");
|
|
~irA.play;
|
|
|
|
~irA = Buffer.read(s, "/home/lcoogan/snd/ir/cantorial-granular/cantorial-ir.01s.wav");
|
|
~irB = Buffer.read(s, "/home/lcoogan/snd/ir/cantorial-granular/cantorial-ir.05s.wav");
|
|
|
|
b.play;
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/snd/releases/cantorial-resynthesis/wav/Cantor Samuel Malavsky Zechor [531eF9Py_a0].wav");
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/snd/live/2025-04-26.Basic_City_Brewery/harm/01 Ritual for Harmonica.wav", bufnum:0);
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/Misc/grave.wav");
|
|
b = Buffer.read
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/snd/live/2025-04-26.Basic_City_Brewery/trax/01-Cantor_Samual_Malavsky_Shomea_Kol_Bichios.wav");
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/snd/releases/desolation-mountain/01. Crawling and Quietly Seething Was the Figure of the Trees.wav");
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/Misc/ametsub.wav");
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/snd/releases/desolation-mountain/03. Daven That Dark Matter 'Till Harsh Light Slows Sight.wav");
|
|
|
|
b = Buffer.read(s, "/home/lcoogan/snd/releases/desolation-mountain/daven.stems/3_overhead.wav");
|
|
b = Buffer.read(s, "/home/lcoogan/snd/releases/desolation-mountain/daven.stems/2_TripleOscillator.wav"); // use this one on the last one
|
|
|
|
(
|
|
SynthDef(\convolvCrossfade, {
|
|
var sig, convA, convB, mix;
|
|
|
|
sig = PlayBuf.ar(1, b, 1, loop: 0, doneAction: 2);
|
|
|
|
// Run both convolutions
|
|
convA = Convolution2.ar(sig, ~irA.bufnum, 512);
|
|
convB = Convolution2.ar(sig, ~irB.bufnum, 512);
|
|
|
|
// Crossfade using mix control (-1 to 1)
|
|
mix = \mix.kr(0.0); // -1 = only A, 0 = 50/50, 1 = only B
|
|
convA = convA * ((1 - mix) * 0.5); // scales from 1 to 0 as mix goes from -1 to 1
|
|
convB = convB * ((1 + mix) * 0.5); // scales from 0 to 1 as mix goes from -1 to 1
|
|
|
|
Out.ar(0, (convA + convB).dup);
|
|
}).add;
|
|
)
|
|
|
|
|
|
x = Synth(\convolvCrossfade, [\mix, 1.0]);
|
|
|
|
x.set(\mix, 0);
|
|
x.set(\mix, 0.5); // Mostly IR B
|
|
x.set(\mix, -1.0); // Only IR A
|
|
x.set(\mix, 1.0); // Only IR B
|
|
|
|
|
|
|
|
|
|
// Modulate between the two
|
|
|
|
(
|
|
SynthDef(\convolvCrossfadeLFO, {
|
|
var sig, convA, convB, mix;
|
|
|
|
sig = PlayBuf.ar(1, b, 1, loop: 0, doneAction: 2);
|
|
|
|
|
|
// Run both convolutions
|
|
convA = Convolution2.ar(sig, ~irA.bufnum, 512);
|
|
convB = Convolution2.ar(sig, ~irB.bufnum, 512);
|
|
|
|
// LFO modulation for crossfade: -1 to +1
|
|
mix = SinOsc.kr(\lfoFreq.kr(0.2), 0); // add \lfoFreq arg
|
|
|
|
// Crossfade logic as before
|
|
// convA = convA * ((1 - mix) * 0.5);
|
|
// convB = convB * ((1 + mix) * 0.5);
|
|
|
|
Out.ar(0, (convA + convB).dup * 0.1);
|
|
}).add;
|
|
)
|
|
|
|
|
|
x = Synth(\convolvCrossfadeLFO, [\lfoFreq, 0.1]); // very slow modulation
|
|
x.set(\lfoFreq, 0.1);
|
|
x.set(\lfoFreq, 100); // faster modulation
|
|
|
|
s.record;
|