OSC Multiple Port Instantiation
Date | 2005-10-11 16:57 |
From | David Akbari |
Subject | OSC Multiple Port Instantiation |
Since SourceForge is being incredibly slow today, I'd like to point out the potential importance of having multiple instances of an OSCinit opcode (multiple open ports) per instance of Csound. As it is, it's not too big of a deal to use multiple instances of Csound to have multiple OSC ports open, but of course this is quite an inelegant solution. Surely if there was ever a plan to have Csound communicate with Common Music, you would require more than just one port of data (maybe not?). I think that just the possibility of using OSC with Csound creates immense realtime performance possibilities and also we open up this whole can of worms about Csound over a network(!!). Of course I understand if it is hard to implement as you would probably have to check which ports were open before allowing an instance on that port to prevent invalid access or a segmentation fault or something ugly like that. What if any musical implication do you guys see in OSC port instantiation per instance of Csound? -David |
Date | 2005-10-11 18:03 |
From | jpff@codemist.co.uk |
Subject | [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
Can you explain further ? As far as I know there is no problem with multiple ports and multiple calls to OSCinit. Did I get it wrong? Certainly that was the intention. ==John ffitch ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-11 18:48 |
From | David Akbari |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
On Oct 11, 2005, at 1:03 PM, jpff@codemist.co.uk wrote: > Can you explain further ? Of course. What follows is an example of the OSC opcodes. I find that running the attached instrument as-is works good. To run this .csd file, use the -Lstdin commandline flag and type "i1 0 1000" and for every "i3 0 1" you should get a random number at /foo/bar. If you uncomment all the comments, Csound wouldn't even start for me erroring out with "OSC: failed to allocate globals". A verbose log of the commandline follows the Csound example. |
Date | 2005-10-12 12:38 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
David Akbari wrote: > Of course. What follows is an example of the OSC opcodes. I find that > running the attached instrument as-is works good. To run this .csd file, > use the -Lstdin commandline flag and type "i1 0 1000" and for every "i3 > 0 1" you should get a random number at /foo/bar. > > If you uncomment all the comments, Csound wouldn't even start for me > erroring out with "OSC: failed to allocate globals". A verbose log of > the commandline follows the Csound example. How about using a single port but multiple paths (i.e. not just "/foo/bar") ? Also, if multiple OSCinit's would indeed work, how is an OSClisten supposed to know which one of the multiple ports it should use ? Some changes to the opcode syntax may be needed, including the addition of a new argument to OSClisten that associates it with a particular OSCinit. > kk OSClisten "/foo/bar", "ff", kf1, kf2 Not related to this issue, but I think writing to a 'z' list of input arguments is dangerous, as it allows for overwriting constants or reserved variables like nchnls. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-12 13:48 |
From | David Akbari |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
On Oct 12, 2005, at 7:38 AM, Istvan Varga wrote: > How about using a single port but multiple paths (i.e. not just > "/foo/bar") ? This helps a lot for routing a single set of data to multiple locations (I had not thought of this in Csound!) but it still does not solve the problem of then re-sending the data out on a different port (in a single instance of Csound). Currently it is no problem to have multiple instances of Csound running each with it's own initialized OSC port. > Also, if multiple OSCinit's would indeed work, how is an OSClisten > supposed > to know which one of the multiple ports it should use ? This is an excellent point, perhaps it would require a handler or numeric index? Something like strset perhaps? > Some changes to the > opcode syntax may be needed, including the addition of a new argument > to > OSClisten that associates it with a particular OSCinit. > This extra argument could likely also be a numeric index, reminiscent of the ZAK opcodes. It would add, of course as you mentioned, another argument and would likely break some existing orchestras but that is why at present, we can still label the program as being in beta status and render these points moot. -David ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 08:48 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
I think that multiple ports makes sense, and so yes it means that OSCinit will need to return a value that is used in the listener. Will look at it today. ==John ffitch ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 10:25 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
David Akbari wrote: > This helps a lot for routing a single set of data to multiple locations > (I had not thought of this in Csound!) but it still does not solve the > problem of then re-sending the data out on a different port (in a single > instance of Csound). If you mean one port for input and another for output, then you do not need two OSCinit calls, as OSCsend does not depend on OSCinit and takes an explicit port number. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 12:54 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
I have just committed code that allows multiple ports in OSC listeners. Seems OK. Otherwise no change. ==John ffitch ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 13:05 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
jpff@codemist.co.uk wrote: > I have just committed code that allows multiple ports in OSC listeners. > Seems OK. Otherwise no change. By the way, would it be useful to allow for receiving string messages in S-variables ? ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 13:18 |
From | David Akbari |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
On Oct 13, 2005, at 5:25 AM, Istvan Varga wrote: > If you mean one port for input and another for output, then you > do not need two OSCinit calls, as OSCsend does not depend on > OSCinit and takes an explicit port number. I was previously unaware of this, and I can see that it works as expected... I would've thought you would need to initialize the explicit port number first, oh well it seems easier this way anyway. Thanks for the clarification! On Oct 13, 2005, at 8:05 AM, Istvan Varga wrote: > jpff@codemist.co.uk wrote: > >> I have just committed code that allows multiple ports in OSC >> listeners. >> Seems OK. Otherwise no change. > > By the way, would it be useful to allow for receiving string messages > in S-variables ? > I thought initially this was how you did it if you had an "s" character in your z-list!! Apparently I was wrong on that but since you reiterate the idea I think it's a great one. Also, what other semantics of the language exist at present to take advantage of the other possibilities included in the z-list, like char's and booleans? -David ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 14:42 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
>>>>> "Istvan" == Istvan Varga |
Date | 2005-10-13 14:47 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] PA/PM versions ? |
PA: v19 (devel) PM: the latest. Victor At 14:50 13/10/2005, you wrote: >Greetings: > > I'm working on building Cs5 "The Whole Enchilada" on AGNULA/Demudi 1.2.1 > but I'm hitting the wall with some PortAudio errors during compilation of > rtpa.c. Before I send the report I thought I should find out what > versions of PA/PM are currently recommended for Cs5. > > I'm using the latest CVS sources. Maybe I should use a tarball instead ? > >Best, > >dp > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Power Architecture Resource Center: Free content, downloads, discussions, >and more. http://solutions.newsforge.com/ibmarch.tmpl >_______________________________________________ >Csound-devel mailing list >Csound-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/csound-devel Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 14:50 |
From | Dave Phillips |
Subject | [Cs-dev] PA/PM versions ? |
Greetings: I'm working on building Cs5 "The Whole Enchilada" on AGNULA/Demudi 1.2.1 but I'm hitting the wall with some PortAudio errors during compilation of rtpa.c. Before I send the report I thought I should find out what versions of PA/PM are currently recommended for Cs5. I'm using the latest CVS sources. Maybe I should use a tarball instead ? Best, dp ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 14:58 |
From | Istvan Varga |
Subject | Re: [Cs-dev] PA/PM versions ? |
Dave Phillips wrote: > I'm working on building Cs5 "The Whole Enchilada" on AGNULA/Demudi > 1.2.1 but I'm hitting the wall with some PortAudio errors during > compilation of rtpa.c. Before I send the report I thought I should find > out what versions of PA/PM are currently recommended for Cs5. > > I'm using the latest CVS sources. Maybe I should use a tarball instead ? Unless recent changes to PortAudio introduced the errors, it is most likely that you have PortAudio v18. Csound requires v19. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 15:02 |
From | John ff |
Subject | Re: [Cs-dev] PA/PM versions ? |
Portaudio v19 -- I am using the version from last November as they still have not made it 64bit compatible Portmidi seems to be from last November as well. ==John ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 15:15 |
From | Dave Phillips |
Subject | Re: [Cs-dev] PA/PM versions ? |
Answering my own query: The CVS sources should not be used. The latest V19 tarball works perfectly. Best, dp Dave Phillips wrote: > Greetings: > > I'm working on building Cs5 "The Whole Enchilada" on AGNULA/Demudi > 1.2.1 but I'm hitting the wall with some PortAudio errors during > compilation of rtpa.c. Before I send the report I thought I should > find out what versions of PA/PM are currently recommended for Cs5. > > I'm using the latest CVS sources. Maybe I should use a tarball instead ? > > Best, > > dp > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 16:30 |
From | Stéphane Rollandin |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
Istvan Varga wrote: >> I have just committed code that allows multiple ports in OSC listeners. >> Seems OK. Otherwise no change. > > > By the way, would it be useful to allow for receiving string messages > in S-variables ? > sure it would. actually I see no reason to discard any type of variable.. regards, Stef ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 17:23 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
I am now testing a version of the OSClisten opcode that can receive strings and use multiple ports. By the way, is it possibly a problem that the license of liblo is GPL while Csound is LGPL ? ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-13 17:53 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
>>>>> "Istvan" == Istvan Varga |
Date | 2005-10-14 20:46 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
I have made changes to OSCinit and OSClisten to allow for using multiple ports, string data, and safely handle multiple messages in the same control period by adding a dynamically extended FIFO buffer. Also made use of mutexes for (hopefully) thread safe communication between the server thread(s) and any OSClisten opcodes. The changes did make the code more complex and less efficient, though, so there is definitely place for optimizations. The types currently allowed include 32 and 64 bit integers and floats ('i', 'h', 'f', 'd'), characters ('c'), and strings ('s'). Here is a simple example of receiving data from multiple ports: |
Date | 2005-10-14 21:45 |
From | David Akbari |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
On Oct 14, 2005, at 3:46 PM, Istvan Varga wrote: > I have made changes to OSCinit and OSClisten to allow for using > multiple ports, string data, and safely handle multiple messages in > the same control period by adding a dynamically extended FIFO buffer. > Also made use of mutexes for (hopefully) thread safe communication > between the server thread(s) and any OSClisten opcodes. The changes > did make the code more complex and less efficient, though, so there > is definitely place for optimizations. > The types currently allowed include 32 and 64 bit integers and > floats ('i', 'h', 'f', 'd'), characters ('c'), and strings ('s'). It looks like there has been a vast improvement in the Opcodes/OSC.c code. However when trying to compile from fresh CVS, the compiler gives this error: Opcodes/OSC.c: In function `OSC_listdeinit': Opcodes/OSC.c:578: warning: implicit declaration of function `lo_server_thread_del_method' ... gcc -framework CoreMidi -framework CoreFoundation -framework CoreAudio -dynamiclib -o libosc.dylib Opcodes/OSC.os -L. -L. -L/usr/local/lib -L. -L. -lsndfile -llo -lpthread ld: Undefined symbols: _lo_server_thread_del_method /usr/bin/libtool: internal link edit command failed scons: *** [libosc.dylib] Error 1 scons: building terminated because of errors. ... Investigating the liblo headers further, I could not find the function lo_server_thread_del_method. Here is the line in context: static int OSC_listdeinit(CSOUND *csound, OSCLISTEN *p) { // lines omitted for legibility lo_server_thread_del_method(p->port->thread, p->saved_path, p->saved_types); return OK; } Is it possible I am not using the current liblo headers? Everything else about the build seems OK. -David |
Date | 2005-10-14 21:51 |
From | David Akbari |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
On Oct 14, 2005, at 4:45 PM, David Akbari wrote: > Is it possible I am not using the current liblo headers? Yep. Sorry for the hasty posting. -David P.S. The OSC opcodes now seem to run excellent on OSX. (Although they did before). Has anyone been building OSC for Windows? |
Date | 2005-10-15 08:29 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
I ran the OSC opcodes on Windows before the latest changes. Will try to cj=eck again this weekend. ==John ffitch ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-15 11:54 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
jpff@codemist.co.uk wrote: > I ran the OSC opcodes on Windows before the latest changes. Will try > to cj=eck again this weekend. Note that a newer version of liblo that has lo_server_thread_del_method() may be needed. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-10-15 22:00 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] Re: [Csnd] OSC Multiple Port Instantiation |
So he added that did he? I did ask. ==John ffitch >>>>> "Istvan" == Istvan Varga |