[Csnd] many OSCinits
Date | 2013-01-05 15:55 |
From | Tarmo Johannes |
Subject | [Csnd] many OSCinits |
Hello, is it possible to have OSC listeners on different ports? Like giOSC1 OSCinit $PORT1 giOSC2 OSCinit $PORT1+1 giOSC3 OSCinit $PORT1+2 and different instances of an intrument would use listeners on those ports like instr getOSC index = p4-1 if (index==0) then ihandle = giOSC1 elseif (index==1) then ihandle = giOSC2 endif kCoordinates OSClisten ihandle, "/3/xy", "ff", kX,kY ; etc endin looks like yes, but when I press "Stop" in Csoundqt, the program crashes. Running it in gdb gives message: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffccbf4700 (LWP 5521)] 0x00007fffdd3dd72b in ?? () from /usr/local/lib/csound/plugins64/libosc.so I found an old e-mail thread inititated by John Ffitch about need to have severeal listeners http://csound.1045644.n5.nabble.com/Design-question-for- cs5-OSC-td1094223.html but I did not understand what the final decision was. I need to have different listeners since I need to receive messages from different mobile devices that use TouchOSC. In TouchOSC I can configure the outgoing port but nothing much else so I don't know other ways how I could understand which device is sending the message. thanks! tarmo |
Date | 2013-01-05 18:24 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] many OSCinits |
The code is supposed to allow multiple listeners, but have never tried it. Looks like I need to construct an example to see what is wrong. First code-read showed nothing ==John ff > Hello, > > is it possible to have OSC listeners on different ports? Like > > giOSC1 OSCinit $PORT1 > giOSC2 OSCinit $PORT1+1 > giOSC3 OSCinit $PORT1+2 > > and different instances of an intrument would use listeners on those ports > like > > instr getOSC > index = p4-1 > if (index==0) then > ihandle = giOSC1 > elseif (index==1) then > ihandle = giOSC2 > endif > kCoordinates OSClisten ihandle, "/3/xy", "ff", kX,kY > ; etc > endin > > > looks like yes, but when I press "Stop" in Csoundqt, the program crashes. > Running it in gdb gives message: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x7fffccbf4700 (LWP 5521)] > 0x00007fffdd3dd72b in ?? () from /usr/local/lib/csound/plugins64/libosc.so > > I found an old e-mail thread inititated by John Ffitch about need to have > severeal listeners > http://csound.1045644.n5.nabble.com/Design-question-for- > cs5-OSC-td1094223.html > but I did not understand what the final decision was. > > I need to have different listeners since I need to receive messages from > different mobile devices that use TouchOSC. In TouchOSC I can configure > the > outgoing port but nothing much else so I don't know other ways how I could > understand which device is sending the message. > > thanks! > tarmo > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > > > > |
Date | 2013-01-05 18:57 |
From | Anders Genell |
Subject | Re: [Csnd] many OSCinits |
I have successfully used two OSCinit and instances using different ports. Tested on Linux only. I did not however use macro or port number increments like in your example. I would suggest trying hard coded port numbers at first just to see that the port numbers are not the issue. What I have had issues with is receiving illegal values, such as negative amplitude values. It is in my understanding important to make sure received values are conditioned properly before actually using them inside csound. It seems you are using TouchOSC for sending messages? That is what I used when setting my listeners up, so I don't believe it should be problems in that end. Best regards, /Anders 5 jan 2013 kl. 19:24 skrev jpff@cs.bath.ac.uk: > The code is supposed to allow multiple listeners, but have never tried it. > Looks like I need to construct an example to see what is wrong. First > code-read showed nothing > > ==John ff >> Hello, >> >> is it possible to have OSC listeners on different ports? Like >> >> giOSC1 OSCinit $PORT1 >> giOSC2 OSCinit $PORT1+1 >> giOSC3 OSCinit $PORT1+2 >> >> and different instances of an intrument would use listeners on those ports >> like >> >> instr getOSC >> index = p4-1 >> if (index==0) then >> ihandle = giOSC1 >> elseif (index==1) then >> ihandle = giOSC2 >> endif >> kCoordinates OSClisten ihandle, "/3/xy", "ff", kX,kY >> ; etc >> endin >> >> >> looks like yes, but when I press "Stop" in Csoundqt, the program crashes. >> Running it in gdb gives message: >> >> Program received signal SIGSEGV, Segmentation fault. >> [Switching to Thread 0x7fffccbf4700 (LWP 5521)] >> 0x00007fffdd3dd72b in ?? () from /usr/local/lib/csound/plugins64/libosc.so >> >> I found an old e-mail thread inititated by John Ffitch about need to have >> severeal listeners >> http://csound.1045644.n5.nabble.com/Design-question-for- >> cs5-OSC-td1094223.html >> but I did not understand what the final decision was. >> >> I need to have different listeners since I need to receive messages from >> different mobile devices that use TouchOSC. In TouchOSC I can configure >> the >> outgoing port but nothing much else so I don't know other ways how I could >> understand which device is sending the message. >> >> thanks! >> tarmo >> >> >> >> Send bugs reports to the Sourceforge bug tracker >> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >> Discussions of bugs and features can be posted here >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe >> csound" >> >> >> >> > > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > |
Date | 2013-01-06 05:50 |
From | Tarmo Johannes |
Subject | Re: [Csnd] many OSCinits |
Attachments | many-OSCinit-test.csd |
Hello, thanks, I created a small test file (attached), indeed, it works fine. There must be something else wrong with my original csd. Try to figure it out. tarmo On Saturday, January 05, 2013 07:57:07 PM Anders Genell wrote: > instr getOSC > > >> index = p4-1 > >> if (index==0) then > >> ihandle = giOSC1 > >> elseif (index==1) then > >> ihandle = giOSC2 > >> endif > >> kCoordinates OSClisten ihandle, "/3/xy", "ff", kX,kY > >> ; etc > >> > >> endin |