On Dienstag, 21. Dezember 2021 15:46:17 CET Andrew C wrote: > Hi, > > I'm hacking together a quick-and-dirty bash script for controlling/setting > up audio/midi interfaces in Linuxsampler by sending LSCP commands. > > Sending the commands seems absolutely fine, but using the 'GET' commands to > recieve data from Linuxsampler, for example info about a sampler channel, > don't appear to return data consistently or "in time"? > > Command I'm using: > echo "GET CHANNEL INFO 1" | nc -q 1 -t localhost 8888 > > Sometimes it'll return the channel info immediately, other times > Linuxsampler returns nothing at all, though the connection is established > and terminated.
I guess you were sending another LSCP command in parallel while that happened, e.g. loading an instrument in foreground. The LSCP server is currently single-threaded: http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/linuxsampler/trunk/src/network/lscpserver.h?revision=2534&view=markup So the LSCP server only executes one command at a time, which explains why your "GET CHANNEL INFO" sometimes takes a moment before completing. So far this was not an issue for anybody, at least nobody complained FWIW in all these years. In the meantime you might just load your instruments in the background for not blocking the LSCP server for too long. BTW we also have a dedicated command line utility that might be a bit more convenient to play around with LSCP: http://doc.linuxsampler.org/Release_Notes/LinuxSampler_2_0_0/#lscp_shell > Thanks, > > Andrew. _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel