PLgauss dynamic scope Pgauss variant
Part of: miSCellaneous
Inherits from: Pgauss
Takes Symbol args for later reference by the Streams, which will read from variables in the Environments of their instantiation. See PLx suite.
See also: Pgauss, Event patterns and Functions, VarGui, VarGui shortcut builds
Creation / Class Methods
*new (mean, dev, length, envir)
Creates a new PLgauss object.
mean - Symbol or Pgauss mean arg. Defaults to 0.
If a Symbol is passed, mean can be assigned to an envir variable later on.
Can be dynamically replaced by Patterns or Streams.
dev - Symbol or Pgauss dev arg. Defaults to 1.
If a Symbol is passed, dev can be assigned to an envir variable later on.
Can be dynamically replaced by Patterns or Streams.
length - Symbol or Pgauss length arg. Defaults to inf.
If a Symbol is passed, length can be assigned to an envir variable later on.
envir - Dictionary or one of the Symbols
\top, \t (topEnvironment), \current, \c (currentEnvironment).
Dictionary to be taken for variable reference. Defaults to \current.
Examples
(
s = Server.local;
Server.default = s;
s.boot;
)
// definition for future reference in arbitrary Environments,
// Gauss distribution is not bounded, so do clip !
(
p = Pbind(
\midinote, PLgauss(\mean, \dev).clip(60, 90),
\dur, 0.1
);
)
// prepare current Environment
(
~mean = 75;
~dev = 0.3;
)
// run
x = p.play;
// move mean value and distribution
// PLseq defaults to repeats = inf
(
~mean = PLseq((80, 79.75..70.25));
~dev = Pstutter(8, PLseq([4, 0]));
)
x.stop;