This file is indexed.

/usr/share/SuperCollider/HelpSource/Classes/ProxySpace.schelp is in supercollider-common 1:3.8.0~repack-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
class:: ProxySpace
summary:: an environment of references on a server
categories:: Libraries>JITLib>Environments, Live Coding, Collections>Unordered
related:: Classes/NodeProxy, Classes/ProxyMixer, Overviews/JITLib

description::
Generally a strong::proxy:: is a placeholder for something. A node proxy is a placeholder for something strong::playing on a server:: that writes to a limited number of busses (e.g. a synth or an event stream). NodeProxy objects can be replaced and recombined while they play. Also they can be used to build a larger structure which is used and modified later on. Overview: link::Overviews/JITLib::

When accessed, ProxySpace returns a link::Classes/NodeProxy::. A similar class without environment: link::Classes/Ndef::

For more examples see: link::Tutorials/JITLib/proxyspace_examples::, link::Tutorials/JITLib/jitlib_basic_concepts_01::

For GUI overview, see link::Classes/ProxyMixer::. See link::Classes/NodeProxy:: for many relevant methods.

subsection::First Example

code::
s.boot;

p = ProxySpace.new;
p.fadeTime = 2; // fadeTime specifies crossfade
p[\out].play; // monitor an empty placeholder through hardware output
// set its source
p[\out] = { SinOsc.ar([350, 351.3], 0, 0.2) };
p[\out] = { Pulse.ar([350, 351.3] / 4, 0.4) * 0.2 };
p[\out] = Pbind(\dur, 0.03, \freq, Pbrown(0, 1, 0.1, inf).linexp(0, 1, 200, 350));

// route one proxy through another:
p[\out] = { Ringz.ar(p[\in].ar, [350, 351.3] * 8, 0.2) * 4 };
p[\in] = { Impulse.ar([5, 7]/2, [0, 0.5]) };

a.clear(3); // clear after 3 seconds
b.clear(3);
::

ClassMethods::

private::initClass

subsection::Creation

method::new

argument::server
a link::Classes/Server:: object. Note that on remote computers the clock must be in sync.

argument::name
a link::Classes/Symbol::. If a name is given, the proxy space is strong::stored:: in code::ProxySpace.all:: under this name.

argument::clock
for event-based or beat-sync playing use a link::Classes/TempoClock::.

method::push
replace the currentEnvironment with a new ProxySpace and strong::clear:: the current one, if it is a ProxySpace (this is to avoid piling up proxy spaces).

In order to move to another ProxySpace while keeping the current, use strong::pop:: and then strong::push:: a new one. To have multiple levels of proxy spaces, use strong::.new.push;::

method::pop
restore the previous currentEnvironment

method::clearAll
clear all registered spaces

InstanceMethods::

subsection::Play back and access

method::play
returns a group that plays the link::Classes/NodeProxy:: at that strong::key::.

argument::key
a link::Classes/Symbol::

argument::out
output channel offset

argument::numChannels
play this number of channels.

method::record
returns a link::Classes/RecNodeProxy:: that records the NodeProxy at that key.

method::ar, kr
returns a NodeProxy output that plays the NodeProxy at that key, to be used within a function used as input to a node proxy

method::wakeUp
when the proxyspace is created without a running server this method can be used. To run it (internally this is done by link::#-play:: as well).

method::fadeTime
set the fadetime of all proxies as well as the default fade time

method::clock
set the clock of all proxies as well as the default clock.

method::quant
set the quant of all proxies as well as the default quant.

method::free
free all proxies (i.e. free also the groups, do not stop the monitors)

method::release
release all proxies (i.e. keep the groups running)

method::stop
stop all proxies (stop only monitors, do not stop synths)

method::end
end all proxies (free and stop the monitors)

method::clear
clear the node proxy and remove it from the environment. this frees all buses. If a fadeTime is given, first fade out, then clear.

method::add
add the ProxySpace to the repository (name required)

method::remove
remove the ProxySpace from the repository

subsection::Setting the sources

The strong::rate:: and strong::numChannels:: of the link::Classes/NodeProxy:: determined in a lazy way from the first object put into this environment (see helpfile). Once it is created it can only be set to a function that returns the same rate and a number of channels equal to the intial one or smaller. For details, see link::Tutorials/JITLib/the_lazy_proxy::.

method::put
Gets the NodeProxy at strong::key:: (if none exists, returns a new one) and sets its source to strong::obj::. For how this works, see also link::Classes/LazyEnvir:: and link::Classes/NodeProxy::.

method::at
Return the proxy source object at that key.

subsection::garbage collecting

method::clean
free and remove all proxies that are not needed in order to play the ones passed in with 'exclude'. if none are passed in, all proxies that are monitoring (with the .play message) are kept as well as their parents etc.

method::reduce
free all proxies that are not needed in order to play the ones passed in with 'to'. if none are passed in, all proxies that are monitored (with the play message) are kept as well as their parents etc.

subsection::making copies

method::copy
Copies the environment into a new one, with each proxy being copied as well (See: link::Classes/NodeProxy#-copy::). Also the instance variables that determine the ProxySpace behaviour are included, such as server, fadeTime, quant, reshaping (this happens in the code::copyState:: method).

code::
p = ProxySpace.push(s.boot);
p.reshaping = \elastic;
~out.play;
~out = { Blip.ar(~freq, ~numharm) };
~freq = 70;
~numharm = { MouseX.kr(2, 100, 1) };

q = p.copy; p.pop; q.push;

q.reshaping.postln; // also elastic
~out.play;
~freq = { MouseY.kr(2, 1000, 1) * [1, 1.2] };

p.end; q.end;
::


subsection::Writing code

method::document
creates a new document with the current proxyspace state. This does not allow open functions as proxy sources. see: link::Tutorials/JITLib/jitlib_asCompileString::.

argument::keys
list of keys to document a subset of proxies

argument::onlyAudibleOutput
a boolean.

argument::includeSettings
a boolean.

Examples::

code::
// ProxySpace returns instances of NodeProxy:
a = NodeProxy(s) 	is equivalent to ~a;
a.source = ...		is equivalent to ~a = ...
a[3] = ...		is equivalent to ~a[3] = ...

// the two expressions are equivalent:
~out = something;
currentEnvironment.put(\out, something);
::

code::
// examples

p = ProxySpace.push(s.boot); // use ProxySpace as current environment.

~out.play;

~out = { SinOsc.ar([400, 407] * 0.9, 0, 0.2) };

~out = { SinOsc.ar([400, 437] * 0.9, 0, 0.2) * LFPulse.kr([1, 1.3]) };

~out = { SinOsc.ar([400, 437] * 0.9, 0, 0.2) * ~x.kr(2) };

~x = { LFPulse.kr([1, 1.3] * MouseX.kr(1, 30, 1)) };

~out = { SinOsc.ar([400, 437] * Lag.kr(0.1 + ~x, 0.3), 0, 0.2) * ~x };

p.fadeTime = 5;

~out = { SinOsc.ar([400, 437] * 1.1, 0, 0.2) * ~x.kr(2) };

p.clear(8); // end and clear all in 8 sec.


p.pop; // move out.
::