How to get a persistent midi instrument source port? ( lightweight )

classic Classic list List threaded Threaded
4 messages Options
hgn
Reply | Threaded
Open this post in threaded view
|

How to get a persistent midi instrument source port? ( lightweight )

hgn
Dear list,

to avoid the https://en.wikipedia.org/wiki/XY_problem I'm going to tell
you my goal first, then my current route to a solution, with a missing
piece.

I work with several midi instruments. Some of them USB, some of them
DIN, all of them have different names. Only ever one is connected at
once.
I want my programs to accept data entry from my instruments, no matter
which of them is plugged in.

What is the easiest way to do this?

My current idea is to establish a virtual jack midi thru port. All
software can use this port as midi data source.

Hardware instruments then get be connected via one of the many
auto-connector solutions: The one built into QJackCtl or
https://github.com/SpotlightKid/jack-matchmaker , which is what I am
using already.

The virtual jack midi port is the missing piece.
What is the best way to get one? "Best" means least resources, least
administration overhead.  E.g. any answer involving the words "plugin
host" is already too much. Ideal would be a simple daemon program I can
autorun after starting jack (with qjackctl script-after-start)

So I am either looking for that midi thru port or a different solution
that works even better.

-hgn

P.S.
In case the JACK devs are reading:
AFAIK Jack works under the assumption that audio System out 1 and 2 are
the main abstracted stereo outputs and are available on any system. This
leads to great portability across all systems.

I consider midi data entry with a single instrument an equally typical
use case and would like to propose to add a single midi thru port to
JACK directly. No more, no less, nothing to configure, nothing to check
for as user or developer.
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: How to get a persistent midi instrument source port? ( lightweight )

Jeanette C.
Hey there,
do you need your MIDI instrument ports a lot with only JACK aware
applications? If not, would it be convenient to stop JACK using the ALSA
hardware ports? If so, you could let your instruments appear as ALSA sequencer
ports. There are programs to bridge between ALSA and JACK and vice versa. In
JACK and ALSA they offer a port. So in ALSA you can autoconnect your
instrument ports to the ALSA JACK bridge and in JACK your program can
statically feed from the JACK port of that bridge. If you need to send data
back to your instruments, run the JACK ALSA bridge, which works the same way.

HTH.

Best wishes,

Jeanette

--
  * Website: http://juliencoder.de - for summer is a state of sound
  * SoundCloud: https://soundcloud.com/jeanette_c
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * GitHub: https://github.com/jeanette-c
  * Twitter: https://twitter.com/jeanette_c_s

Don't, don't let me be the last to know
Don't hold back, just let it go <3
(Britney Spears)
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: How to get a persistent midi instrument source port? ( lightweight )

Len Ovens
In reply to this post by hgn
On Sun, 24 Mar 2019, hgn wrote:

> In case the JACK devs are reading:

Not a jack dev ... but

> AFAIK Jack works under the assumption that audio System out 1 and 2 are
> the main abstracted stereo outputs and are available on any system. This
> leads to great portability across all systems.

I think you will find that rather than jack assuming anything, it is the
various jack clients that assume system 1 and 2 are stereo left and right.
As this is not always the case, allowing the user to not auto connect is a
good idea. Concider many devices have different outputs for line and
headphones and aes3/spdif ports are almost never 1 and 2. However, for
most users, 1 and 2 are a good guess.

> I consider midi data entry with a single instrument an equally typical
> use case and would like to propose to add a single midi thru port to
> JACK directly. No more, no less, nothing to configure, nothing to check
> for as user or developer.

If you are using jack MIDI with ALSA then you would normally be using
a2amidid (at least in jack2) which already shows the default alsa MIDI
through set of ports. As jack1 comes with a2jmidid included, I would
assume the right commandline parameters would import the system through
port there as well. On my system, the MIDI portion of jack_lsp shows:
a2j:Midi Through [14] (capture): Midi Through Port-0
a2j:Midi Through [14] (playback): Midi Through Port-0
a2j:Ensoniq AudioPCI [16] (capture): ES1370
a2j:Ensoniq AudioPCI [16] (playback): ES1370


--
Len Ovens
www.ovenwerks.net
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
hgn
Reply | Threaded
Open this post in threaded view
|

Re: How to get a persistent midi instrument source port? ( lightweight )

hgn
In reply to this post by Jeanette C.
Hello again,

24.03.2019 11:45 Jeanette C.:
> Hey there,
> do you need your MIDI instrument ports a lot with only JACK aware
> applications? If not, would it be convenient to stop JACK using the
> ALSA hardware ports?

I would prefer a pure JACK midi solution. I originally wrote midi
hardware, but software keyboards and other midi controllers might be in
the mix as well.

IIRC the Jack demo application simply copies audio in to audio out.  I
am searching for that, but for midi.

-hgn
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user