On Jul 22, 2009, at 4:44 AM, Thomas Girod wrote:
You're on the right track here, but 'play' functions in an event don't receive their parameters as function arguments. Instead, they read environment variables from the event. This works: d = NetAddr("127.0.0.1", NetAddr.langPort); o = OSCresponderNode(d, '/foo', { |t, r, m| m.postln }).add; Pbind( \play, { ~dest.sendBundle(~latency, ~msg) }, \dur, 1, \dest, d, \msg, Pseq(#[["/foo",42],["/foo",23]]) ).play; You can also add a custom event type and then use it just like any other type. Event.addEventType(\osc, { ~dest.sendBundle(~latency, ~msg) }); Pbind( \type, \osc, \dur, 1, \dest, d, \msg, Pseq(#[["/foo",42],["/foo",23]]) ).play; hjh : H. James Harkins .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..: "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman |