// title: Re: network of loosely connected nodes (now working) // author: LFSaw // description: // Idea: network of loosely connected nodes. Each node has a dedicated pulse rate / phase. Inducing an irregular trigger signal influences the nodes to (gradually) adapt their pulsation freq (and phase?) to the one of the input. // sound example: https://soundcloud.com/lfsaw/sync-weakconnection-tduty-time // code: ( Ndef(\nodeTest, { // the input // var input = Impulse.ar([1, 3, 5].reciprocal * 1, phase: [0, 0.25, 0.5]).sum; //var input = Impulse.ar([2, 3], phase: [0, 0.25]).sum; // var input = Select.ar(Line.kr(0, 1, 10) * SinOsc.ar(0.01).range(0, 1), [Impulse.ar([0.2, 0.3], phase: [0, 0.25]).sum, LocalIn.ar(1)]); var input = Select.ar(Line.kr(0, 1, 10), [Impulse.ar(0.134), LocalIn.ar(1)]); // the nodes, each takes its predecessor as input and estimates the duration between two events. var nodes = (1..20).inject([input], {|last, item| var dur = Gate.ar( Timer.ar(TDelay.ar(last.first, Rand(1, 4))), last.first ); [TDuty.ar( dur.lag(20), TDelay.ar(last.first, dur.lag(20)), 1 )] ++ last }); LocalOut.ar(nodes.first); // add a pitch to each nodes = nodes.collect{|node, i| SinOsc.ar((500 + (i*250)), 0.9pi) // * Decay2.ar(node, 0.01, 0.2) * EnvGen.ar(Env.perc(0.0001, 0.1), gate: node) * 2 * (25-i) * 0.01}; // splay in stereo field //nodes.sum!2; Splay.ar(nodes)// + (SinOsc.ar(2000) * Decay2.ar(input, 0.01, 0.2) * 0.1); }).play )