Alsa MIDI to Jack. Is there a way to start it (and keep configuration) automatically?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
777funk
Established Member
Posts: 41
Joined: Mon Jun 02, 2014 1:50 am
Has thanked: 2 times
Been thanked: 1 time

Alsa MIDI to Jack. Is there a way to start it (and keep configuration) automatically?

Post by 777funk »

It's not that hard to enter:
a2jmidid -e a2jmidid -e

into a terminal and hit enter and connect the keyboard to Reaper when I am doing MIDI work but it is a little bit of a pain.

Is there a way to make it automatic? It is too bad that we have this minor annoyance running Jack and trying to run MIDI. I do like Jack since I can do things that would normally break my system (i.e. unplug the sound device without a crash by stopping Jack first). Sometimes this seems to crash the OS if not in Jack. I'm learning to love it in other words even with some minor bothers here and there.

User avatar
erlkönig
Established Member
Posts: 194
Joined: Tue May 31, 2022 8:58 am
Has thanked: 38 times
Been thanked: 41 times

Re: Alsa MIDI to Jack. Is there a way to start it (and keep configuration) automatically?

Post by erlkönig »

It depends on your Distro or Desktopenvironment. On a SysV System you can place your command in a file like /etc/rc.local. On a System running system.d you can create a system service (on manjaro/arch there's a special service that executes /etc/rc.local).
Another way would be to place that command in the autostart of your Desktopenvironment.

Currently working with
https://www.honeysuckers.rocks/?lang=en
https://de-de.facebook.com/SatanicVoices2019
Fiddling with sequencers does not evolve into music necessarily and Mac users have smelly feet and guzzle little children.

User avatar
sunrat
Established Member
Posts: 907
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 238 times

Re: Alsa MIDI to Jack. Is there a way to start it (and keep configuration) automatically?

Post by sunrat »

How do you start jack? Here I use Qjackctl and just have a2jmidid -e & in the Options > Execute script after Startup.
If launching from CLI or from a startup command, just add to the end of it

Code: Select all

 && a2jmidid -e &
777funk
Established Member
Posts: 41
Joined: Mon Jun 02, 2014 1:50 am
Has thanked: 2 times
Been thanked: 1 time

Re: Alsa MIDI to Jack. Is there a way to start it (and keep configuration) automatically?

Post by 777funk »

This (attached) setting in QJackCtl seems to do it for me. Thanks to all for the tips!! What a great and helpful place.

Attachments
Screenshot_2023-04-20_15-23-32.png
Screenshot_2023-04-20_15-23-32.png (164.69 KiB) Viewed 1555 times
User avatar
Impostor
Established Member
Posts: 1298
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 134 times
Been thanked: 334 times

Re: Alsa MIDI to Jack. Is there a way to start it (and keep configuration) automatically?

Post by Impostor »

777funk wrote: Sun Apr 02, 2023 2:52 am

It's not that hard to enter:
a2jmidid -e a2jmidid -e

into a terminal and hit enter and connect the keyboard to Reaper when I am doing MIDI work but it is a little bit of a pain.

Is there a way to make it automatic?

As you've already figured out, running that command within qjackctl works fine.
But, if you only need to make that connection with Reaper specifically, why not create a little script to start Reaper AND make the connection? Or even add qjackctl itself to it? Pin it to the panel, and one click starts up everything!

For MusE for example, I made a .desktop file, pinned to the panel, calling a script muse.sh, which checks whether or not qjackctl and/or MusE are already running; if not, start 'em up. To start qjackctl another script is called which starts up jack_mixer (and minimizes it into the system tray) and qjackctl itself. Then within qjackctl a script is executed on shutdown which closes jack_mixer if qjackctl shuts down.

Is a little bit of work, once, but works like a charm!

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: Alsa MIDI to Jack. Is there a way to start it (and keep configuration) automatically?

Post by asbak »

There are many ways. One is with jack-plumbing.

777funk wrote: Sun Apr 02, 2023 2:52 am

Is there a way to make it automatic?

Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
Post Reply