On 1/15/23 12:26, Alexandre Ratchov wrote:
On Sun, Jan 15, 2023 at 09:38:38AM +0100, Brian Durant wrote:
The following command will connect a USB MIDI device:
$ midicat -d -q midi/0 -q midithru/0 &
A second device can be connected as follows:
$ midicat -d -q midi/1 -q midithru/1 &
Both output MIDI code in the terminal. (Note that redirecting both MIDI
devices to midithru/0 doesn’t seem to pipe both devices through, but rather
only midi/0.) Adding the following command provides a way to convert MIDI
code to sound using Fluidsynth:
Redirecting two ports to midithru/0 is supposed to work:
$ midicat -d -q midi/0 -q midithru/0 # in one terminal
$ midicat -d -q midi/1 -q midithru/0 # in another terminal
should merge the two inputs. Both terminals should show the events of
the corresponding input. If there's a synth on midithru/0
(ex. fluidsynth command below is running) it will produice sounds for
both inputs.
Hmm. Seems to be working now. However, this just means that MIDI signals
go from both MIDI devices to one instance of fluidsynth. This of course
means that both devices are sending MIDI code to one soundfont
instrument. If run as:
$ midicat -d -q midi/0 -q midithru/0
and
$ midicat -d -q midi/1 -q midithru/1
MIDI input could be used to play different soundfont instruments - one
for midi/0 and one for midi/1. Possibly something with the Fluidsynth
"-L" option? The problem is the same for LMMS. However, only one MIDI
input is ever available. Enabling MIDI input and choosing different
channels for SF2 Player and Kicker do not provide a second MIDI input to
choose from when the clicking the relevant plugin's gear icon in the
"song editor" window. Not even when running midicat as I have suggested
above. Hopefully this won't raise any hackles me writing this, but what
I am describing is the normal expectation for using MIDI under Windows,
Mac and Linux... I realize that this is achieved in various ways
depending on the OS, but particularly the expected use case scenario
that I describe for LMMS provides some challenges in OpenBSD.
$ fluidsynth /usr/local/share/generaluser-gs/GeneralUser_GS.sf2
However, this only works for midi/0. The same is the case when using LMMS
with SF2 Player and Kicker. I can get sound with SF2 Player or Kicker, but
there again appears no way to connect the second device to the second
plugin. Connecting two MIDI devices (or one device with keys and pads on two
channels) is not an unusual use case scenario, so I am assuming that there
is a solution without having to resort to midish.