Hi,

Robin and "S. Massy" :)....thanks for your feedback and interest, and I'm glad you both have gotten good use out of jackctl.py; and are interested in the next generation: clijack! (FYI, I pronounce it to rhyme with "hijack" :) )

I'll take the feature requests to heart, they seem like they would make it more powerful. In the meantime, some questions/comments:

Robin, the reason you are seeing output similar to "jack_lsp" is because clijack is using Python to grab the output of "jack_lsp" in a subprocess! However, your suggestion to have input and output columns may be an option in the future (I rather like the current output format, with the repeats, so don't mind). One thing I might implement is 'grepping' for "input" or "output" in the result of the "jack_lsp -c -p" command, as you suggest, and formatting things similar to how it's done in "aconnect" with separate blocks for "READABLE PORTS" and WRITEABLE PORTS"...would that help?

At some point, it might be easier and more fruitful to use Python to directly access the jack server via a wrapper around libjack.so, but at this point, using the subprocess module seemed the most expedient!

The idea of sessions (like LASH?) is interesting, but I don't use LASH at all....I'm sure I could get flooded with requests for a LASH-aware CLIJACK, but that would be a far-off goal unless I could figure out Python/LASH integration...lord knows, there's probably a wrapper library out there for it somewhere.

I'm also intrigued by the idea of regex connecting and disconnecting. That would be a whole huge layer of logic in the simple parsing engine, which uses letters and numbers, so it might be a ways off, given the time I can devote to this right now. But I've written very sophisticated parsing engine using the Python regex library before (microcsound), so it wouldn't be new to me. Which reminds me:

I've opened up a sourceforge.com project page for CLIJACK: ( http://sourceforge.com/projects/clijack); so if any of you Python developers
want to jump aboard and help implement these features (and more), let me know!

Best,
AKJ
On Thu, Feb 23, 2012 at 2:15 PM, Robin Gareus <robin@gareus.org> wrote:
On 02/23/2012 08:25 PM, Aaron Krister Johnson wrote:
> Greetings fellow Linux audio folk,
>
> Some unknown handful of you (Julien Classen for sure at one point) may have
> used 'jackctl.py' for CLI starting of a JACK server and making JACK
> connections.
>
> I've now renamed the project 'CLIJACK' because it appears there's an
> unrelated script called 'jackctl.py' in the sources for JACK itself, and I
> wanted to avoid any confusion. CLIJACK is a little Python app that serves
> as a user-friendly command-line frontend to jackd, jack_connect, and
> aconnect. It allows one to quickly and efficiently connect jack ports, alsa
> midi ports, jack midi ports, etc. in the manner of QjackCtl, but without
> the GUI, and the possible bloat of the packages required by the same. Good
> for lean 'n mean systems, etc.
>
> So, CLIJACK is now being released, new title, a bit of new code...I did
> some code cleanup today, the biggest changes being:
>
> * From CLIJACK, the jackd server itself can be launched via an environment
> variable, CLIJACK_COMMAND. Using this, one can start or stop the server
> from within CLIJACK via the 's' command. This of course was the same in
> 'jackctl.py', however, one had to edit the 'jackctl.py' script itself to
> change the jackd command; now, it's modular and removed into the user's
> environment.
>
> * Non-critical alerts from jackd do not interrupt the interface of CLIJACK
> anymore (example: missing libffado, etc.)
>
> * More sensible killing of the jack server from within CLIJACK, including
> sending a killall message....
>
> * More use of newlines to make multi-lined messages prettier and cleaner.
>
> I will eventually get the project correctly packaged onto the Python apps
> listings, and sourceforge, etc., but for now, you can download the script
> directly from my site if you're interested:
>
> http://www.akjmusic.com/software/clijack-20120223.py
>
> I'd love feedback!

Hi Aaron,

Thanks for keeping it up. I'm one of the unknown handful and excited
about clijack. Copy/pasting jack_lsp; jack_connect is no fun. An
efficient and ergonomic terminal jack-connection manager is near the top
of my LA wishlist.

running clijack on debian fails with

/usr/bin/python2: bad interpreter: No such file or directory

http://www.debian.org/doc/packaging-manuals/python-policy/ch-programs.html
-> "#!/usr/bin/pythonX.Y" (I settled on python2.6)
Others may also have it in /usr/local/ or somewhere. I dunno what the
most practical way is for x-distribution compatibility is.

Otherwise clijack-20120223.py works as advertised.

What nags me however is that connections show up twice (similar to
'jack_lsp -c') It is not obvious which of them is the input and which
the output client ('jack_lsp -c -p'). It's be great if clijack could
group the ports or make in/out ports obvious.

excerpt:
CLIJACK(audio)--> l
0) system:capture_1
  4) ploop:playback_1
[..]
4) ploop:playback_1
  0) system:capture_1
[..]

That's jackdmp 1.9.8; but I don't think that matters.


Some brainstorm, feature request: group connect (stereo or more) and
port-name completion.

"c mpl sys" would connect
 mplayer [*]:out_1 ->  system:playback_1
 mplayer [*]:out_2 ->  system:playback_2

"d ard:aud sys" would disconnect all ardour auditioner ports from any
system port.

best,
robin



--
Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org