socratools / socranop

Soundcraft Notepad mixer tools for Linux
MIT License
8 stars 2 forks source link

Does this work on Ubuntu 23.10? #83

Open ndim opened 6 months ago

ndim commented 6 months ago

This is a continuation of https://github.com/lack/soundcraft-utils/issues/37. I hope this both helps @GoodTimeAlliance to get a working socranop install, and gives me the necessary kick in the backside to finish the documentation for the first release of socranop. Quoting @GoodTimeAlliance:

I have a 12fx and have just switched to linux to try and take advantage of the pipewire multi audio interface capabilities. I am no programmer or Linux pro, I simply want to get Bitwig [a DAW software -ndim] with all my bits and bobs running.

I have been trying to install this app but had no luck. I get a "pip: command not found" message. Do I need to open a terminal from a specific location to make this work??

Should this program still function in ubuntu 23.10??

GoodTimeAlliance commented 6 months ago

Thank you incredibly very much for getting back to me. To be honest I did not expect a reply at all and thought possibly the project had been abandoned.

I really think the 12fx is a great little mixer, still current & on sale. I actually contacted Soundcraft about this issue asking if they would compile for Linux or open source their app so others could do it but they weren't so keen... Heaven knows why not!!. Its a shame they didn't pop a physical button on the unit to achieve this functionality in the first place.

I will try again tomorrow morning.

Thank you again Hans for your help

Craig

ndim commented 6 months ago

It would not have been done with adding one button. They would have also needed to add four indicator LEDs in some appropriate positions. That would have increased the bill of materials by 1 to 2$, and the sales price by probably 20$, and perhaps increased the case size which means even more price increases.

That would still leave the ducker feature completely without a physical UI, and that would be a lot more elaborate to implement, so keeping that in software would be the easiest.

Anyway, the most important feature would be adding a simple single always-on power LED, and even though that can be achieved with just an LED, a drill, some glue, a few wires, a resistor and some solder, I still have not added one to my Notepad 12FX.

GoodTimeAlliance commented 6 months ago

I was being over simplistic RE the button but it is a faff needing an app. I love the idea of a physical mod by the way. The thought had crossed my mind. I also thought maybe running a Raspberry pi pico or similar in line could be a possibility but again I dont really know what the heck I am talking about in that department.

I am surprised Soundcraft haven't made a revised/upgraded version by now, one with multi channel USB like their MTK series. When I have the money I will probably buy a Mackie Onyx 16 or similar which does have proper multichanel USB. I will still keep my 12fx to sub mix my drums.

Re timescale. Of course, you can take as many days as you please... You owe me nothing at all!! I am simply very pleased to have found a potential solution.

ndim commented 6 months ago

Regarding modding the 12FX to add hardware buttons to change the audio routing: That might or might not be possible.

I would rule out going through the USB interface for that, though, as I would not want to play man in the middle of the USB line for realtime USB audio.

As to multi channel USB... the chipset inside the Notepad series and the whole architecture is made for 2 or 4 channel audio. Anything with more than 4 channels probably needs a completely different set of chips, and a different internal architecture. That would make the result a device very different from the Notepad-12FX, and much more like the Signature 12MTK, which Soundcraft already offers.

ndim commented 6 months ago

Anyway, if you need a quick solution, it might be easiest to use the proof of concept command line interface program from https://github.com/socratools/socradoc and install it system-wide to /usr/local. That is written in the C programming and uses a programming environment which is simpler IMHO and which I am more familiar with than socranop's Python language environment.

sudo apt-get install libusb-1.0-0-dev git pkgconf bash-completion gcc make automake
git clone https://github.com/socratools/socradoc.git
cd socradoc
autoreconf -vis .
./configure
make
sudo make install install-udev-rules

Then re-plug the Notepad mixer. Now it should be possible to run

user@host:~$ scnp-cli audio-routing 0
Bus 001 Device 007: ID 05fc:0032 Soundcraft Notepad-12FX (version 1.0.9)
Setting USB audio source to 0 (MIC 3+4) for device NOTEPAD-12FX
sending 8-byte buffer {00 00 04 00 00 00 00 00})
user@host:~$ scnp-cli audio-routing 1
Bus 001 Device 007: ID 05fc:0032 Soundcraft Notepad-12FX (version 1.0.9)
Setting USB audio source to 1 (LINE 5+6) for device NOTEPAD-12FX
sending 8-byte buffer {00 00 04 00 01 00 00 00})
user@host:~$ scnp-cli audio-routing 2
Bus 001 Device 007: ID 05fc:0032 Soundcraft Notepad-12FX (version 1.0.9)
Setting USB audio source to 2 (LINE 7+8) for device NOTEPAD-12FX
sending 8-byte buffer {00 00 04 00 02 00 00 00})
user@host:~$ scnp-cli audio-routing 3
Bus 001 Device 007: ID 05fc:0032 Soundcraft Notepad-12FX (version 1.0.9)
Setting USB audio source to 3 (MASTER L+R) for device NOTEPAD-12FX
sending 8-byte buffer {00 00 04 00 03 00 00 00})
user@host:~$ _

For help, there is scnp-cli --help and man scnp-cli. If you want to uninstall it later, run

cd socradoc
sudo make uninstall uninstall-udev-rules

Followups would be best at https://github.com/socratools/socradoc/issues, please. Not that I like chasing you from repo to repo, but it will be easier to find and get useful information from for other people later.

ndim commented 6 months ago

@GoodTimeAlliance I have just worked through installing socranop on a Ubuntu 23.10 VM. I have found and fixed a few small problems with the developer type of installation, and I am not sure how non-developer installations can work at this time.

This means that the official git repo at https://github.com/socratools/socranop does not contain the above mentioned fixes yet and probably will not do for several days to weeks until @lack reviews my pull requests.

Until that happens, you can use the dev branch from my forked repo at https://github.com/ndim/socranop/tree/dev:

git clone https://github.com/ndim/socranop.git
cd socranop
git remote add ndim https://github.com/ndim/socranop.git
git fetch ndim
git checkout dev

Now you can do the developer type installation as described in the HACKING.md file. This about boils down to installing the prerequisite packages

sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-gudev-1.0 python3-pydbus python3-usb

and then install socranop into $HOME/.local/:

pipenv run pip install setuptools
pipenv install --dev
tools/link_system_libs
pipenv shell

socranop-installtool post-pip-install --sudo-script sudo-install.sh
sudo sh -x sudo-install.sh

After this, you can press "Super" (the "Windows" key on the keyboard) and find "socranop" in the list of applications to run.

A proper .deb package to be installed with apt on Debian/Ubuntu/Raspberry Pi OS will happen in the future, but we are not there yet. A Fedora package will probably happen sooner. At this time, only the Arch AUR repository has a finished native socranop package, but Arch is probabably not the best choice for someone very new to Linux.

I hope this helps. Do please reply with information in case you run into problems.

GoodTimeAlliance commented 6 months ago

Thank you Hans, I really appreciate your brilliant efforts. I will hopefully have time to give it another whirl later today.

I have kept an eye on Linux for many years from a laymans perspective, I have tried to learn to code a little but beyond the absolute basics I realise I really do not have the right kind of brain for it. I have however used Linux to keep old computers running for general computing tasks quite a lot over the years..

I chose Ubuntu simply because Bitwig recommends it and that Pipewire is supposed to be very good there. I do not use many VST' plugins and actually everything I commonly use now runs natively on Linux apart from Arturia Pigments & the MPC desktop software which I will just run separately on an old laptop .. I understand that Pigments may well run using YaBridge but I havent got that far yet.

I love how snappy Linux feels compared to Windows and I love the modern feel of the environment but It strikes me however that Linux will struggle to become a real option for many people who just want to run their favourite software reliably and install graphically either by some kind of package manager or by clicking on the .exe (equivalent) icon. I am not talking about your software here as obviously I fully appreciate it is in development but installing other things like Yabridge has been super tricky for me. It seems there is far too much presumed knowledge.

I think Terminal etc is amazing for people capable of taking advantage of it but for many of us it really is barrier to mass migration. Flatpack etc promises to be the answer however Bitwig themselves advised me that Flatpack is not quite ready yet and their software does not run as well there.

Those are my thoughts after a one week dive into the world of Ubuntu. Impressed but also frustrated. Please do not feel you need to reply to the above thoughts at all but it feels good to get my thoughts out there to an actual developer.

Many thanks again Hans

Craig

ndim commented 6 months ago

I know that Ubuntu is quite popular in general, and Raspberry Pi OS also is, so a Debian package is something I definitely want to pursue (both Ubuntu and Raspberry Pi OS are derived from Debian, therefore a Debian package).

However, I am not running Ubuntu or Debian myself, so I need to (re-)learn how to build .deb packages first.

I personally am running Fedora as it fits well for my developer self, and I already maintain a few packages in Fedora, and therefore I already have a socranop Fedora package almost finished.

I definitely do not want to suggest you switch to Arch (with its existing AUR package of socranop) or Fedora (where I could easily provide a native socranop .rpm package).

Anyway... about a timeline for a socranop .deb package: I need to (re-)learn how to do that, then do it, then produce .deb packages myself. A few weeks. After that, I need to find people who want put that .deb package into Debian and then Ubuntu and Raspberry Pi OS. A few more weeks. Sometime in between there might be the long awaited socranop-0.5.0 release.

All of that could have been finished about 18..24 months ago if I had not delayed it. Sorry. The perfect IS the enemy of the good.

Anyway, the terminal based instructions for building and installing either the command line tool scnp-cli from the socradoc repo or the graphical user interface and command line tools socranop-gui and socranop-ctl from the socranop repository should work right now and carry you over until a proper .deb package is available to you.

A few general remarks on GUIs versus terminals:

For many things, a terminal is a very efficient way for communicating things between people. "click the button labeled Moo, then verify the drop down list is set to foobar, and click ok" is not necessarily easier to write and to read and follow than "run meh --moo=foobar".

And often a terminal is also more efficient for communicating things from people to computer. If I want to move all files whos names contain the letters "rs" followed by a number, and end in ".txt", to some other directory, a shell in a terminal is much quicker than mouse selecting such files out of a few dozen or a few hundred files.

Even when the person in front of the computer needs to see many things at once (CAD drawings, electronics design, DAWs, 3D modelling, video editing, etc) a well designed command line inside such a GUI program (in addition to pointer devices) can be very efficient. I have observed such things a number of times in the CAD and EDA spaces.

GoodTimeAlliance commented 6 months ago

Have you by any chance installed Bitwig on Fedora?? If so how does it run??

Thank you for the quick lesson in Terminal. I do understand how that with knowledge using terminal could be way more efficient.

ndim commented 6 months ago

And in support situations, a terminal is a good way for someone with less knowledge to partake in the knowledge of someone with more knowledge.

ndim commented 6 months ago

No, I do not have Bitwig installed.

I understand Bitwig to be a DAW, and I do not use any DAW software, as I never need to do the things a DAW does. I do not do audio production, neither music nor speech.

I have had Ardour (which falls in the DAW space) installed on my system since the pre-pipewire days when you needed to start jack separately, but I have never really used Ardour or jack for anything of consequence.

My main use case for the Notepad-12FX is listening to audio from multiple sources going into one pair of headphones or stereo speakers:

Back when I was still using my old Behringer Xenyx 302USB mixer, I occasionally used that with a condenser microphone and the mumble voice chat application.

When I upgraded from the Xenyx 302USB to the Notepad-12FX to allow PC audio playback with the electric guitar, I wanted to retain the possibility to use mumble with my mixer, and that is when I needed a piece of software for to change the audio routing on the Notepad-12FX.

I have rarely used the USB audio-in part of the Notepad-12FX, though, as I lost interest in my mumble use case.

I have thought of the possibility to do a mix minus with the Notepad-12FX in a podcasting situation with participants connected remotely, but I have never actually needed that. I just wanted to make sure that the investment in the Notepad-12FX would allow this in principle with some clever use of adapter cables.

I have thought about potentially recording my playing the electric guitar alongside a certain track a few times, as I am crazy enough to think that this track lacks a guitar part and that I came up with a good one. That would have needed some very light DAW work to make sure that the levels and the stereo mix are OK, and to create a stereo output file from the original stereo track plus my guitar. But I have not gotten around to doing that.

ndim commented 5 months ago

I have a basic working Debian/Ubuntu package of socranop working in ndim/socranop. It uses branches debian/latest, upstream/latest, tag upstream/0.4.92, and builds a *.deb package file using gbp buildpackage --no-sign.

BTW, I have installed the resulting *.deb file on both Debian trixie/sid (will be 13), and on Ubuntu 23.10, and that has demonstrated issue https://github.com/socratools/socranop/issues/87 (fixed now).

@GoodTimeAlliance If you are looking for a finished package:

On my fork of socranop, you can look on the Actions page for successful actions on pushes to the debian/latest branch.

Click on the latest successful workflow run, then take a look at the list of "Artifacts" on the bottom for a list of operating systems (Debian 11, Debian 12, Ubuntu 22.04, Ubuntu 23.10).

Those "Artifacts" are zip files, each of which contain a socranop_0.4.92-1_all.deb package which can then be installed with dpkg -i or possibly with some GUI element in a file manager.

This user experience is not optimal, but that is what I can offer at this time.

GoodTimeAlliance commented 5 months ago

Thank you Hans.

I thought it would be many weeks yet. I will try it as soon as I get back to my studio (shed)

ndim commented 5 months ago

I thought it would be many weeks yet.

Let me try a musical analogy. We have a basic chord sequence and a few guitar riffs. We may have a melody which needs work. We still need to come up with lyrics, drums, a bass line, some pads, a piano, a string orchestra and some woodwinds. It will take some time to reach a properly produced radio edit.