more dumb things to do with networks

I did it again. Bigger. This time, instead of making two oscillators (and actually the previous recording only had one oscillator), I made four. Each machine gets sent to a different channel in my crappy samson mixer (the one that I used for no-input mixing with the Braxton ensemble back in undergrad), where I made a desperate attempt at spatializing them with panning and equalization (don't hold your breath). Here is a recording (sorry for the codec & remote hosting: I'm trying to save on server space). I mess with the eq a bit toward the end, but that pulse-width sounding stuff that happens is totally an emergent property of the network. Sweet!

In this system, each node waits for a message containing either a 1 or a -1. On receiving this message, 2 of 4 nodes invert the signal while the other 2 do nothing to the signal. The signal (normal or inverted as the case may be) is sent directly to the soundcard as a dc offset, and the node sends its signal to all the other nodes. All of this happens 'instantaneously', which is a fancy word for 'as soon as possible'. So, what we hear is the result of all different sorts of bottlenecks in the system, as well as packet collisions or outside interference. We hear the time constant of the network itself, plus the language, plus the soundcard, plus the mixer.

//dukkha:
s.boot;
SynthDef(\NetOsc, {|dc = 0, vol=0.5| var osc; osc = Silent.ar + (dc*vol);Out.ar(0, osc!2)}).store;

~langs = ["192.168.2.5","192.168.2.6","192.168.2.7"].collect{|ip| NetAddr(ip, 57120)};

~count = OSCresponder(nil, '/count', {|t,r,m,a|
var dc;
dc = m[1].neg;
s.sendMsg(15, 1000, 'dc', dc);
~langs.do{|addr, index| addr.sendMsg('/count', dc);};
dc.postln;
}).add;

s.sendMsg(9, 'NetOsc', 1000, 0, 0);

//samudaya:
s.boot;

SynthDef(\NetOsc, {|dc = 0, vol=0.5| var osc; osc = Silent.ar + (dc*vol);Out.ar(0, osc!2)}).store;

~langs = ["192.168.2.5","192.168.2.6","192.168.2.7"].collect{|ip| NetAddr(ip, 57120)};

~count = OSCresponder(nil, '/count', {|t,r,m,a|
var dc;
dc = m[1];
s.sendMsg(15, 1000, 'dc', dc);
~langs.do{|addr, index| addr.sendMsg('/count', dc);};
dc.postln;
}).add;

s.sendMsg(9, 'NetOsc', 1000, 0, 0);

//nirodha:
s.boot;

SynthDef(\NetOsc, {|dc = 0, vol=0.5| var osc; osc = Silent.ar + (dc*vol);Out.ar(0, osc!2)}).store;

~langs = ["192.168.2.5","192.168.2.6","192.168.2.7"].collect{|ip| NetAddr(ip, 57120)};

~count = OSCresponder(nil, '/count', {|t,r,m,a|
var dc;
dc = m[1];
s.sendMsg(15, 1000, 'dc', dc);
~langs.do{|addr, index| addr.sendMsg('/count', dc);};
dc.postln;
}).add;

s.sendMsg(9, 'NetOsc', 1000, 0, 0);

//marga:
s.boot;

SynthDef(\NetOsc, {|dc = 0, vol=0.5| var osc; osc = Silent.ar + (dc*vol);Out.ar(0, osc!2)}).store;

~langs = ["192.168.2.5","192.168.2.6","192.168.2.7"].collect{|ip| NetAddr(ip, 57120)};

~count = OSCresponder(nil, '/count', {|t,r,m,a|
var dc;
dc = m[1];
s.sendMsg(15, 1000, 'dc', dc);
~langs.do{|addr, index| addr.sendMsg('/count', dc);};
dc.postln;
}).add;

s.sendMsg(9, 'NetOsc', 1000, 0, 0);

//sunnata:
NetAddr("dukkha", 57120).sendMsg('/count', 1);

for those of you nerdy enough to withstand the source code, your reward is the following ascii graph:


where dukkha and marga invert the signal before passing it along, and samudaya and nirodha simply echo the same signal back.  if the network were arranged as a loop, instead of being fully distributed, each node communicating with the next instead of broadcasting to everyone, it gets trickier to make the system oscillate.  for this behavior to emerge, we must have an odd number of inverting nodes.  however, the distributed topology of this network allows us to have an arbitrary number of inverters.  next, i will try out different topologies and mixes of individual node behaviours, and also different sound mappings...

One thought on “more dumb things to do with networks

Leave a Reply

Your email address will not be published. Required fields are marked *