PLgeom dynamic scope Pgeom variant
Part of: miSCellaneous
Inherits from: Pgeom
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: Pgeom, PLseries, Event patterns and Functions, VarGui, VarGui shortcut builds
Creation / Class Methods
*new (start, grow, length, envir)
Creates a new PLgeom object.
start - Symbol or Pgeom start arg. Defaults to 0.
If a Symbol is passed, start can be assigned to an envir variable later on.
grow - Symbol or Pgeom grow arg. Defaults to 1.
If a Symbol is passed, grow can be assigned to an envir variable later on.
Can be dynamically replaced by Patterns or Streams.
length - Symbol or Pgeom 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
(
p = Pbind(
\freq, Pn(PLgeom(\start, \grow, 50)) % 2000 + 400,
\dur, 0.1
);
)
// prepare current Environment
(
~start = 100;
~grow = 1.1;
)
// from ascending to random
x = p.play;
// replace
~grow = 0.99;
~grow = 1.4;
x.stop;