kampfschlaefer / jackmix

Matrix-Mixer for the Jack-Audio-connection-Kit
http://www.arnoldarts.de/jackmix/
GNU General Public License v2.0
44 stars 13 forks source link

Update the Python bits to Python 3 because scons is Python 3 only now #11

Closed ejeschke closed 3 years ago

ejeschke commented 3 years ago

This PR updates the Python to Python 3 so that scons can work (recent versions of scons only support Python 3).

Combined with #10, this allowed me to build JackMix on Ubuntu 20.04.

Note that if you are going to merge both this and #10, then I recommend merging #10 first and then this one. There will be exactly one conflict (in top-level SConstruct), but it will be an easy and obvious fix.

nickbailey commented 3 years ago

Thanks for your input on this, it's much appreciated.

To be absolutely honest, I've never used lash ever! I mostly do simple recording setups and I'm not overly compromised by lack of session management.

What's the status with LASH anyway? Is it still the way forward? There's something called Ladish which specifies the levels of session API support:

https://lwn.net/Articles/533594/

Since the LASH Stuff is all Arnold's work, I'm wondering what level he thinks we're aiming at?

Thanks again for the pull requests. I'll take a look at them in a bit.

Nick/.

On Monday, 28 September 2020 05:08:10 BST ejeschke wrote:

This PR updates the Python to Python 3 so that scons can work (recent versions of scons only support Python 3).

Combined with #10, this allowed me to build JackMix on Ubuntu 20.04.

Note that if you are going to merge both this and #10, then I recommend merging #10 first and then this one. There will be exactly one conflict (in top-level SConstruct, but it will be an easy and obvious fix. You can view, comment on, or merge this pull request online at:

https://github.com/kampfschlaefer/jackmix/pull/11

-- Commit Summary --

  • Update the Python bits to Python 3 because scons is Python 3 only now

-- File Changes --

M SConstruct (73)
M admin/pkgconfig.py (42)
M admin/qt5muc.py (198)

-- Patch Links --

https://github.com/kampfschlaefer/jackmix/pull/11.patch https://github.com/kampfschlaefer/jackmix/pull/11.diff

ejeschke commented 3 years ago

Hi Nick,

Hmm, ladish is the library I tried building and ran out of patience to fix. I might have another look at it later, but as I said in the PR, I prefer to use other tools to manage connection sessions and I don't think it makes sense to build it into each individual tool.

Glad you are still tuned in to this repo. jackmix is a very useful program for which there is not a good equivalent, currently. Thanks for your consideration.

nickbailey commented 3 years ago

On Monday, 28 September 2020 09:19:34 BST ejeschke wrote:

Hi Nick,

Hmm, ladish is the library I tried building and ran out of patience to fix. I might have another look at it later, but as I said in the PR, I prefer to use other tools to manage connection sessions and I don't think it makes sense to build it into each individual tool. I'm no expert here, but I'm prepared to learn! Let's see if Arnold has any suggestions.

I'm on Debian Buster here. I used to be on Ubuntu, but a couple of LTS upgrades when badly wrong a while back, and I reverted to debian. So I'm not sure if the library names will be exactly the same. The packages I installed to build it were

liblash-compat-1debian0
liblash-compat-dev

I note that liblash-compat-dev is in the buster (stable) and sid (unstable) repos, but not in testing. So it looks like a glitch in Ubuntu which will get fixed eventually, one hopes.

I note that the lash library has the following description in Debian:

''' liblash-compat is a library and associated header files, that aims to provide lash environment for apps that can use it. Currently it does not interact with ladish daemon yet. In its current state, it enables building lash-aware apps but they will fail to contact the lash server.

In its current state, it enables building lash-aware apps but they will fail to contact the lash server. '''

So to me it sounds like that bit needs a rewrite to work with the ladish. I'm looking at libqlash/qlash.cpp and noticing it's only about 150 lines, but I don't know much about either lash or laddish I'm afraid. Arnold? :)

[note to OPer: this is Arnold's program originally and I am only to blame for the MIDI stuff really]

Glad you are still tuned in to this repo. jackmix is a very useful program for which there is not a good equivalent, currently. Thanks for your consideration. It's saved our bacon on a number of occasions. I wrote it after attending a conference at Oxford University where we were assured "Oxford has everything you'll need"... not only was that false, but the technician actually ran away when I went looking for him!

I made a video about it... https://vimeo.com/75655401

nickbailey commented 3 years ago

These changes are often just changing a tab to some spaces? I've left a review comment.

I've created a branch called no-lash with the lash removal changes in that. Is it easy for you to apply these changes without changing all of the tab characters to spaces?

On Monday, 28 September 2020 05:08:10 BST ejeschke wrote:

... -- Commit Summary --

  • Update the Python bits to Python 3 because scons is Python 3 only now

-- File Changes --

M SConstruct (73)
M admin/pkgconfig.py (42)
M admin/qt5muc.py (198)

-- Patch Links --

https://github.com/kampfschlaefer/jackmix/pull/11.patch https://github.com/kampfschlaefer/jackmix/pull/11.diff

ejeschke commented 3 years ago

So to me it sounds like that bit needs a rewrite to work with the ladish.

I think liblash-compat-dev is the library built from ladish. But I might well be wrong here. liblash-compat-dev was in Ubuntu up till about 18.04 or so. I think because the world has moved on to Python 3, Ubuntu doesn't ship with Python 2 by default now. I do not know, but merely guess, that is why it was dropped from 20.04.

I made a video about it..

I watched that video. It was one of the reasons I was tempted to put in the work to get it compiled. I work at a telescope, and we want to use it to mix the sounds that will be streamed to our remote viewing locations. There really are not that many choices for a simple, flexible, mixer with GUI controls in the Jack world. This one has the most straightforward controls (although the business if ganging the controls for stereo is undocumented, and I had to watch the video closely to see how it was done. I might write up a bit of documentation and submit that as a separate PR).

ejeschke commented 3 years ago

These changes are often just changing a tab to some spaces? I've left a review comment.

I've created a branch called no-lash with the lash removal changes in that. Is it easy for you to apply these changes without changing all of the tab characters to spaces?

For Python code, which relies on white space, it is really not recommended to mix tabs and spaces. PEP8 says that Python 3 disallows mixing the use of tabs and spaces for indentation. Indeed, I got many errors trying to run the code and converted them all to spaces.

Most editors that have a Python mode (including even vim and emacs) will happily turn your tabs into spaces when you type them (meaning the right number of spaces to line up with the line above!).

trebmuh commented 3 years ago

lash, ladish (and jack-session) are pretty much dead or deprecated nowadays. linux audio devs have moved to NSM as the session manager of choice.

nickbailey commented 3 years ago

On Monday, 28 September 2020 20:29:25 BST ejeschke wrote:

For Python code, which relies on white space, it is really not recommended to mix tabs and spaces. PEP8 says that Python 3 disallows mixing the use of tabs and spaces for indentation. Indeed, I got many errors trying to run the code and converted them all to spaces.

That's a good point well made. I'd forgotten about the new rule. I always use spaces myself even for Python 2 because of the tab=8 spaces thing, when it's clearly four ;) I just didn't want to change Arnold's code when I joined the project, but as you point out it actually constitutes a fix.

One of my students did some work on a Java applet many years ago, and converted all the tabs to spaces in the repo which upset the original author, so I always try to tread as lightly as possible when it comes to that sort of thing.

I'll commit the python3 comit to the no-lash branch.

nickbailey commented 3 years ago

On Monday, 28 September 2020 20:38:29 BST Olivier Humbert wrote:

lash, ladish (and jack-session) are pretty much dead or deprecated nowadays. linux audio devs have moved to NSM as the session manager of choice.

That's useful intelligence. I'll investigate it.

nickbailey commented 3 years ago

Merged to no-lash branch