Midi controller not working in Bitwig (Works in WINE though)

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Death
Established Member
Posts: 189
Joined: Sun Oct 11, 2015 1:43 pm

Midi controller not working in Bitwig (Works in WINE though)

Post by Death »

I've tried to setup my midi controller (M-Audio Oxygen 49) via Jack in Bitwig Studio but it doesn't seem to do anything when I press the keys. I normally use FL Studio via WINE where my midi controller works perfectly. So I'd have thought it'd work when using a Linux native DAW, but, apparently not!

Any ideas why?

Cheers.

User avatar
noedig
Established Member
Posts: 148
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by noedig »

Bitwig uses MIDI through ALSA and requires exclusive access to a device, meaning any other programs using ALSA MIDI, including ALSA/JACK bridges, need to be stopped.

See previous posts on this:

viewtopic.php?f=1&t=19707

viewtopic.php?f=4&t=20209

viewtopic.php?f=1&t=19138

Death
Established Member
Posts: 189
Joined: Sun Oct 11, 2015 1:43 pm

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by Death »

Edit: Nevermind. I've decided to get a refund on Bitwig. I wasn't getting along with the program as it was and this issue was the finishing move.

User avatar
noedig
Established Member
Posts: 148
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by noedig »

Sorry to hear.
If you still wanted to debug (you could try with the demo version of Bitwig), you can start by seeing if anything is using your ALSA MIDI device:

Run

Code: Select all

amidi -l
to list MIDI devices.
Run

Code: Select all

amidi -p hw:2,0,0 -d
to dump raw data from your MIDI device, changing "hw:2,0,0" to your desired device.
If the device is not in use by anything else, you should see messages appear when you press keys.
If the device is in use by anything else, you should see an error message like

Code: Select all

ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC2D0 failed: Device or resource busy
cannot open port "hw:2,0,0": Device or resource busy
Try stopping all bridges until this command succeeds. Once it succeeds, nothing else is using your device.
Then, stop the command, restart Bitwig (or whatever), and try again.

User avatar
noedig
Established Member
Posts: 148
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by noedig »

I guess a better way to see if anything is connected to your ALSA MIDI device is to just use

Code: Select all

aconnect --list
A connection looks like

Code: Select all

client 28: 'SAMSON Graphite MF8' [type=kernel,card=3]
    0 'SAMSON Graphite MF8 MIDI 1'
        Connecting To: 129:0[real:0]
        Connected From: 129:0
while no connections look like

Code: Select all

client 28: 'SAMSON Graphite MF8' [type=kernel,card=3]
    0 'SAMSON Graphite MF8 MIDI 1'

Death
Established Member
Posts: 189
Joined: Sun Oct 11, 2015 1:43 pm

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by Death »

Yeh nevermind. I'll go back to FL Studio via WINE for now. One day I'll find my Linux DAW :)

I tried what you said though. I got the message saying the resource is busy even after stopping the midi bridge with Cadence. So then I did

Code: Select all

aconnect --list
which returned this

Code: Select all

client 0: 'System' [type=kernel]
    0 'Timer           '
        Connecting To: 128:0[real:0]
    1 'Announce        '
        Connecting To: 128:0[real:0], 131:0
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
        Connecting To: 129:0[real:1]
        Connected From: 129:0[real:1]
client 24: 'Oxygen 49' [type=kernel,card=2]
    0 'Oxygen 49 MIDI 1'
        Connecting To: 129:0[real:1]
        Connected From: 129:0[real:1]
client 128: 'PipeWire-System' [type=user,pid=2323]
    0 'input           '
        Connected From: 0:1[real:0], 0:0[real:0]
client 129: 'PipeWire-RT-Event' [type=user,pid=2323]
    0 'input           '
        Connecting To: 14:0[real:1], 24:0[real:1]
        Connected From: 14:0[real:1], 24:0[real:1]
[z@z-pc ~]$ 
The Oxygen 49 is my keyboard. So that's connected to 'PipeWire-RT-Event'? I'm not sure what that is but I'm guessing the 'RT' stands for realtime.

Cheers.

User avatar
noedig
Established Member
Posts: 148
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by noedig »

Pipewire is a new audio system under development. I didn't know anyone was using it yet.
Perhaps you can try to stop it. What Linux distro are you using?

Death
Established Member
Posts: 189
Joined: Sun Oct 11, 2015 1:43 pm

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by Death »

Well I just looked at it in my package manager and it's required by xdg-desktop-portal & xdg-desktop-portal-kde. I'm using the KDE version of Manjaro. I guess it's just integrated in my distro version somehow. Thiking about it more, I'd rather not mess with it to be honest because it might open a new tin of problems :/ Every other DAW seems to play well with my setup and I'm not trying Bitwig again anytime soon so it's probably best I just leave it be.

However, there is one thing I wouldn't mind some help with if anyone can.. During the course of running through some of those previously linked forum threads, I'd ran some commands. Now everytime I start my computer, my midi hardware ports are exported by default. Can I reset this change somehow? I'm not sure exactly what did it but I think I may have ran these

Code: Select all

a2j_control ehw start

Code: Select all

killall /usr/bin/a2jmidid
from this thread: viewtopic.php?f=4&t=20209

And this

Code: Select all

a2jmidid --export-hw
from this thread: viewtopic.php?f=1&t=19138

Thanks for the help!

User avatar
noedig
Established Member
Posts: 148
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by noedig »

According to the man page,

Code: Select all

a2j_control dhw
should disable exporting of hardware. However, the daemon will still be running.
To stop it from running, try

Code: Select all

a2j_control stop
and/or

Code: Select all

a2j_control exit
in various combinations and see if the daemon stays down after restart?

I haven't used a2j_control myself.

Death
Established Member
Posts: 189
Joined: Sun Oct 11, 2015 1:43 pm

Re: Midi controller not working in Bitwig (Works in WINE though)

Post by Death »

I had to run those commands a little differently:

Code: Select all

a2j_control
usage: a2j_control [-h] [--start] [--stop] [--exit] [--status] [--gjcn] [--ma2jp MA2JP MA2JP] [--ma2jc MA2JC MA2JC] [--mj2a MJ2A] [--ehw] [--dhw] [--aup] [--dup]

Bridge ALSA MIDI to JACK MIDI

optional arguments:
  -h, --help            show this help message and exit
  --start               Start bridging
  --stop                Stop bridging
  --exit                Exit a2j bridge dbus service
  --status              Display bridging status
  --gjcn, --jack-client-name
                        Get JACK client name
  --ma2jp MA2JP MA2JP   Map ALSA input port to JACK output port (requires ALSA client ID and JACK port ID arguments)
  --ma2jc MA2JC MA2JC   Map ALSA output port to JACK input port (requires ALSA client ID and JACK port ID arguments)
  --mj2a MJ2A           Map JACK port to ALSA port (requires JACK port name)
  --ehw                 Enable export of ALSA hardware ports
  --dhw                 Disable export of ALSA hardware ports
  --aup                 Allow unique port names
  --dup                 Disallow unique port names
but they still didn't work. The ' --dhw ' command didn't actually stop exporting of ALSA hardware ports. I confirmed this by checking Cadence and Patchage. In Patchage, I'll see this for my keyboard:
1.jpg
If in Cadence I choose to disable exporting of hardware ports, I'll then see this in Patchage:
2.jpg
so I can disable it with Cadence. However, I already knew this. The problem is that this gets reset everytime I reboot. This was never the default behaviour of my computer before. I'm not sure if it makes much difference, but I'd prefer to set it back how it was if I can just incase it presents any problems further down the line and also because it wasn't necessary to have things working (If it aint broke, don't fix it, right?).

Thanks again.
You do not have the required permissions to view the files attached to this post.

Post Reply