You can check if a channel exists (and if it does, find out its type) by calling csoundGetChannelPtr() with a zero type value. It will then fail, and either return CSOUND_ERROR if the channel does not exist yet, or the type (in the same format as the type argument) of the already existing channel. On Saturday 24 June 2006 13:39, Rory Walsh wrote: > I am trying to add more functionality to the GUI controls provided by > lettuce by allowing for two-way communication between Csound and the > host app's that Lettuce can generate. I would like for example to allow > users to be able to change a label in their host application by calling > *chnset* in Csound. The following line of code will create a label in > the host app with a default value of "caption" > > label "chanName", width, height, top, left, "caption", "colour" > > I would like if "caption" would remain the label text *until* chnset is > called in Csound. As it stands each host app has a timer that keeps > calling GetValueOutChannel(see below), which in turn calls > csoundGetChannelPtr(), which then sends data to the label channel which > in turn overwrites "caption". The main issue here is that > csoundGetChannelPtr() will create the channel is it does not already > exist, and it seems to initialise it to 0. In my timer function(see > below) I was doing a simple test, if(GetValueOutChannel()!=0) then > update label, but as you can imagine this didn't work so well > considering users would often like to send 0 to the label. So my > question is how can I prevent data from being sent on a particular > software channel until a call is made to *chnset*? I hope I have > explained my self well, has anyone any suggestions? Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net