This file is indexed.

/usr/share/SuperCollider/HelpSource/Classes/Warp1.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
class:: Warp1
summary:: Warp a buffer with a time pointer
categories:: UGens>Buffer, UGens>Generators>Granular

description::
Inspired by Chad Kirby's SuperCollider2 Warp1 class, which was inspired by Richard Karpen's sndwarp for CSound. A granular time strecher and pitchshifter.

classmethods::
private:: categories

method:: ar
argument::numChannels
the number of channels in the soundfile used in bufnum.

argument::bufnum
the buffer number of a mono soundfile.

argument::pointer
the position in the buffer.  The value should be between 0 and 1, with 0 being the begining
of the buffer, and 1 the end.

argument::freqScale
the amount of frequency shift. 1.0 is normal, 0.5 is one octave down, 2.0 is one octave up.
Negative values play the soundfile backwards.

argument::windowSize
the size of each grain window.

argument::envbufnum
the buffer number containing a singal to use for the grain envelope. -1 uses a built-in
Hanning envelope.

argument::overlaps
the number of overlaping windows.

argument::windowRandRatio
the amount of randomness to the windowing function.  Must be between 0 (no
randomness) to 1.0 (probably to random actually)

argument::interp
the interpolation method used for pitchshifting grains. 1 = no interpolation. 2 = linear.
		4 = cubic interpolation (more computationally intensive).

argument::mul

argument::add

Examples::
code::
s.boot;

(
var winenv;
// a custom envelope - not a very good one, but you can hear the difference between this
// and the default
winenv = Env([0, 1, 0], [0.5, 0.5], [8, -8]);
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff");
z = Buffer.sendCollection(s, winenv.discretize, 1);

SynthDef(\warp, {arg buffer = 0, envbuf = -1;
	var out, pointer, filelength, pitch, env, dir;
	// pointer - move from beginning to end of soundfile over 15 seconds
	pointer = Line.kr(0, 1, 15);
	// control pitch with MouseX
	pitch = MouseX.kr(0.5, 2);
	env = EnvGen.kr(Env([0.001, 1, 1, 0.001], [0.1, 14, 0.9], 'exp'), doneAction: 2);
	out = Warp1.ar(1, buffer, pointer, pitch, 0.1, envbuf, 8, 0.1, 2);
	Out.ar(0, out * env);
}).send(s);

)

// use built-in env
x = Synth(\warp, [\buffer, b, \envbuf, -1])

// switch to the custom env
x.set(\envbuf, z)
x.set(\envbuf, -1);

x.free;
::