PLseries dynamic scope Pseries variant 


Part of: miSCellaneous


Inherits from: Pseries


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



Creation / Class Methods


*new (start, step, length, envir)

Creates a new PLseries object.

start - Symbol or Pseries start arg. Defaults to 0.

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

step - Symbol or Pseries step arg. Defaults to 1.

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

Can be dynamically replaced by Patterns or Streams.

length - Symbol or Pseries 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(

\midinote, PLseries(0, \step) % 24 + 60,

\dur, 0.1

);

)


// prepare Environments


(

e = (step: 1);

f = e.copy;

)



// run



e.use { x = p.play(quant: 0.1) };


f.use { y = p.play(quant: 0.1) };



// replace


f.step = 2;


e.step = Pwhite(0.5, 1.5);


f.step = Pwhite(1, -3);




y.stop;


x.stop;