PLlprand dynamic scope Plprand variant 


Part of: miSCellaneous


Inherits from: Plprand


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: Plprand, PLhprand, Event patterns and Functions, VarGui, VarGui shortcut builds



Creation / Class Methods


*new (lo, hi, length, envir)

Creates a new PLlprand object.

lo - Symbol or Plprand lo arg. Defaults to 0.

If a Symbol is passed, lo can be assigned to an envir variable later on.

Can be dynamically replaced by Patterns or Streams.

hi - Symbol or Plprand hi arg. Defaults to 1.

If a Symbol is passed, hi can be assigned to an envir variable later on.

Can be dynamically replaced by Patterns or Streams.

length - Symbol or Plprand 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 = PLlprand(\lo, \hi);



// prepare current Environment

// PLseq repeats arg defaults to inf


(

~lo = 60;

~hi = PLseq((92..62));

)



// run


(

x = Pbind(

\midinote, Ptuple(p!5), 

\dur, 0.1,

\amp, 0.05

).play;

)



// replace, converging bounds


(

~lo = PLseq((40..70) ++ (70!5));

~hi = 70.5;

)


x.stop;



// compare this example with hi-weighted PLhprand