MIDI over Bluetooth in Linux?

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

pax-eterna
Established Member
Posts: 106
Joined: Sat Apr 24, 2021 11:30 pm
Has thanked: 9 times
Been thanked: 6 times

MIDI over Bluetooth in Linux?

Post by pax-eterna »

Is it possible, firstly?

I have a MIDI dongle attached to my controller keyboard (WIDI-Master) my Linux OS sees the device and pairs successfully (at least it seems to). But this MIDI input is not available in the DAW, in this case Reaper.

So, yeah is what I am trying even possible? If not I'll stop researching and think of going MIDI cables and hard connections. But prefer wireless for various reasons.

Thanks

PS: I've looked at MidiBerry, and LoopMidi among others as possible solutions but not available for Linux....I cannot even find a way to run them in Linux. I'd rather not have to add WINE into the mix as it will just complicate things.
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 136 times

Re: MIDI over Bluetooth in Linux?

Post by Linuxmusician01 »

Nice dongle! I didn't know Midi over bluetooth existed. Might buy me one of those if it works in Linux. As far as I can tell Linux should support Midi over bluetooth. See this link: "[...] a new ALSA Sequencer client and port will be created so you can start using". After successfully pairing your BT-Midi dongle (with bluetoothctl) and midi-keyboard could you run the following commands and paste the output here to see if it's detected by Alsa as a Midi device?

Check Midi port numbers:

Code: Select all

aconnect -io
Check Midi output (example if port number is 24):

Code: Select all

aseqdump -p 24
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: MIDI over Bluetooth in Linux?

Post by Drumfix »

Most likely midi support is disabled in BlueZ(which is the default). So you need to compile it with BlueZ with midi support enabled.
As an example this page describes how this is done for Ubuntu 16.04.

https://tttapa.github.io/Pages/Ubuntu/S ... BlueZ.html
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 136 times

Re: MIDI over Bluetooth in Linux?

Post by Linuxmusician01 »

Drumfix wrote: Mon Sep 06, 2021 10:45 am Most likely midi support is disabled in BlueZ(which is the default). So you need to compile it with BlueZ with midi support enabled.
As an example this page describes how this is done for Ubuntu 16.04.

https://tttapa.github.io/Pages/Ubuntu/S ... BlueZ.html
Too bad Midi is per default disabled in bluez. Is there a way to check if your blues version has Midi enabled?
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: MIDI over Bluetooth in Linux?

Post by Drumfix »

Linuxmusician01 wrote: Mon Sep 06, 2021 2:38 pm Is there a way to check if your blues version has Midi enabled?
Search for bluetoothd on your system then

Code: Select all

ldd bluetoothd
If it doesn't show a dependency on libasound2, then midi support is not compiled in.
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 136 times

Re: MIDI over Bluetooth in Linux?

Post by Linuxmusician01 »

Drumfix wrote: Mon Sep 06, 2021 3:37 pm
Linuxmusician01 wrote: Mon Sep 06, 2021 2:38 pm Is there a way to check if your blues version has Midi enabled?
Search for bluetoothd on your system then

Code: Select all

ldd bluetoothd
If it doesn't show a dependency on libasound2, then midi support is not compiled in.
Thanks! :)

Guess I'm gonna have to compile bluez from source if I'm gonna want to go the bluetooth midi way.
pax-eterna
Established Member
Posts: 106
Joined: Sat Apr 24, 2021 11:30 pm
Has thanked: 9 times
Been thanked: 6 times

Re: MIDI over Bluetooth in Linux?

Post by pax-eterna »

Linuxmusician01 wrote: Mon Sep 06, 2021 9:19 am Nice dongle! I didn't know Midi over bluetooth existed. Might buy me one of those if it works in Linux. As far as I can tell Linux should support Midi over bluetooth. See this link: "[...] a new ALSA Sequencer client and port will be created so you can start using". After successfully pairing your BT-Midi dongle (with bluetoothctl) and midi-keyboard could you run the following commands and paste the output here to see if it's detected by Alsa as a Midi device?

Check Midi port numbers:

Code: Select all

aconnect -io
Check Midi output (example if port number is 24):

Code: Select all

aseqdump -p 24
Yes they are quite neat! And I can run it with just the out...the in can be removed. Great for controllers that only need the out :) If you run two or more they auto pair with each other as well....but I digress.
I have paired it with the OS, I ran the HIC tests to first check it is connected and indeed ble is running ok... all those were successful. It seems Reaper itself cannot actually see and use it as a valid midi port...I am checking over there as well :D

fwiw, here is the result of that command :

client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 20: 'X18/XR18' [type=kernel,card=1]
0 'X18/XR18 MIDI 1 '
Last edited by pax-eterna on Tue Sep 07, 2021 12:46 am, edited 1 time in total.
pax-eterna
Established Member
Posts: 106
Joined: Sat Apr 24, 2021 11:30 pm
Has thanked: 9 times
Been thanked: 6 times

Re: MIDI over Bluetooth in Linux?

Post by pax-eterna »

Drumfix wrote: Mon Sep 06, 2021 3:37 pm
Linuxmusician01 wrote: Mon Sep 06, 2021 2:38 pm Is there a way to check if your blues version has Midi enabled?
Search for bluetoothd on your system then

Code: Select all

ldd bluetoothd
If it doesn't show a dependency on libasound2, then midi support is not compiled in.
I followed these steps : https://www.jaredwolff.com/get-started- ... ow-energy/
pax-eterna
Established Member
Posts: 106
Joined: Sat Apr 24, 2021 11:30 pm
Has thanked: 9 times
Been thanked: 6 times

Re: MIDI over Bluetooth in Linux?

Post by pax-eterna »

Drumfix wrote: Mon Sep 06, 2021 3:37 pm
Linuxmusician01 wrote: Mon Sep 06, 2021 2:38 pm Is there a way to check if your blues version has Midi enabled?
Search for bluetoothd on your system then

Code: Select all

ldd bluetoothd
If it doesn't show a dependency on libasound2, then midi support is not compiled in.
Tried doing a search and came up with permission denied (bot as sudo and non-sudo)
pax-eterna
Established Member
Posts: 106
Joined: Sat Apr 24, 2021 11:30 pm
Has thanked: 9 times
Been thanked: 6 times

Re: MIDI over Bluetooth in Linux?

Post by pax-eterna »

Linuxmusician01 wrote: Mon Sep 06, 2021 6:11 pm
Drumfix wrote: Mon Sep 06, 2021 3:37 pm
Linuxmusician01 wrote: Mon Sep 06, 2021 2:38 pm Is there a way to check if your blues version has Midi enabled?
Search for bluetoothd on your system then

Code: Select all

ldd bluetoothd
If it doesn't show a dependency on libasound2, then midi support is not compiled in.
Thanks! :)

Guess I'm gonna have to compile bluez from source if I'm gonna want to go the bluetooth midi way.
I've tried a couple of different ways and nothing has worked so far - BUT the OS system reports it as ble working for the paired device...so again I THINK it may be down to Reaper. Not sure I feel like installing another daw just to check it out hahaha!
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 136 times

Re: MIDI over Bluetooth in Linux?

Post by Linuxmusician01 »

pax-eterna wrote: Tue Sep 07, 2021 12:42 am Yes they are quite neat! And I can run it with just the out...the in can be removed. Great for controllers that only need the out :) If you run two or more they auto pair with each other as well....but I digress.
I have paired it with the OS, I ran the HIC tests to first check it is connected and indeed ble is running ok... all those were successful. It seems Reaper itself cannot actually see and use it as a valid midi port...I am checking over there as well :D

fwiw, here is the result of that command :

Code: Select all

aconnect -io

client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'X18/XR18' [type=kernel,card=1]
    0 'X18/XR18 MIDI 1 '
I do not see a Midi device in that list. The XR18 is your Behringer XR18 audio interface. And indeed, it has a Midi port. I don't see your WIDI-Master dongle in there.

I don't know how to compile bluez so that it supports Midi and I don't understand the method that is described in the link that you point to. But either:
  1. something did not go well on connecting to the Midi bluetooth dongle;
  2. compiling bluez from source didn't go well;
  3. you've got two bluez versions on your system: the old one that was installed via the repository of your distro and the new one that you've compiled yourself.
The method in your link is for Debian. Is that the distribution that you use?

No need to use another DAW: it's not your DAW. :)
pax-eterna
Established Member
Posts: 106
Joined: Sat Apr 24, 2021 11:30 pm
Has thanked: 9 times
Been thanked: 6 times

Re: MIDI over Bluetooth in Linux?

Post by pax-eterna »

Thanks - one of the things I read was that any existing install needed to be removed, and then a new install compiled, but having said that, I am WAY to new to Linux to begin to comprehend "compiling" and editing config files (haha even IF I could find them :D )

I did try removing the OS install (well I think I did??) before running it all....I have read it is supposed to work as expected BUT it needs to be activated first, apparently Bluez has the MIDI side set to off by default!!! To me that's pretty dumb, but moving right along.....so one needs to recompile, whatever that is, and set the MIDI to on, however you do that, and then good to go....hahaha! a lot of steps before the good to go bit...
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 136 times

Re: MIDI over Bluetooth in Linux?

Post by Linuxmusician01 »

pax-eterna wrote: Tue Sep 07, 2021 5:47 pm I have read it is supposed to work as expected BUT it needs to be activated first, apparently Bluez has the MIDI side set to off by default!!! To me that's pretty dumb,
To me too and I've been using Linux for over 15 years.
pax-eterna wrote: Tue Sep 07, 2021 5:47 pm but moving right along.....so one needs to recompile, whatever that is, and set the MIDI to on, however you do that, and then good to go....hahaha! a lot of steps before the good to go bit...
If you're not that experienced in using Linux then I'd steer away from compiling applications from source code. That's not the common way to install software.

Do you know what source code is? Has nothing to do with Linux. The way I see it is as follows. I hope experienced developers will forgive me the oversimplification and incorrectness. If you write/develop a program (for Windows, Linux, MacOS, MS-DOS, whatever) then you do that (or did that in the 80's where I'm from) in a text editor with commands like "print" and "go to" etc. which is called source code. A computer's operating system can't do anything with that. The source code of your program must be converted (by another program) so it can be run on your computer. The program that does this conversion is called a 'compiler'. One compiles source code to a "binary" file that actually can be executed on a computer.

Anyway, I'd try to learn something about computers and Linux before trying to compile stuff from source.

What Linux distribution do you use? Debian, Ubuntu, Suse? Maybe somebody has already made a so-called "package" for your distro for bluez with Midi support. Do you know what a package is?
folderol
Established Member
Posts: 2072
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 224 times
Been thanked: 400 times
Contact:

Re: MIDI over Bluetooth in Linux?

Post by folderol »

To paraphrase...
One is not so much surprised that it can be done,
but that anyone would want to do it! :shock:
The Yoshimi guy {apparently now an 'elderly'}
pax-eterna
Established Member
Posts: 106
Joined: Sat Apr 24, 2021 11:30 pm
Has thanked: 9 times
Been thanked: 6 times

Re: MIDI over Bluetooth in Linux?

Post by pax-eterna »

Linuxmusician01 wrote: Wed Sep 08, 2021 10:03 am
pax-eterna wrote: Tue Sep 07, 2021 5:47 pm I have read it is supposed to work as expected BUT it needs to be activated first, apparently Bluez has the MIDI side set to off by default!!! To me that's pretty dumb,
To me too and I've been using Linux for over 15 years.
pax-eterna wrote: Tue Sep 07, 2021 5:47 pm but moving right along.....so one needs to recompile, whatever that is, and set the MIDI to on, however you do that, and then good to go....hahaha! a lot of steps before the good to go bit...
If you're not that experienced in using Linux then I'd steer away from compiling applications from source code. That's not the common way to install software.

Do you know what source code is? Has nothing to do with Linux. The way I see it is as follows. I hope experienced developers will forgive me the oversimplification and incorrectness. If you write/develop a program (for Windows, Linux, MacOS, MS-DOS, whatever) then you do that (or did that in the 80's where I'm from) in a text editor with commands like "print" and "go to" etc. which is called source code. A computer's operating system can't do anything with that. The source code of your program must be converted (by another program) so it can be run on your computer. The program that does this conversion is called a 'compiler'. One compiles source code to a "binary" file that actually can be executed on a computer.

Anyway, I'd try to learn something about computers and Linux before trying to compile stuff from source.

What Linux distribution do you use? Debian, Ubuntu, Suse? Maybe somebody has already made a so-called "package" for your distro for bluez with Midi support. Do you know what a package is?
It's Elementary OS 6, which I believe is run on ubuntu. I have found I can install bluez from synaptic, all good there. BUT apparently the Bluetooth MIDI it enables is actually turned off by defaut??? So one needs to activate it. I've followed some instructions I found online, but none seem to work. My bluetooth midi device (Widi-Master) is both seen and paired to the system. The issue is the MIDI is turned off.....that's where I'm at.

PS: thanks for the explanation....I sorta kinda, logically thinking, thought it would be something like that, but it was a good explanation, easy to understand :)
Post Reply