[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] A method.chaining idiom for livecoding?



I recently stumbled upon a couple of methods that save time nicely when livecoding, particularly in terms of messing with matching brackets:

Pseq([2,6,4,7],inf).stutter(32)

instead of

Pstutter(32, Pseq([2,6,4,7],inf))

and

Plazy({Pseq((0..15).scramble,4)}).repeat

instead of:

Pn(Plazy({Pseq((0..15).scramble,4)}))

This got me thinking. I have to type 'Pseq([some array or other])' *a lot*. Would there be any way it would be possible to get to something like a .seq method? So you could just write:

Pbindef(\a, \notes, [3,5,6].seq)

Repeat would default to 'inf', or I guess for consistency [3,5,6].seq(inf).

Then, how about {[3,5,6].scramble.seq(4)}.lazy.stutter(2)

I'm not a programmer, so probably something fundamentally wrong with this… just an idea…

--
J. Simon van der Walt - Composer
www.jsimonvanderwalt.com
+44 (0) 7905 270 198