I’ve read through this thread and it doesn’t quite seem to be what I’m asking for, so…
I’m trying to get the values that a Pwhite or a Pseq is pulling to change over time. In the following code, I would like the Pwhite to be pulling values similar to Pwhite(0.01, 0.15)
and for this to gradually progress to be Pwhite(1, 2)
at the end.
Similarly, I can get the code to work if the pause after the series of notes is a constant number. But I’d like the pause to get longer over time - but for some reason Pseg([5, 9], 100)
doesn’t seem to work.
Here’s my code:
~aFx = Bus.audio(s, 2);
(
SynthDef(\a, {
var env, sig;
var freq = \freq.kr(60);
var numPartials = \numPartials.kr(12);
env = Env.perc(\atk.kr(0.01), \rel.kr(0.4)).ar(Done.freeSelf);
sig = WhiteNoise.ar(1) * Env.perc(0.01, 0.01).ar;
sig = DynKlank.ar(`[
[Array.fill(12, { |i| i + 1 })],
[Array.fill(12, { |i| 1/(i+1) * Rand(0.2, 1.5) })],
[Array.fill(12, { Rand(0.5, 1) })]
],
sig,
freq,
0,
\rel.kr(0.4) / 2
);
sig = RLPF.ar(sig, 6000);
sig = sig.sum * env * \amp.kr(0.2);
sig = Pan2.ar(sig, \pan.kr(0));
Out.ar(\out.kr(0), sig);
}).add;
SynthDef(\aFx, {
var sig, wet;
sig = In.ar(\in.kr(0), 2);
wet = sig;
wet = wet + (CombC.ar(sig, 5, 3) * 0.4);
wet = wet + (CombC.ar(sig, 2, 0.5) * 0.3);
wet = wet + (CombC.ar(sig, 2, 0.5) * 0.2);
wet = wet + (CombC.ar(sig, 2, 0.5) * 0.1);
wet = wet + NHHall.ar(wet);
sig = XFade2.ar(sig, wet, \mix.kr(0.5).linlin(0, 1, -1, 1));
Out.ar(\out.kr(0), sig);
}).add;
)
(
~numNotes = 15;
~length = 100;
t = Tuning.just;
x.free;
Routine {
s.sync;
x = Synth.tail(nil, \aFx, [in: ~aFx, mix: 0.2]);
Pdef(\a,
Pbind(
\instrument, \a,
\dur, Pseq([
Pwhite(
Pseg([0.01, 1], ~length, \sine),
Pseg([0.15, 2], ~length, \sine),
~numNotes - 1
),
5],
inf
),
\scale, Scale.majorPentatonic(t),
\degree, Pxrand((0..9), inf),
\root, Pstutter(~numNotes, Pseq([0, 3, 7, 10, 2, 5, 9], inf)),
\atk, 0.2,
\rel, Pseg([5, 15], ~length, \sine),
\octave, Pstutter(7, Pseq([3, 4, 5], inf)),
\amp, Pwhite(0.8, 1) * 0.2,
\pan, Pseg([0.75, -0.75, 0.75], [45, 45], \sine, inf),
\out, ~aFx
)
).play;
}.play;
)
As often occurs with Patterns, I’m unsure if this is a very basic problem, or something requiring deeper understanding - so very happy for any help!
Cheers,
Jordan