-
... s faster than nested if statements), so it should be very fast and scale to any number of clauses. ( var x=0; //also try 1 switch(x,0,{ "hello" }, 1, { "goodbye" }) ) ( var x, z; z = [0, 1, 1.1, 1.3, 1.5, 2]; switch (z.choose.postln, 1, { \ ...
-
... neralHID. The only part which is not cross platform yet in that approach is the numbering of the slots, so these cannot be depended upon across platforms. The Windows version of SC should use a python program IxiHID for now with SC to have ...
-
... ext(inval) on it for each iteration. Parameters that should not change, such as number of repeats, should call .value(inval) so that a function may be given. Pwhite demonstrates both of these features. Exercise for the reader: Why does Pwhi ...
-
... sequences of events can be implemented using Routines. A Routine which yields a number can be scheduled using a clock: ( var w, r; w = Window .new( "trem" , Rect (512, 256, 360, 130)); w.front; r = Routine ({ arg time; 60.do({ arg i; 0.05.y ...
-
... = 12, accidental = 0) use a function as a conversion from scale degree to note number. See also SequenceableCollection and Scale // a strange mapping ( var f = { |degree, stepsPerOctave, acc| (1.8 ** (degree % stepsPerOctave) + acc).postln ...
-
... nt, \gpdef)], inf)); Example: Quantizing and outset When quantizing to a larger number of beats, the changes become very slow if one has to wait for the next beat. Providing an outset quant value is a way to make the change so that it appea ...
-
... . Patches can be built dynamically and parameterized not just by floating point numbers from a static score, but by other graphs of unit generators as well. Or you can construct patches algorithmically on the fly. This kind of fluidity is n ...
-
... s defined as an "array argument," occupying indices 2-3. SynthDefs with a large number of controls may need a little extra code to print the entire list. SynthDescLib .global[ \controlList ].controls.do( _ .postln); "" Prior to SuperCollide ...
-
... eate a server object we need to provide the IP address or the server and a port number. Port numbers are somewhat arbitrary but they should not conflict with common protocols like telnet, ftp http, etc. The IP address 127.0.0.1 is defined t ...
-
... \addToHead, \addToTail, \addBefore, \addAfter out: 0, // usually an output bus number, but depends on the SynthDef The ampEvent determines volume. Notice that ~amp is a function that determines its value from ~db . The user can choose to s ...