// OSC messaging tests.  Rename this computer "0.local".


// Test direct messaging

n = NetAddr("0.local", 57120);


// private MsgWindow

m = MsgWindow(playerNum: 0, public: false);

n.sendBundle(0, ["/msgWindow", \add_msg, 0, "Hello Plorksters"]);

n.sendBundle(0, ["/msgWindow", \set_clock, "12:34"]);

n.sendBundle(0, ["/msgWindow", \clear]);


// public MsgWindow

p = MsgWindow(playerNum: 0, public: true, projection: false);

n.sendBundle(0, ["/publicMsgWindow", \add_msg, 0, "Hello unsuspecting audience"]);

n.sendBundle(0, ["/publicMsgWindow", \clear]);


// SynthWindow

s = SynthWindow(playerNum: 0);

n.sendBundle(0, ["/synth", \amp, 1]);

n.sendBundle(0, ["/synth", \impulseFreq, 4411]);

n.sendBundle(0, ["/synth", \amp, 0]);


// FreqTablesWindow

f = FreqTablesWindow(numPlayers: 8);

n.sendBundle(0, ["/freqTables", 0, \amp, 1]);

n.sendBundle(0, ["/freqTables", 0, \impulseFreq, 4411.13234]);


// CharWindow

(

c = CharWindow(numPlayers: 1);

SystemClock.sched(

0,

{

n.sendBundle(0, ["/charWindow", (0..9).choose.asString]);

0.02

}

)

)