So I’ve been trying to wrap my head around the PSx suite and I’m getting some exciting results. It does confuse me sometimes though and I was hoping i could get some insight in a few specific conundrums.
(
~kick = Pbindef(\kickPat,
\instrument, \kick,
\dur, 0.25,
\amp, Pwrand([0, 1], [0.8, 0.2], inf),
\pan, Pwrand([0, Pwhite(-1, 1, inf)], [0.8, 0.2], inf)
);
~psKick = PS(~kick, inf, 4, 1);
~psKick.play(quant:1);
)
(
~snr = Pbindef(\snrPat,
\instrument, \snr,
\dur, 0.25,
\amp, Pif(Pfunc{~psKick.lastValues[2][\amp]>0} && Pfunc{~psKick.lastValues[0][\amp]<1}, 1, 0)
).play(quant:1);
)
This works fine when i run the patterns one by one but if I remove the separating parentheses i get this:
```ERROR: Message ‘at’ not understood.````
From what I can tell it seems like the \snrPat
patterns is trying to reach a value within ~psKick
before it has been created. Could this be what’s happening?
In that case what would be the simplest remedy? I have been trying to get around it with timing offsets and what not to no avail.
In my attempts to fix the above issue i encountered another confusion.
When I put the parentheses back in I get nothing from the \snrPat
pattern.
No error messages and no sound. It does however work after I rename the pattern so
something seems to stick to the pattern definition. This is not a huge issue but it’s probably a good thing to try to understand why it’s happening.