Re: [sc-users] Pbind question

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);

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:

Best,
Max

Le jeu. 3 juin 2021 à 21:09, <manifest.heap@xxxxxxxxx> a écrit :
One easy solution would be to send the notes to a synth that uses Lag.ar
or VarLag.ar on its frequency argument, and use Pmono instead of Pbind.

Pmono ensures that the same running synth is updated as opposed to
creating a new synth for every new note.

Then you don't need to do anything special to have a glissando.

Very simple example:

(
s.waitForBoot({
var player;

SynthDef(\gliss, {
var freq = \freq.ar(440);
var amp = \amp.kr(0.1);
var out = \out.kr(0);
var lagTime = \lagTime.kr(1);
Out.ar(out, amp*LFSaw.ar(Lag.ar(in:freq, lagTime:lagTime))!2);

player = Pmono(
\gliss,
\out, 0,
\midinote, Pseq([60, 67, 72, 65, 63], inf),
\dur, Pseq([1, 1, 1, 0.5, 0.5], inf),
\lagTime, Pseq([1.9, 0.9, 1.9, 0.3, 0.1], inf),
\amp, 0.05
).play;

});
)

On 6/3/21 8:51 PM, paulineugalde@xxxxxxxxx wrote:
> Hey everyone,
> I was wondering how I'd make a smooth upward or downward slide from
> one note to another. I'm using Pseries right now, but even with a
> large legato value and small step value, it sounds choppy. I hear
> notes like this in 8-bit music a lot, so I know the end result, but
> don't know how to replicate it.
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/