scide: implement selectionLength for openDocument
[supercollider.git] / HelpSource / Classes / Penvir.schelp
blob7919619063e78835b1eca6c5470f7d555c675831
1 class:: Penvir
2 summary:: use an environment when embedding the pattern in a stream
3 related:: Classes/Pkey
4 categories:: Streams-Patterns-Events>Patterns>Data Sharing
6 ClassMethods::
8 method::new
10 argument::envir
11 an environment with objects to embed.
13 argument::pattern
14 pattern or stream, ususally a link::Classes/Pfunc::, link::Classes/Prout::.
16 argument::independent
17 if true streams can write to the environment without influencing other streams created from this pattern. if false, the streams write to a common namespace.
19 Examples::
21 code::
23 x = (a:8);
24 y = Penvir(
25         x,
26         Pfunc { ~a * 2 }
29 t = y.asStream;
32 t.next;
37 x = (a:8);
38 y = Penvir(
39         x,
40         Pfunc { ~a = ~a * 2 }
43 t = y.asStream;
44 z = y.asStream;
47 t.next;
48 t.next;
49 x.postln;       // x stays unchanged