-
... ynthDef ( "Help-SPE4-EnvirDef-" ++ i.asString, { var out; Environment .use({ // set values in the environment ~freq = exprand(80, 600); ~amp = 0.1 + 0.3.rand; ~pan = 1.0.rand2; // call a randomly chosen instrument function // with values fr ...
-
... [1, 2, 3, 4].containsSeqColl.postln [1, 2, [3], 4].containsSeqColl.postln powerset Returns all possible combinations of the array's elements. [1, 2, 3].powerset.postln [1, 2, 3].powerset.sort({ |a, b| a.size > b.size }); // sort by size, b ...
-
... . To force an order use parentheses. e.g. 4 + (2* 8) ) Sometimes it's useful to set default values for arguments. You can do this like so: f = { arg a, b = 2; a + b; }; f.value(2); // 2 + 2 Default values must be what are called literals. L ...
-
... y = List [ 10, 5, 77, 55, 12, 123]; y.indexOfGreaterThan(70); find(sublist, offset) If the sublist exists in the receiver (in the specified order), at an offset greater than or equal to the initial offset , then return the starting index. ...
-
... would carry over to all the others -- hence its usefulness for sharing data. Pfset(func, pattern, cleanupFunc): When embedded, Pfset creates an environment and populates it using environment variable assignments in the provided function. F ...
-
... ame in the two numbers bitTest(aNumber) Returns true if bit at index aNumber is set. lcm(aNumber) Least common multiple gcd(aNumber) Greatest common divisor round(aNumber) Round to multiple of aNumber trunc(aNumber) Truncate to multiple of ...
-
... regular expression pattern) matches the string passed to it. The start is an offset where to start searching in the string (default: 0), end where to stop. "c" .matchRegexp( "abcdefg" , 2, 5); // true "c" .matchRegexp( "abcdefg" , 4, 5); // ...
-
... ers (instance variables), typical practice in the library is to give getter and setter methods to all instance variables, and use the setters in the *new method (or, use ^super.newCopyArgs(...)). It's not typical to have an init method popu ...
-
... 't work. The intent is to generate a detuned sawtooth wave and run it through a set of parallel resonant filters whose cut-off frequencies are modulating randomly. We run the synth and generate the trace (reproduced below). The trace comes ...
-
... 00, 4, 0.2) }.scope(1, zoom:4); PulseCount count triggers arguments: trigger, reset ( { SinOsc .ar( PulseCount .ar( Impulse .ar(10), Impulse .ar(0.4)) * 200, 0, 0.05 ) }.scope(2, zoom:4); ) PulseDivider arguments: trigger, div, start ( { va ...