This post has NOT been accepted by the mailing list yet.
I'm pretty new to patterns, and my requirement is as follows:
1) Implement a global adsr envelope on a Pbind.
2) Control the release trigger by setting the gate param of the Pbind.
Here's a simple example:
~gate = 1;
p = Pbind(
\freq, Pseq([60, 62, 64].midicps, inf),
\amp, Env.adsr(0.2, 0.2, 0.8, 2), // This produces only one note or so, why??
\gate, ~gate // Can I set this value to 0, while the Pbind is running?
Any other approaches are appreciated.
>I'm pretty new to patterns, and my requirement is as follows:
>1) Implement a global adsr envelope on a Pbind.
>2) Control the release trigger by setting the gate param of the Pbind.
>Here's a simple example:
>~gate = 1;
>p = Pbind(
> \freq, Pseq([60, 62, 64].midicps, inf),
> \tempo, 8,
> \amp, Env.adsr(0.2, 0.2, 0.8, 2), // This produces only one note or so, why??
> \gate, ~gate // Can I set this value to 0, while the Pbind is running?
note that you haven't subscribed to the mailing list yet,
so your post is only read by people on nabble.
People subscribed to the list, who are not using nabble, don't see it.
Several points here:
.) setting the tempo from within a Pbind is bad because it sets the default tempo clock, better take a new clock
The short answer is that gates, etc are attributes of EnvGen, not Env.
Normally, an Env is used to specify the envelope an EnvGen UGen creates.
That is something that runs on the server.
The longer story is
In this case, the Env is being treated as a "Pattern" (like Pseq).
As a stream, Env returns values based on the timing of the pattern as a function of time. One could define a PenvGen
to read the Env and do gate, releaseNode, loopNode, etc but no one has done so.
note: A Pattern specifies a Stream and creates it in response to the methods "asStream" and "embedInStream".
So, one pattern can create arbitrarily many identically specified streams.
Streams are objects that return a series of value in response to 'next'.
Is the idea you want to apply the envelope to the audio output of a free running Pbind?
If so, you could do that on the server easily enough. Play the Pbind audio on its own bus with an envelope
applied before transferring to the main bus.
NodeProxy would provide a particularly framework for that:
But is there a work around it? Seems like a simple enough requirement, to set a global adsr envelope to a Pbind.
It has two parts.
1. You need to use a SynthDef that accepts an Env as input. The default SynthDef does not. So you will need to learn how to write a SynthDef if you don't already know it, and then apply this to it... well, it's in the help, but I can't reach the online help files right now. Anyway it looks something like this: