to use only 1 shred you can send your messages to a base-adress, and pack the <br>sub-adresses into an argument. not nice, but works.. this way you still can not use adress patterns. <br>but share 1 shred for many message receivers (with the same signature of course..)
<br><br>short example: <br><br><br>// the receiver:<br><br>OscRecv rec;<br>6449 => rec.port;<br>rec.listen();<br>rec.event("/BaseAdress,si") @=> OscEvent BaseEvent; <br><br>while ( true )<br>{ <br> BaseEvent => now;
<br> <br> while( BaseEvent.nextMsg() != 0 )<br> { <br> BaseEvent.getString() => string adress;<br> BaseEvent.getInt() => int value; <br> <br> if(adress == "SubAdress1")
<br> { <br> <<<"reveived on SubAdress1:", value>>>;<br> }<br> <br> else if(adress == "SubAdress2/SubSub")<br> {<br> <<<"reveived on SubAdress2/SubSub:", value>>>;
<br> }<br> }<br>} <br><br><br>// the sender:<br><br>while( true )<br>{<br> sender.startMsg( "/BaseAdress", "si" );<br> sender.addString("SubAdress1");<br>
sender.addInt(1);<br> <br> 2::second => now;<br><br> sender.startMsg( "/BaseAdress", "si" );<br> sender.addString("SubAdress2/SubSub");<br> sender.addInt(2);<br> <br>
2::second => now;<br>}<br><br><br><br><br><br><br><br><div><span class="gmail_quote">2007/3/27, Lukas Degener <<a href="mailto:degenerl@cs.uni-bonn.de">degenerl@cs.uni-bonn.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I found an old thread on this mailing list which deals with a similar<br>problem:<br><br><a href="https://lists.cs.princeton.edu/pipermail/chuck-users/2005-October/000100.html">https://lists.cs.princeton.edu/pipermail/chuck-users/2005-October/000100.html
</a><br><br>Afaics, all those problems can be solved once it is possible to wait for<br>more than one event. I already saw it on some Todo-list somewhere, so,<br>hm.... when is the next release comming? ;-)<br><br>Cheers,
<br>--lu<br>_______________________________________________<br>chuck-users mailing list<br><a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br><a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>tazumi<br>