how to check jacktrip running or not successfully programatically ?

29 views
Skip to first unread message

Daisuke Yoshida

unread,
Mar 23, 2021, 10:29:09 PM3/23/21
to jacktrip-users
Hi All,

I am trying to figure out if there is a way to check whether jacktrip is running successfully programatically.

For example for jackdmp (or jackd) we can call jack_lsp to check if the command is successfully executed. 

I was wondering if there is a similar function for jacktrip command. I know it is successful if the output of jacktrip displays "Received Connection for Peer!".


Thanks 

Dave Adams

unread,
Mar 24, 2021, 8:29:17 AM3/24/21
to jacktrip-users
Seems like you already have used jack_lsp programatically.  What happens if you call it AFTER running jacktrip?

Other options are likely to be much more OS-specific.  Linux and MacOS have more process related commands by default than Windows, although with the right additions Windows can about match them.

I would think jack_lsp would be better than process commands, though.  Knowing jacktrip has started is one thing; knowing that it has created jack connections seems more like the better end result.

Daisuke Yoshida

unread,
Mar 24, 2021, 9:39:18 AM3/24/21
to jacktri...@googlegroups.com
Hi Adam,

Thank you. I see what you mean. After jacktrip is successfully running I can call jack_lsp and I see a couple of more lines:

eg. 
before running jacktrip

heinrich-2:~ Dicekay$ jack_lsp 

system:capture_1

system:capture_2

system:playback_1

system:playback_2


after running jacktrip

heinrich-2:~ Dicekay$ jack_lsp

system:capture_1

system:capture_2

system:playback_1

system:playback_2

JackTrip:send_1

JackTrip:receive_1


so I can grep "JackTrip" from the output && look for "Received Connection for Peer!" from jacktrip's output buffer. 

As far as I know this is the way... I wonder if there is a better way ;) 


Thanks :)

--
You received this message because you are subscribed to a topic in the Google Groups "jacktrip-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacktrip-users/JIEUKifss3c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacktrip-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacktrip-users/a63c39a3-77b7-4f00-8d69-957f364f3813n%40googlegroups.com.

Dave Adams

unread,
Mar 24, 2021, 10:02:37 AM3/24/21
to jacktrip-users
There might be better, but this is already pretty high up there :)
I learned the hard way that the closer I could match a script to my desired end result the less script I had to write.
You can probably get some really good hints by looking at the excellent code for "Jmess" on the jacktrip github.

Jmess uses the "lsp" (list ports) part of the API quite a lot.  That's pretty much what you do with what you show above.  If the ports do NOT show up with jack_lsp, then it doesn't much matter which conditions  failed in jacktrip.  You need to check your log or console window anyway, so why build all those checks into the script?

On the other hand, if your new connections DO show up with jack_lsp, you KNOW jacktrip has not only initialized properly, but completed initialization and processing to the point of making a connection you can then use for other stuff.

To get an idea of how powerful this is, try launching something jack-aware, like Ardour as well, THEN running jack_lsp.

Enjoy the scripting :)  In my experience even the simplest little script has a way of expanding to cover things I did not think possible before I got the results of what I THOUGHT I wanted in the first place!

Robert Holland

unread,
Mar 24, 2021, 10:03:36 AM3/24/21
to jacktri...@googlegroups.com
I'm just playing around writing a Jack client application & will be wanting to do something similar. It looks like there are api calls for a Jack client to discover the connections to the Jackserver. Checkout JackAudioInterface.cpp in the JackTrip sources. That's about where I'm at at the moment & can't help any further until I get a bit of time to work on this.


You received this message because you are subscribed to the Google Groups "jacktrip-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacktrip-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacktrip-users/CAO8UB827V7EXxVz5J3sx0HLfLfVcjTe5EOj3frhxnqKkbk8nbw%40mail.gmail.com.


--
Robert E B Holland




Reply all
Reply to author
Forward
0 new messages