This file is indexed.

/usr/share/SuperCollider/HelpSource/Classes/SelectXFocus.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
class:: SelectXFocus
summary:: Mix one output from many sources
categories:: UGens>Multichannel>Select
related:: Classes/Select, Classes/SelectX, Classes/LinSelectX

description::
The output is mixed from an array of inputs, linearly interpolating from a number of adjacent channels.

A focus argument allows to control how many adjacent sources are mixed. (by adc)

classmethods::
method:: ar, kr

argument:: which
argument:: array
argument:: focus

examples::
code::
(
{
	var a;
	a = [
			Saw.ar(LFSaw.kr(3 * [1, 1.01], 0, 100, 230)),
			SinOsc.ar,
			Pulse.ar(LFPulse.kr(3 * [1, 1.02], 0, 0.4, 100, 230)),
			SinOsc.ar(SinOsc.kr(4 * [1, 1.03], 0, 200, 300))
		];

	SelectXFocus.ar(MouseX.kr(0, 1) * a.size, a, MouseY.kr(0, a.size)) * 0.2
}.play;
)
::

note::
all the ugens are continously running. This may not be the most efficient way if each input is  cpu-expensive. The array is fixed at the time of writing the SynthDef, and the whole array is embedded in the SynthDef file itself.  For small arrays this is more efficient than reading from a buffer.
::

code::
// radio tuner
// (jrh) (cc 2006)
(
{
	var a, n, mx, my, mwrap;
	n = 8;
	mx = MouseX.kr(0, 1, 0, 0.1);
	my = MouseY.kr;
	mwrap = { |pmin, pmax, min, max| sin(mx * ExpRand(pmin, pmax)) + 1 * 0.5 * ExpRand(min, max) };
	a = {
		var freq, fmul, phase;
		freq = mwrap.(10, 40, 200, 5000) + ExpRand(200, 3000);
		fmul = LFNoise0.kr(ExpRand(0.1, 8)).round(1/6).exprange(1, Rand(1, 1.2));
		phase = LFNoise2.ar(mwrap.(1, 20, 10, 1000), Rand(2, 5));
		SinOsc.ar(freq * fmul, phase)
	} ! n;
	a = a.add(
		SinOsc.ar(LFDNoise0.kr(11, SetResetFF.kr(*Dust.kr([1, 2] * 0.3))).range(0, 700) + 220)
	);
	SelectXFocus.ar(mx * n, a, my * n) * 0.2 + OnePole.ar(PinkNoise.ar(0.5 ! 2), 0.4)
	* Line.kr(0, 1, 3);
}.play;
)


// jimmy played harmonica in the pub where I was born
// (hh) (jrh) (cc 2006)
(
{
	var blas, zieh, mx, my, trig, which, amp, u, schnauf;
	var del = 9, det = 0.1;
	schnauf = 0.3;
	mx = MouseX.kr;
	my = MouseY.kr(0.1, 2, 1);

	blas = [0, 12, 24] +.x [60, 64, 67] ++ [60+36];
	zieh = [62, 67, 71,   74, 77, 81, 83,   86, 89, 93];

	trig = Dust.kr(1);
	which = ToggleFF.kr(TDelay.kr(trig, schnauf));
	amp = EnvGen.kr(Env([1, 0, 1], [schnauf, schnauf]), trig);
	blas = Select.kr(which, [blas, zieh]);
	u = SelectXFocus.ar(
		mx * blas.size,
		blas.collect {|f|
			Pulse.ar((Rand(-0.04, 0.09) + f).midicps * 0.5, 0.48 + LFNoise1.kr(0.06, 0.1), 0.2)
		},
		my
	) * Slope.kr(mx + my).abs.lag2(2) * amp;
	u = Pan2.ar(OnePole.ar(u, -0.3), mx * 2 - 1);
	DelayL.ar(BPF.ar(u * 2, 1500, 0.3), del + det, LFNoise2.kr(0.2, det, del)) + u
}.play;
);
::