How to route a USB MIDI Keyboard to a JACK-MIDI Input, under Debian.

One of the possessions which I have is a USB MIDI Keyboard, which I’d like to be able to play, so that my computer’s software synthesizers actually generate the sound…

dsc_0001 email

I know that this can be done because I’ve done it before. But in the past, when I set this up, I was either using an ‘ALSA’ MIDI input, belonging to an ‘ALSA’ or ‘PulseAudio’ application such as “Linux Multimedia Studio”, or I was using ‘QSynth’, which is a graphical front-end to ‘fluidsynth’, but in such a way that QSynth was listening for ALSA MIDI, and outputting JACK audio. This is actually a very common occurrence. I can switch between using the ‘PulseAudio’ and using the ‘JACK’ sound daemon, through a carefully set-up configuration of ‘QJackCtl’, which suspends PulseAudio when I activate JACK, and which also resumes PulseAudio, when I shut down JACK again.

But there is a basic obstacle, as soon as I want to play my MIDI Keyboard through ‘Ardour’. Ardour v6 can be run with the PulseAudio sound system, but only for playback, or, Ardour can be run with its JACK sound back-end, after JACK has been launched. Ardour cannot be run with its ALSA back-end, when PulseAudio is running.

The default behaviour of the Debian kernel modules, when I plug in a USB MIDI Keyboard, is, to make that MIDI connection visible within my system as an ALSA MIDI source, even though some applications, such as Ardour, will insist on only taking input from JACK MIDI sources, when in fact running in JACK mode. And so, this problem needed to be solved this morning…

Screenshot_20201206_091955

The solution which I found was, to feed the Keyboard, which happens to be an “Oxygen 61″, to the ‘MIDI Through Port’ that’s visible in the ALSA Tab of QJackCtl’s Connections window. When MIDI sequences are fed there, they are also output from the System JACK MIDI sources, visible in the MIDI Tab of QJackCtl’s Connections window:

Screenshot_20201206_092022

Screenshot_20201206_092039

I should also note that, in many cases, the JACK clients can ask the JACK sound daemon to be connected to various inputs and outputs from within, without absolutely requiring that the QJackCtl Connections window be used. This explains why the audio output of Ardour was already routed properly to my PC’s speakers. But I found that I could only keep track of the MIDI connection, through QJackCtl’s Connections window. As the screen-shots above show, the second step is, to feed one of the System Sources to the appropriate Ardour MIDI input, in the MIDI Tab of QjackCtl’s Connections window.

The result was, that the synthesizer which I have available as an Ardour plug-in, played beautifully, in response to my pressing keys on the actual MIDI Keyboard, and no longer just, when I clicked on the graphical keyboard within the Ardour application window:

Screenshot_20201206_092206

This on-screen keyboard can be made visible, by double-Alt-Clicking on the icon of the instrument, with Ardour in its Mixer view, and then expanding the resulting windows’ MIDI Keyboard fly-out. Yet, the on-screen keyboard was only useful for setup and testing purposes.

Tada!

 

(Updated 12/07/2020, 17h20… )

Continue reading How to route a USB MIDI Keyboard to a JACK-MIDI Input, under Debian.

Garmin fenix 5x auto-update stuck at 50%.

I just recently purchased a ‘Garmin fenix 5x’ smart-watch, with emphasis on sports features. And, to make the watch work as smoothly as possible, it was necessary to allow it to install its latest firmware version, which happens to be 20.0 at the time of this posting. But there was a problem. I was intending to use this watch mainly with the ‘Garmin Connect app’, available on Google Play, which communicates with the watch only via Bluetooth. (:1) Installing a firmware upgrade to an unknown, generic device, via Bluetooth, depends on how large a file-size the F/W upgrade is supposed to have. Bluetooth tends to be a slow interface, in the day and age where WiFi as fast as 802.11n is possible. And in this case, the update was apparently stuck at 50%, perhaps not even due to how slow the file transfer would have been, but rather, due to Garmin preferring we install the update via the ‘Garmin Express application’, of which there is a Windows as well as a macOS version.

Problem? I neither have a Windows, nor a macOS device. I depend on installing that update otherwise. But, as indicated below, I found a solution that seems to work for me…

The ‘fenix 5x’ allows the watch itself to be connected to a WiFi network. The possibility should exist, to restart the update process, but, using the watch’s WiFi link, not the Bluetooth upgrade that somehow got broken. In order to accomplish that, the first thing I needed to do was, to add my home WiFi network to the watch’s WiFi networks. Fortunately for me, because the actual Bluetooth pairing between the watch and Android app works 100%, I was able to set up WiFi for the watch, using the Android app.

My phone is a Samsung Galaxy S9, with its latest firmware, and my Garmin Connect app is up-to-date.

The next thing needed to be done manually, because the watch did not just abandon its discontinued Bluetooth upgrade in favour of a new, WiFi-based upgrade.

  • On the watch, Press the ‘Menu’ and the ‘Up’ button simultaneously,
  • Next, Scroll Down to the ‘Settings Entry’,
  • Press the ‘Activate’ button once,
  • Scroll Down to the ‘System Entry’,
  • Press the ‘Activate’ button once, again,
  • Scroll down to the (last) ‘Software Update Entry’,
  • Press the ‘Activate’ button once, again,
  • There should be an ‘Auto-Update Entry’ set to ‘On’, as well as an ‘Update Available Entry…’ Scroll to this last Entry, if there is one after the ‘Auto-Update Entry’.
  • Press the ‘Activate’ button again, once,
  • Press ‘Continue’ if so instructed,
  • Repeat until doing this no longer reveals an ‘Update Available Entry’. At that point, the last menu should only have the ‘Auto-Update (== On) Entry’.

Because the watch was set up to connect to my WiFi without problems, it was able to install a major and a minor update quickly and without issues. After its major update, it restarted.

 

(Update 10/12/2020, 16h05: )

Continue reading Garmin fenix 5x auto-update stuck at 50%.

Pursuing the question of, whether a Linux subsystem, that runs under Android, due to the UserLAnd app, can be used for Web development.

It was a subject which I wrote about several months, or years ago, that I had installed the “UserLAnd” app on my Google Pixel C Tablet, so that I could install Debian Linux on it. And a question which one reader had asked me was, whether such an arrangement could be used, to carry out Web development. In fact, some question existed, as to whether proprietary software could be made to run, and my answer was, that it would be preferred to run only Free, Open-Source Software.

In the meantime, I’ve uninstalled Linux from the Pixel C, and installed it on my Samsung Galaxy Tab S6, which has 256GB of internal storage, so that this question can be examined more seriously.

The answer I’d give to this question is, that Web-development can be done in this way, as long as the developer accepts some severe restrictions.

  • Successful development of any kind will depend on whether the user has a real keyboard to type on.
  • The Open-Source application “Bluefish” runs out-of-the box, which is more than I can say for any sort of Python IDE.
  • Because there is little possibility to run a Web-server on the tablet, the features which Bluefish would normally have, to edit PHP Scripts as well, will simply need to be ignored. The ability to preview the Web-pages written, depends on the Guest System’s Firefox browser following the ‘prooted’ Guest System’s Filename-Paths, so that, when Bluefish opens Firefox, the HTML File will essentially be opened as if from the hard drive. And the feature works…

 

Screenshot_20200924-052525_VNC Viewer

Screenshot_20200924-052618_VNC Viewer

 

The main reason I would say, not to invest in paid-for software on this platform, is, because its full potential will not be realized.

The HTML and CSS Files created in this way will next need to be transferred to an actual Web-server, and some of the ways in which Bluefish would be set up on a real Linux box, would make this easier.

 

(Updated 10/03/2020, 4h00: )

Continue reading Pursuing the question of, whether a Linux subsystem, that runs under Android, due to the UserLAnd app, can be used for Web development.

Trying to turn an ARM-64 -based, Android-hosted, prooted Linux Guest System, into a software development platform.

In a preceding posting I described, how I had used an Android app that does not require or benefit from having ‘root’, to install a Linux Guest System on a tablet, that has an ARM-64 CPU, which is referred to more precisely as an ‘aarch64-linux-gnu’ architecture. The Android app sets up a basic Linux system, but the user can use apt-get to extend it – if he chose a Debian 10 / Buster -based system as I did. And then, for the most part, the user’s ability to run software depends on how well the Debian package maintainers cross-compiled their packages to ‘AARCH64′. Yet, on some occasions, even in this situation, a user might want to write and then run his own code.

To make things worse, the main alternative to a pure text interface, is a VNC Session, based on ‘TightVNC’, by the choice of the developers of this app. On a Chromebook, I chose differently, by setting up a ‘TigerVNC’ desktop instead, but on this tablet, the choice was up to the Android developers alone. What this means is, that the Linux applications are forced to render purely in software mode.

Many factors work against writing one’s own code, that include, the fact that executables will result, that have been compiled for the ‘ARM’ CPU, and linked against Linux libraries! :-D

But one of the immediate handicaps could be, that the user might want to program in Python, but can’t get any good IDEs to run. Every free IDE I could try would segfault, and I don’t even believe that these segfaults are due to problems with my Python libraries. The IDEs were themselves written in Python, using Qt5, Gtk3 or wxWidgets modules. These types of libraries are as notorious as the Qt5 Library, for relying on GPU acceleration, which is nowhere to be found, and one reason I think this is most often the culprit, is the fact that one of the IDE’s – “Eric” – actually manages to report with a gasp, that it could not create an OpenGL rendering surface – and then Segfaults. (:3)

 

(Edit 9/15/2020, 13h50: )

I want to avoid any misinterpretations of what I just wrote. This does not happen out of nowhere, because an application developer decided to build his applications using ‘python3-pyqt5′ etc… When I give the command:

 


# apt install eric

 

Doing so pulls in many dependencies, including an offending package. (:1) Therefore, the application developer who wrote ‘Eric’ not only chose to use one of the Python GUI libraries, but chose to use OpenGL as well.

Of course, after I next give the command to remove ‘eric’, I also follow up with the command:

 


# apt autoremove

 

Just so that the offending dependencies are no longer installed.

 

(End of Edit, 9/15/2020, 13h50.)

 

Writing convoluted code is more agreeable, if at the very least we have an IDE in front of us, that can highlight certain syntax errors, and scan includes for code completion, etc. (:2)

Well, there is a Text Editor cut out for that exact situation, named “CudaText“. I must warn the reader though, that there is a learning curve with this text editor. But, just to prove that the AARCH64-ported Python 3.7 engine is not itself buggy, the text editor’s plug-in framework is written in Python 3, and as soon as the user has learned his first lesson in how to configure CudaText, the plug-in system comes to full life, and without any Segfaults, running the Guest System’s Python engine. I think CudaText is based on Gtk2.

Screenshot_20200914-124954_VNC Viewer

This might just turn out to be the correct IDE for that tablet.

 

(Updated 9/19/2020, 20h10… )

Continue reading Trying to turn an ARM-64 -based, Android-hosted, prooted Linux Guest System, into a software development platform.