Connecting BT MIDI device in ubuntu

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
twangbarang
Posts: 2
Joined: Tue Apr 26, 2022 5:02 pm

Connecting BT MIDI device in ubuntu

Post by twangbarang »

Hi,

I'm running a stock ubuntu 20.04 and i'm creating music with bitwig. I recently got me a genki wave which is a bluetooth midi devices which i would like to use in bitwig.

After reinstalling bluez with the --enable-midi flag i'm stuck now at the point where somehow alsa does not fully recognise the device.

So here's what I mean:

Code: Select all

aconnect -lio
finds the device (Wave Bluetooth at the bottom)

Code: Select all

~ ❯ aconnect -lio                                                                                           
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 24: 'Launchpad Pro MK3' [type=kernel,card=2]
    0 'Launchpad Pro MK3 LPProMK3 MIDI'
    1 'Launchpad Pro MK3 LPProMK3 DIN'
    2 'Launchpad Pro MK3 LPProMK3 DAW'
client 128: 'Wave' [type=user,pid=653]
    0 'Wave Bluetooth  '
~ ❯ aconnect -lio                                                                                            
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 24: 'Launchpad Pro MK3' [type=kernel,card=2]
    0 'Launchpad Pro MK3 LPProMK3 MIDI'
    1 'Launchpad Pro MK3 LPProMK3 DIN'
    2 'Launchpad Pro MK3 LPProMK3 DAW'
client 128: 'Wave' [type=user,pid=653]
    0 'Wave Bluetooth  '
and i'm also able to capture some midi via

Code: Select all

~ ❯ aseqdump -p 128                                                                                         
Waiting for data. Press Ctrl+C to end.
Source  Event                  Ch  Data
128:0   Control change          0, controller 17, value 74
128:0   Control change          0, controller 18, value 80
128:0   Pitch bend              0, value 20
128:0   Control change          0, controller 16, value 1
128:0   Control change          0, controller 17, value 72
128:0   Pitch bend              0, value -134
however

Code: Select all

~ ❯ amidi -l                                                                                                 
Dir Device    Name
IO  hw:2,0,0  Launchpad Pro MK3 LPProMK3 MIDI
IO  hw:2,0,1  Launchpad Pro MK3 LPProMK3 DIN
IO  hw:2,0,2  Launchpad Pro MK3 LPProMK3 DAW
seems to not find the device as well as Bitwig does, in which i need to register the device in order to use it. actually bitwig shows me the very same devices as

Code: Select all

amidi -l
does when listing the available midi devices so i suppose i need to get wave into

Code: Select all

amidi -l
somehow but i didn't find any information on that.

so i'm kindly asking if anyone could point me to anything in order to make this work.
twangbarang
Posts: 2
Joined: Tue Apr 26, 2022 5:02 pm

Re: Connecting BT MIDI device in ubuntu

Post by twangbarang »

i somehow managed it. it's not perfect yet but something is happening there:

thats how:

Code: Select all

# create virtual raw midi device

sudo modprobe snd_virmidi midi_devs=1

# find that guy (20 in my case)
aconnect -o                                                    
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'Virtual Raw MIDI 1-0' [type=kernel,card=1]
    0 'VirMIDI 1-0     '
client 128: 'Wave' [type=user,pid=653]
    0 'Wave Bluetooth  '
    
# and connect the wave device to the virtual device respecting sender receiver
aconnect 128:0 20:0
afterwards it's possible to select the virtual device in my daw and get the actual data from the wave device
audio-dsp
Posts: 1
Joined: Tue Nov 14, 2023 8:01 pm

Re: Connecting BT MIDI device in ubuntu here XKey Air

Post by audio-dsp »

Dear twangbarang,

thank you very much. I was able to connect my CME XKey Air with Bitwig by your method. (Ubuntu (xubuntu) 22.04.3). It is still necessary to recompile BlueZ. This solution (viewtopic.php?t=23610&start=15) will only work for special USB WIDI Sticks.

To do the same:

1) Follow the instruction from here (It looks scarier than it is)

https://tttapa.github.io/Pages/Ubuntu/S ... BlueZ.html

If you want to use the latest BlueZ go to http://www.bluez.org/download/ and change the number (5.50) in the script accordingly (I did it with 5.63, never use cutting edge (5.66 in Nov2023) if in doubt :) )

if you get an error in this step ./configure --enable-midi --with-systemdsystemunitdir=/etc/systemd/system
(for me it was rst2man was missing) you have to install this package.

sudo apt -y install python3-docutils

and do the configure step again

2) Restart your computer
3) Follow the instruction in this thread

Hope this will work for you too
Best
audio-dsp

Last edited by audio-dsp on Tue Nov 14, 2023 8:19 pm, edited 1 time in total.
User avatar
Linuxmusician01
Established Member
Posts: 1547
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 784 times
Been thanked: 144 times

Re: Connecting BT MIDI device in ubuntu

Post by Linuxmusician01 »

@audio-dsp: Welcome to the forums. FYI: the page you referred to is for Ubuntu 16 which is from 2016 and has long since been deprecated for newer Ubuntu versions. I tried Bluetooth Midi once and it worked out of the box. AFAIK no need to update Bluez (which is ver. 5.53 on my old Ubuntu distro).

Post Reply