Commit e511d43b authored by Kenneth Flak's avatar Kenneth Flak

flutter with voice

parent 4953105f
/home/kf/mySamples/flutterSpeak
\ No newline at end of file
/home/kf/mySamples/nuggetsLong
\ No newline at end of file
/home/kf/mySamples/dancingBodies/NuggetsPhrase.wav
\ No newline at end of file
This diff is collapsed.
(
var lowRateBegin = 1;
var lowRateTarget = 0.125;
var lowRate = lowRateBegin;
var highRateBegin = 2;
var highRateTarget = 0.25;
var highRate = highRateBegin;
var rateTime = 120;
~mbFlutterFx.do(_.free);
~mbFlutter.do(_.free);
~mbFlutterFx = List.new(0);
~mbLowRateEnv.stop;
~mbHighRateEnv.stop;
4.do{
~mbFlutterFx.add(
FxChain.new(
......@@ -19,7 +30,7 @@
);
~mbFlutterFx[0].add(\eq, [
\locut, 120,
\hishelfdb, -6,
\hishelfdb, -12,
]);
//---------------------------------------------------------
~mbFlutterFx[1].add(\jpverb, [
......@@ -28,7 +39,7 @@
]);
~mbFlutterFx[1].add(\eq, [
\locut, 120,
\hishelfdb, -6,
\hishelfdb, -12,
]);
//---------------------------------------------------------
~mbFlutterFx[2].add(\greyhole, [
......@@ -38,9 +49,12 @@
]);
~mbFlutterFx[2].add(\eq, [
\locut, 500,
\hishelfdb, -6,
\hishelfdb, -12,
]);
////---------------------------------------------------------
//---------------------------------------------------------
~mbLowRateEnv = KFEnv.new([lowRateBegin, lowRateTarget], [rateTime], 5).play;
~mbHighRateEnv = KFEnv.new([highRateBegin, highRateTarget], [rateTime], 5).play;
~mbFlutter = ~mb.collect{|id, idx|
MBDeltaTrig.new(
......@@ -51,26 +65,26 @@
maxAmp: -0,
function: {|dt, minAmp, maxAmp|
var currentFx;
var buf = ~buf[\nuggets] ++ ~buf[\birdSong];
var numFrames = buf[1].numFrames;
var buf = ~buf[\flutterSpeak].choose;
var numFrames = buf.numFrames;
var currentPos = numFrames.rand;
var dur = rrand(0.1, 0.2);
var step = dur * s.sampleRate;
var durFrom = rrand(0.1, 0.2);
var durTo = rrand(0.1, 0.2);
var step = durFrom * s.sampleRate;
var count = 20;
var len = dt.linlin(0.0, 1.0, step, step * count);
// var pos = 8.collect({rrand(0, numFrames)});
var pos = (currentPos, currentPos+step..currentPos+len).mod(numFrames);
var time = pos[pos.size-1] - pos[0] / s.sampleRate;
Pbind(
\instrument, \playbuf,
\buf, buf.choose,
\dur, dur,
\buf, buf,
\dur, Pseg(durFrom, durTo, time),
\attack, Pkey(\dur) * 0.5,
\release, Pkey(\dur) * 1.5,
\startPos, Pseq(pos),
\legato, Pwhite(0.1, 0.4),
\rate, Pexprand(0.125, 4.0),
\legato, Pwhite(0.1, 0.2),
\rate, Pexprand(~mbLowRateEnv.value, ~mbHighRateEnv.value),
\db, dt.linlin(0.0, 1.0, minAmp, maxAmp),
\pan, Pseg(Pwhite(0.0, 1.0), Pwhite(0.0, 1.0), time),
\out, Pfunc({
......@@ -87,14 +101,9 @@
~mbFlutterFx.do(_.play);
~mbFlutter.do(_.play);
// ~mbFlutter[0].play;
// ~mbFlutter[1].play;
// ~mbFlutter[2].play;
// ~mbFlutter[3].play;
)
(
~mbFlutterFx.do(_.free);
~mbFlutter.do(_.free);
)
s.plotTree;
(
~mbFlutterFx.do(_.free);
~mbFlutter.do(_.free);
~mbFlutterFx = List.new(0);
4.do{
~mbFlutterFx.add(
FxChain.new(
fadeInTime: 10,
level: 6.dbamp,
fadeOutTime: 10,
out: ~masterBus,
);
);
};
~mbFlutterFx[0].addPar(
\comb, [\mix, 0.3, \delay, 0.2, \decay, 1, \amp, 1/3],
\comb, [\mix, 0.3, \delay, 0.5, \decay, 1, \amp, 1/3],
\comb, [\mix, 0.3, \delay, 0.7, \decay, 1, \amp, 1/3],
);
~mbFlutterFx[0].add(\eq, [
\locut, 120,
\hishelfdb, -6,
]);
//---------------------------------------------------------
~mbFlutterFx[1].add(\jpverb, [
\revtime, 2,
\mix, 0.1
]);
~mbFlutterFx[1].add(\eq, [
\locut, 120,
\hishelfdb, -6,
]);
//---------------------------------------------------------
~mbFlutterFx[2].add(\greyhole, [
\delayTime, 0.3,
\feedback, 0.6,
\mix, 0.1
]);
~mbFlutterFx[2].add(\eq, [
\locut, 500,
\hishelfdb, -6,
]);
//---------------------------------------------------------
~mbFlutter = ~mb.collect{|id, idx|
MBDeltaTrig.new(
speedlim: 0.5,
threshold: 0.05,
minibeeID: id,
minAmp: -12,
maxAmp: -0,
function: {|dt, minAmp, maxAmp|
var currentFx;
var buf = ~buf[\birdSong][0];
// var buf = (~buf[\nuggets] ++ ~buf[\birdSong]).choose;
var numFrames = buf.numFrames;
var currentPos = numFrames.rand;
var durFrom = rrand(0.1, 0.2);
var durTo = rrand(0.1, 0.2);
var step = durFrom * s.sampleRate;
var count = 20;
var len = dt.linlin(0.0, 1.0, step, step * count);
// var pos = 8.collect({rrand(0, numFrames)});
var pos = (currentPos, currentPos+step..currentPos+len).mod(numFrames);
var time = pos[pos.size-1] - pos[0] / s.sampleRate;
Pbind(
\instrument, \playbuf,
\buf, buf,
\dur, Pseg(durFrom, durTo, time),
// \attack, 0,
\attack, Pkey(\dur) * 0.5,
\release, Pkey(\dur) * 1.5,
\startPos, Pseq(pos),
\legato, Pwhite(0.1, 0.4),
\rate, Pexprand(0.5, 4.0),
\db, dt.linlin(0.0, 1.0, minAmp, maxAmp),
\pan, Pseg(Pwhite(0.0, 1.0), Pwhite(0.0, 1.0), time),
\out, Pfunc({
currentFx = ~mbFlutterFx.choose;
currentFx.in
}),
\group, Pfunc({
currentFx.group
}),
).play;
}
);
};
~mbFlutterFx.do(_.play);
~mbFlutter.do(_.play);
// ~mbFlutter[0].play;
// ~mbFlutter[1].play;
// ~mbFlutter[2].play;
// ~mbFlutter[3].play;
)
(
~mbFlutterFx.do(_.free);
~mbFlutter.do(_.free);
)
s.plotTree;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment