Shout loud visual messaging 




Shout is intended for showing messages (e.g. timed from a script, 

or from networked players) very prominently on screen. 


Shout("A message that is hard to miss");


// Shout can be added to codeDump: 

Shout.add;


// Then, comments beginning with a tag ...


Shout.tag // -> //!!


// get shouted:


//!! like this!


// to remove it again:

Shout.remove;


//!! this is silent again.


Shout.win.close;



For setups in shared coding networks (e.g. in powerbooks_unplugged), 

it is best to add shouting to an oscresponder listening to shared code, e.g.:


// one machine listens

(

n = NetAddr("127.0.0.1", 57120); 

o.remove; 

OSCresponder(n, '/share', { |time, resp, msg| 

var nametag = msg[1]; 

var messageStr = msg[2].asString; 

msg.postcs;

// ... 

if (messageStr.beginsWith(Shout.tag)) { 

defer { Shout(messageStr.drop(Shout.tag.size) + "-" ++ nametag) }

}; 

}).add;

)

// another machine sends

m = NetAddr("127.0.0.1", 57120);

m.sendMsg("/share", "me", "quiet");

m.sendMsg('/share', "me", "//!! loud?");