Hello everyone,
I’m also very curious about this. I’ve always wondered why the Pattern class' library doesn’t seem to allow for continuous change or wavering / is conditioned upon producing angles rather than lines, or both.
VarLag is really useful to modulate a few parameters but it quickly gets out of hand if the SynthDef is complex - multiplying the total number of arguments or ControledNames by two, three or even four (!) to modulate time, curvature, warp for each paramater. I also know of the .asMap method or using a control bus but in my experience that brings in custom problems with each situation. it would be amazing to be able to use envelopes, line and so on directly as patterns.
On that note I did a few experiments today and found out something interesting: using VarLag in Pmono makes it possible to use Pseg (or Psine, Pline etc) to do just that. The Pseg times are then set in relationship with the SynthDef lag time (and delta times).
Here’s some code if you want to try it. I don’t know if this will be surprising or useful to anyone, it certainly was for me!
I was doing stuff with the following SynthDef:
SynthDef(\sinesaw, {arg out, gate = 1, legato, atk = 3, rel = 10, amp = 3, curve = 'lin', sawmul = 0.001;
var sig, sine, saw, env, freq;
// gate = KeyState.kr(5, 0, 1);
freq = VarLag.kr(\
freq.kr(100), \
gliss.kr(1));
env = Env.asr(atk, 2, rel, curve).kr(2, gate);
sine = SinOsc.ar({freq* rrand(0.99, 1.01)}!3, 0, 0.1) * 0.5;
saw = LFSaw.ar({freq * rrand(0.99, 1.01)}!3, 0, sawmul);
sig = sine + saw;
sig = Splay.ar(sig * env * amp);
Out.ar(out, sig);
}).add;
Then you may evaluate this line:
Pmono(\sinesaw, \freq, Pseg([200, 1000], 10, repeats:inf)).play;
Or this one:
Pmono(\sinesaw, \freq, Pseg([200, 1000], 10, -30, 1)).play;
Note that this doesn't work if you provide only an argument or ControledName for frequency.
Nor does it work if the VarLag time is inferior to delta time.
And finally…
Pmono(\sinesaw, \freq, Pseg([200, 1000], 1, repeats:inf)).play;
At this point nothing happens… as though the glissando didn't have time to start.
In the two previous Pmono there is a small lag at the start in which nothing moves. Something to do with the interaction of Pseg and delta times to produce new values (looks like it with a .poll) ? I don’t know enough to understand this unfortunately.
Shortening the delta time allows for shorter Pseg times, but also more precision with levels:
Pmono(\sinesaw, \dur, 0.1, \freq, Pseg([200, 1000], 1, repeats:inf)).play;
The above examples didn’t actually go til 1000, this one almost does:
Pmono(\sinesaw, \dur, 0.01, \freq, Pseg([200, 1000], 10, 'lin', repeats:1).poll, \amp, 1.3).play;
Is there a way to bypass \dur in this case since it seems that continuous values are calculated regardless by Pseg (this is audible)?
Pmono(\sinesaw, \dur, 1, \gliss, 1, \freq, Pseg([200, 1000, 430], [3, 10], 'lin', repeats:1).poll, \amp, 1.3).play;
So with only a VarLag time for each parameter it is possible to use Pseg (or Pline etc..) for controlling times, levels and curves all in one line in a Pmono. However this still requires multiplying variables and parameters in the SynthDef by 2. Furthermore, the impact of delta time leads to various obstacles and again rigidity in the process.
If anyone knows of any alternatives I am, like Pauline, all ears and eyes. So far I have avoided the Pattern class precisely for that reason. I don’t really like (what I understand of) its conception of time - as a grid that underlies and cuts everything. It makes for a good piano but also strictures the organic-abstract potential of audio synthesis imo. On the contrary functions allow to think of time in movement or as a ‘soft’, malleable entity (anyone who’s read Bergson will know where I’m coming from!) indissociable from movement. I find that wonderful, so please let me know if I simply just misunderstand Patterns or otherwise how they could be tweaked !
On a related note here’s a video about gamakas in Indian music, I wonder if there are any libraries that explore these:
https://www.youtube.com/watch?v=AIPraIlSmIkBest,
Max