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.
85 lines
2.2 KiB
Plaintext
85 lines
2.2 KiB
Plaintext
b = Buffer.read(s, "/home/lcoogan/snd/samples/scarlett/textural_nightmare.wav");
|
|
|
|
c = Buffer.read(s, "/home/lcoogan/snd/live/2025-04-26.Basic_City_Brewery/granular/Cantorial/Cantor_Samuel_Malavsky_Zechor.wav");
|
|
b.free;
|
|
|
|
(
|
|
SynthDef(\pvVocalPlay, {
|
|
arg bufnum, fftSize = 1024, amp = 1;
|
|
var in, chain, out;
|
|
var shiftLFO;
|
|
|
|
// LFOs
|
|
var brickLFO = SinOsc.kr(0.1).range(0.02, 0.2); // slowly shift the BrickWall limit
|
|
var smearLFO = LFNoise1.kr(0.3).range(5, 20); // jittery smear amount
|
|
var randRate = LFNoise1.kr(0.2).range(2, 12); // random impulse rate
|
|
|
|
in = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum), loop: 0, doneAction: 2);
|
|
chain = FFT(LocalBuf(fftSize), in);
|
|
|
|
// Modulated PV processing
|
|
// chain = PV_BrickWall(chain, 0.05);
|
|
chain = PV_MagFreeze(chain);
|
|
chain = PV_RandComb(chain, 0.1, Impulse.kr(randRate));
|
|
chain = PV_MagSmear(chain, smearLFO);
|
|
chain = PV_SpectralEnhance(chain, 1, 1, 0.1);
|
|
chain = PV_BinScramble(chain, 0.5 0.8, 0);
|
|
// Uncomment to experiment
|
|
/* shiftLFO = SinOsc.kr(0.0005).range(0.5, 2.0);
|
|
chain = PV_BinShift(chain, shiftLFO, 1);*/
|
|
|
|
out = IFFT(chain);
|
|
Out.ar(0, out ! 2 * amp);
|
|
}).add;
|
|
)
|
|
|
|
x = Synth(\pvVocalPlay, [\bufnum, c]);
|
|
|
|
|
|
(
|
|
Pbind(
|
|
\instrument, \pvVocalPlay,
|
|
\bufnum, c, // assuming you've preloaded your buffer
|
|
\dur, 5, // repeat every 5 seconds
|
|
\fftSize, Pseq([1024, 2048, 512], inf), // modulate fftSize across events
|
|
// \amp, 4;
|
|
).play;
|
|
)
|
|
|
|
|
|
|
|
// Create a multidimensional modulation map
|
|
~modMap = Array.fill([4, 4], { |i, j|
|
|
SinOsc.kr(0.05 * (i + 1) * (j + 1)).range(0.1, 0.9)
|
|
});
|
|
|
|
|
|
|
|
|
|
(
|
|
~numVoices = 6;
|
|
|
|
~loopVoices = Routine({
|
|
inf.do {
|
|
// Free old voices if they exist
|
|
if(~voices.notNil) {
|
|
~voices.do(_.free);
|
|
};
|
|
|
|
// Spawn new voices with varied modulation
|
|
~voices = Array.fill(~numVoices, { |i|
|
|
var baseRate = i.linlin(0, ~numVoices-1, 0.05, 0.2);
|
|
var smearVar = i.linlin(0, ~numVoices-1, 0.1, 0.5);
|
|
Synth(\pvVocalPlay, [
|
|
\bufnum, c,
|
|
\brickRate, baseRate,
|
|
\smearRate, smearVar,
|
|
\randRate, 0.15 + 0.03.rand
|
|
])
|
|
});
|
|
|
|
8.wait; // wait before refreshing voices
|
|
}
|
|
}).play;
|
|
)
|