// title: Three one liners ( or, better, many liners ) // author: ttsesmetzis // description: // Based on the examples and references from // http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/one-liner-C-code-in-SC-td6854421.html#a6903794 // code: Ndef(\oneLine).play ( Ndef(\oneLine,{ var t, x, y, z, exp = 11, length; length = 2.pow( exp ); t = PulseCount.ar( Impulse.ar( 8000 ) ); y = InFeedback.ar( 16, 2 ); x = ( t >> 6 | ( y * 2 << 3 ) ); // x = ( t * 5 >> 12 ).bitXor( y * 3 << 6 & ( [ 16, 18 ] * t ) ); Out.ar( 16, x); x % length / ( length - 1 ) * 2 -1 * 0.5; } ) ) ( var voices = 5; Ndef(\oneLine).clear; Ndef(\oneLine, { var t, x, y, z, exp = 11, length; length = 2.pow( exp ); t = PulseCount.ar( Impulse.ar( 8000 ) ); y = InFeedback.ar( 16, voices ); x = ( t * 5 >> 12 ) .bitXor( y * 3 << Demand.kr( Impulse.kr( 0.1 ! voices ) , 0, Drand( (3..11), inf ) ) & ( (13..17).choose.postln * t ) ); Out.ar( 16, x); x % length / ( length - 1 ) * 2 - 1 * voices.reciprocal; } ); Ndef(\y, { Splay.ar( LeakDC.ar( Ndef.ar(\oneLine, voices) ) ) } ).play )