[Tdg] Event System Updates

Alex Norman alex at neisis.net
Sun Aug 19 15:15:23 PDT 2007


> The OSC path namespace thing is independent of network addresses and  
> ports; I don't understand why we would want to make a binding between  
> namespace and port for mint.
> 
> What if I want to send /synth/play to two network receivers, but / 
> synth/loadsound/ to only one?  I would have to keep registering and  
> unregistering the second port.
> 
> It seems to me that I would want to do:
> 
> OSCPort1->send(new OSCEvent("/synth/play"));
> OSCPort2->send(new OSCEvent("/synth/play"));
> OSCPort2->send(new OSCEvent("/synth/loadsound/"));
> 
> For general cases where only one port is needed, a default OSC port  
> could be set and events sent automatically via the hub?

I guess this is something to ask the rest of the group..
I personally like the idea of mapping between namespaces and ports.  

You don't have to register/unregister, your clients should just ignore messages
that they don't handle. or in this case, one thing would register:
/synth/play
and the other would register
/synth

Also, this way the user never has to think about anything other than the initial
OSC setup and 1 OSC system.

but, this is all a matter of taste I think..

I want to eventually implement my method as a library and OSC routing server.

> 
> >
> >>
> >>Or, what if I want to send graphics commands to different windows?  I
> >>need to specify the graphics Processor to handle them.
> >
> >Hmm, it seems that these graphics commands would be part of the  
> >contents of a
> >window command, and in that window command you'd specify the receiver.
> 
> But that means that all graphics events need to be Window events,  
> which doesn't make sense.  I might create a DrawLine event to send to  
> a graphics window, or to a postscript writer, etc.  Again, I imagine:

That is not true, all graphics events that are drawn to a window would, at one
time, either be window events or would be pushed onto that window's queue,
depending on how we want things to work [having a windowing system that deals
with windows, or having each window be independent (though likely with some sort
of window manager system along side)].  My comment just came from you saying:
"what if I want to send graphics commands to different windows?"

> 
> GraphicsEvent * g = new DrawLine();
> GraphicsPort->send(g);
> PostscriptPort->send(g);

you can do exactly this in your main event handler.  That is where you specify
receivers, but what I'm getting at is that it isn't a part of the event.  There
is an issue if you want all your logic to happen in the Audio thread though, and
I don't know how we deal with that... one way is to send commands to the main
thread [and in turn your main event handlers] telling it that something
happened, or what not, then deal with the actual logic of what should happen
there..

-Alex




More information about the Tdg mailing list