Hi Christian,

Unfortunately no, I wasn't running a command in parallel to the GET
command, all my instruments had already loaded by the time I tried the GET
command.
The LSCP shell/CLI utility works absolutely fine every time I send such a
GET command, so perhaps it's my netcatting that's the issue here for some
reason. Not sure if there would be more scriptable methods of reliably
getting the data from Linuxsampler.

Also, on the note of using the lscp CLI/netcat commands to Linuxsampler for
the instrument editor, it seems it doesn't work on my end:
lscp=# EDIT CHANNEL INSTRUMENT 1
ERR:0:There is no instrument editor capable to handle this instrument
lscp=# EDIT CHANNEL INSTRUMENT 0
ERR:0:There is no instrument editor capable to handle this instrument

Both files were loaded using the GIG engine and gigedit/Linuxsampler are
installed in /usr/local.. Perhaps my PATH or ldconfig needs updating?

Many thanks,

Andrew.


On Tue, Dec 21, 2021 at 4:31 PM Christian Schoenebeck <
schoeneb...@linuxsampler.org> wrote:

> 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
>
_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to