This file is indexed.

/usr/share/SuperCollider/HelpSource/Classes/NdefGui.schelp is in supercollider-common 1:3.6.3~repack-5.

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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
class:: NdefGui
summary:: a gui for a NodeProxy or Ndef
categories:: Libraries>JITLib>GUI
related:: Classes/MonitorGui, Classes/NdefParamGui, Classes/NdefMixer, Classes/ProxyMixer

description::

NdefGui provides controls for handling and editing a link::Classes/NodeProxy:: or link::Classes/Ndef::, and its monitors. NdefGui replaces link::Classes/NodeProxyEditor::. It provides:

list::
## sliders for numerical settings
## mapping of kr proxies to parameters
## optional controls for playing / monitoring
::

Both link::Classes/NodeProxy:: and link::Classes/Ndef:: implement a strong::.gui:: message, which returns a NdefGui for that NodeProxy. Overview: link::Overviews/JITLib::.

ClassMethods::

private::initClass

subsection::Creation

method::new

argument::object
the nodeproxy to be shown and edited, or nil.

argument::numItems
How many sliders or textviews for paramaters to provide. Default value is 0.

argument::parent
a parent view where NdefGui is to be shown. If nil, a window is made.

argument::bounds
bounds where the view (or window) will be shown.

argument::makeSkip
a flag whether to create and start a link::Classes/SkipJack:: for auto-updating.

argument::options
an array of symbols for options of what to display. See list below.

subsection::Class Variables

method::buttonSizes
a dict for the sizes of the different gui elements.

InstanceMethods::

subsection::Instance Variables
As in all JITGuis:
	... object, numItems, parent, bounds ...
	... zone, minSize, defPos, skin, font, skipjack ...

method::nameView, typeView, monitorGui, paramGui, fadeBox, pauseBut, sendBut, edBut
Views if they were present in the options.

Examples::

code::
	// some preparation - make an ar and a kr nodeproxy.
s.boot;
(
Ndef(\lfo, { |lofreq| SinOsc.kr(lofreq) });
Ndef(\a, { |freq=300, dens=20, amp=0.1, pan|
	Pan2.ar(Ringz.ar(Dust.ar(dens, amp / (dens.max(1).sqrt)), freq, 0.2), pan)
});
)

	// make an NdefGui. By default, this has a lot of the options on.
n = NdefGui.new;
n.object_(Ndef(\lfo));
n.object_(Ndef(\a));

Ndef(\a).set(\lofreq, 12);
::

subsection::Some configuration options

code::
	// numItems - sliders for setting parameters
n = NdefGui(Ndef(\a), 8);

	// 4 sets of configurations are provided:
n = NdefGui(Ndef(\a), 0, options: NdefGui.control);
n = NdefGui(Ndef(\a), 0, options: NdefGui.audio);
n = NdefGui(Ndef(\a), 0, options: NdefGui.big);
n = NdefGui(Ndef(\a), 0, options: NdefGui.full);


NdefGui.control;	// used for control proxies in PxMix
->	[ \name, \pausR, \sendR, \poll, \ed ]

NdefGui.audio;		// used for audio proxies in PxMix
->	[ \monitor, \playN, \name, \pausR, \sendR, \ed ]

NdefGui.big;		// used for the big NdefGui in PxMix
->	[ \name, \type, \CLR, \reset, \scope, \doc, \end, \fade,
		\monitor, \playN, \pausR, \sendR, \poll ]

			// all of 'em
NdefGui.full;
->	[ 	name, \type, \CLR, \reset, \scope, \doc, \end, \fade, \rip,
		monitor, \playN, \pausR, \sendR, \poll, \ed ]

	// the choice of elements is
	\name		a dragboth for the proxy's name
	\type		a view for the proxy's type (ir, ar + numChans, kr + numChans)
	\CLR 		button to clear proxy
	\reset		button to reset proxy nodemap
	\scope		button to scope proxy
	\doc			button to document proxy as code
	\end			button to end proxy
	\fade		EZNumber for setting proxy fadetime

	\monitor		MonitorGui for audio proxies
	\playN		a button for editing playN settings (within the MonitorGui)

	\rip		(^)	button to open a new editor on the proxy (used in PxMix)

	\pausR		a button to toggle proxy pause/resume
	\sendR		a button to re-send; alt-click tells the proxy to rebuild
	\poll		poll the proxy

	//	Planned options - not done yet:
	\morph		add a PxPreset / morph control

		// 	pass in functions to add your own elements, such as:
	\zoink -> { |ndgui| Button(ndgui.zone, 60@20).states_([["zoink"]]).action_({ ndgui.object.zoink }) };



	// make one and watch how the elements change
n = NdefGui(Ndef(\a), 4, options: NdefGui.big);

Ndef(\a).stop;
Ndef(\a).play;
Ndef(\a).vol_(0.3);
Ndef(\a).stop;

Ndef(\a).playN([2, 5]);
Ndef(\a).playN([2, 5], vol: 0.34);


	// as in ProxyMixer, left side
n = NdefGui(Ndef(\a), options: NdefGui.audio);
n = NdefGui(Ndef(\a), 4, options: NdefGui.control); // control zone
n = NdefGui(options: NdefGui.big);

n = NdefGui(bounds: 400@20, options: NdefGui.full);

	// put in a window - then no margin is added
(
w = Window().front;
w.addFlowLayout;
n = NdefGui(Ndef(\a), 4, w, options: NdefGui.big);
)


Ndef(\a, { |freq = 10| Blip.ar(freq) }).set(\freq, 200)
Ndef(\a, { |freq = 10, amp = 0.1| Blip.ar(freq) * amp })
Ndef(\a).set(\freq, 220)
Ndef(\a).set(\harm, 20)
Ndef(\a, { |freq = 10, amp = 0.1, harm = 20| Blip.ar(freq, harm) * amp })
::

subsection::Works with ProxySpace as well

code::
p = ProxySpace.push;
n = NdefGui(~test, 4);

~test.ar;
~test.play;

	// too many controls: an EZScroller helps.
(
~test = { |freq=300, dens=20, amp=0.1, pan, ping=12, tok=13, crak|
	Pan2.ar(Ringz.ar(Dust.ar(dens, amp / (dens.max(1).sqrt)), freq, 0.2), pan)
};
	// gets specs for slider ranges from global lookup in Spec.specs:
Spec.add(\dens, [0.1, 100, \exp, 0.01, 10]);
)

(	// keys go away if not needed
~test = { |freq=300, dens=20, amp=0.1|
	Pan2.ar(Ringz.ar(Dust.ar(dens, amp / (dens.max(1).sqrt)), freq, 0.2))
};
)

(	// and are added in order if needed
~test = { |freq=300, intv=0, dens=20, amp=0.1, pan, pok, ting|
	Pan2.ar(
		Ringz.ar(
			Dust.ar(dens ! 2, amp / (dens.max(1).sqrt)),
			freq * [intv, intv.neg].midiratio, 0.2))
};
)

	// changes in settings are shown:
~test.set(\freq, exprand(100.0, 2000.0));
~test.playN([0, 2]);

	// mapping kr proxies to controls is shown
~lfo = { LFNoise0.kr(8, 4) };
~test.map(\intv, ~lfo);
~test.unmap(\intv);

Spec.add(\intv, ControlSpec(0, 24, \lin, 0.01, 0));
	// setting a param value unmaps a previous control source
~test.set(\freq, rrand(200, 500), \intv, rrand(-5.5, 5.5));
::

subsection::You can drag and drop proxies between NodeProxyEditors

code::
(
//	p = ProxySpace.push(s.boot);

l = NdefGui(nil, 3).moveTo(10, 120);
m = NdefGui(nil, 3).moveTo(10, 240);
n = NdefGui(nil, 3).moveTo(10, 360);
o = NdefGui(nil, 3).moveTo(10, 480);

Spec.add(\dens, [0.1, 300, \exp]);

	// make 3 kinds of proxies: using tilde/proxyspace, Ndef, and unnamed.
~spacy = {|dens=5| Formlet.ar(Dust.ar(dens ! 2), LFDNoise0.kr(20 ! 2).lag(0.1).linexp(-1, 1, 300, 5000), 0.003, 0.03) };
Ndef(\ndeffy, { GrayNoise.ar( 0.1 ! 2) });
c = NodeProxy.audio.source_({ PinkNoise.ar(0.1 ! 2) });

	// put one in each editor
l.object_(~spacy);
m.object_(Ndef(\ndeffy));
n.object_(c);
)
	// one can also drag and drop text into the drag:
(	Ndef(\a)	)
::

subsection::test replacing keys - needed for ProxyChain

code::
(
Ndef(\a, { |freq=300, dens=20, amp=0.1, pan|
	Pan2.ar(Ringz.ar(Dust.ar(dens, amp / (dens.max(1).sqrt)), freq, 0.2), pan)
});
n = NdefGui(Ndef(\a));
)
n.addReplaceKey(\freq, \myFreak);
	// ATM needs an extra update:
x = n.object; n.object_(nil); n.object_(x);
::