Newbie here trying to set up MIDI keyboard controller in Ardour. I’m working on a Debian 12 with Pipewire:
PulseAudio (on PipeWire 0.3.65)
When I select ALSA after configuring Audio/MIDI Setup option I can see MIDI keyboard option when configuring a MIDI Track. Ardour is able to catch activity but I cannot hear anything. When I check qpwgraph no Ardour box is there. Ardour logs show the following message:
2023-05-14T17:02:23 [ERROR]: AlsaSeqMidiIO: Device initialization failed.
2023-05-14T17:02:23 [WARNING]: AlsaMidiIn: failed to open midi device '144:0'.
I’ve tried the same using Pulseaudio instead. But no MIDI keyboard is found. However, when checking qpwgraph this time Ardour box exists, only a few ports though (nothing to do with the number of ports that I have seen in other images). And of course now I can hear sound coming from Ardour.
Lots of details to cover, so I will try to go one at a time.
Usually ALSA is the easiest and least trouble backend to use, however there are some relevant details you did not add initially that are relevant to the audio setup.
It appears from your included picture of the Pipewire graph at the end of your post that you are using Bluetooth headphones as your audio device. Ardour does not support Bluetooth devices, so that would explain why you cannot hear anything. To use Bluetooth headphones you will have to use Pipewire, which for Ardour means making sure pipewire-jack is installed (may have a slightly different name depending on your distribution) and using the JACK backend for the Ardour audio connection.
What audio device did you configure when you configured your USB keyboard as the MIDI source? My first suspicion would be that you chose some audio device built in to the motherboard, which may have meant that the audio was being sent to a headphone jack which you were not using.
These two messages seem to imply opposite things:
Meaning you are able to record MIDI notes in an Ardour MIDI track?
That seems surprising if these messages refer to the MIDI interface you are attempting to use:
If device initialization failed it seems that Ardour would not have been able to record MIDI data (assuming that is what you meant by “catch activity”).
Pipewire does support MIDI, so when you verify that pipewire-jack is installed and use the JACK backend of Ardour you will use pipewire for routing the MIDI data as well as audio data.
The pipewire graph shown in your post indicates that the Bose headphones are connected as mono. Bluetooth also adds additional latency in the audio path, so is not ideal for monitoring music production. The mono connection can probably be fixed (i.e. connected as stereo) with a change to the bluetooth connection settings, but the additional latency is inherent to the way bluetooth headphones work. It may or may not bother you for what you are trying to do, just something to be aware of.
OK, that is good, it confirms you are using the correct audio device.
That is the output device of Pipewire. Since you are using the ALSA backend for Ardour, Ardour requested exclusive use of the audio device, so Pipewire creates a dummy device to use for routing while Ardour is using the physical audio interface.
When using the ALSA backend there is no utility to looking at anything in Pipewire, it is not relevant at all.
When using the ALSA backend you should use the Ardour monitor section to control volume (assuming you are not using some external device with level control, such as an external audio interface with headphone level control).
If using pipewire-jack as a JACK audio server then Ardour should be able to use the JACK API for routing audio and MIDI, but you have to configure Pipewire to use the audio devices you want first.
But Ardour should load in a reasonable amount of time, whether the device is configured as you want or not Ardour should still connect to Pipewire JACK server and begin running.
What is your goal in using pipewire-jack? Are you trying to get Bluetooth headphones working again? Or do you need to application-to-application routing capabilities?
It’s recommendable to use Pulseaudio instead of Pipewire, Pipewire is an ingenious project, but is to early to use it as a main audio backend, because it is not 100% stable and vast majority of Linux audio software is not coded to work flawlessly with it.
You have the Linux audio systems quite mixed up, I’m afraid.
ALSA and JACK are the two systems currently recommended for audio production in Linux.
Pulseaudio is a fallback, only intended to being used for mixdown and, more or less, only if you for some reason can’t use one of the aforementioned.
PipeWire is a work-in-progress which currently works well for some workflows and less well for others.
Actually I just wanted to make it work so that I could start using Ardour, with not specific goal. Really helpful all the comments, now I have a much clearer idea of how the pieces are connected. Thank you!
Yeah, you’re right, what I’m trying to explain that with ALSA alone you have many xruns and in JACK-PULSE connection you have less or none, however I see a great future to PIPEWIRE, is a good audio ecosystem. Other thing curlsei can do is to try using ALSA-RAW midi option
Pipewire is by default a lot more forgiving, with a much longer latency (which explains why you have fewer dropouts). Sadly at this point in time it is still quite hard to properly configure it for pro-audio.
If you want to dig deeper, you can compare, the kernel device driver settings.
Open a terminal window and run the following command
cd /tmp && wget https://community.ardour.org/files/adevices.sh && bash ./adevices.sh
It will not modify your system; it lists all soundcards, their current settings and applications using them, etc.
Ooook!, it’s like Alsa have only two cables connected to the soundcard, and Jack, pulse and PW are like virtual mixers and snakes to use more than one device, in this case ASIO is a child compared to these audio servers.