This guide is written for all owners of a Behringer X32 or Midas M32 with a X-USB 32x32 channel expansion card. It is directed towards splitting the X-USB channels up in virtual outputs on Ubuntu 18.04 with PulseAudio. The guide may also work for other versions or distro's of Linux with PulseAudio.
It is assumed that the X-USB is installed and connected to a computer. And automatically recognized as a multi-channel soundcard by the operating system. Also note that on Ubuntu 18.04, PulseAudio runs on top of ALSA. ALSA picks up the soundcard and PulseAudio then uses the full soundcard through ALSA to create virtual channels.
Table of contents
- Find X-USB device name
- Create virtual outputs in PulseAudio
- Restart PulseAudio
- Control application channel
The following sources were used to create this guide:
- https://askubuntu.com/questions/773864/how-do-i-split-my-usb-sound-card-recognized-as-5-1-into-3-stereo-channels
- https://wiki.archlinux.org/index.php/PulseAudio/Examples#Splitting_7.1_into_5.1.2B2.0
- https://askubuntu.com/questions/15223/how-can-i-restart-pulseaudio-without-having-to-logout
First you need to get the device name of your X-USB soundcard. Open a terminal window and run pacmd list-sinks
. The device name should look something like this: alsa_output.usb-BEHRINGER_X-USB_xxyyxxyy-00.multichannel-output
.
Now open the configuration file of PulseAudio, usually located at /etc/pulse/default.pa
, as the root user. At the bottom of the configuration file add and adjust one of the examples below.
Stereo channels: this example uses the first four channels of the multi-channel soundcard to create two virtual stereo output pairs:
load-module module-remap-sink sink_name=XUSB12 sink_properties="device.description='X-USB channel 1+2'" remix=no master=alsa_output.usb-BEHRINGER_X-USB_xxyyxxyy-00.multichannel-output channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=XUSB34 sink_properties="device.description='X-USB channel 3+4'" remix=no master=alsa_output.usb-BEHRINGER_X-USB_xxyyxxyy-00.multichannel-output channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right
Mono channels: this example uses the first two channels of the multi-channel soundcard to create two virtual mono outputs:
load-module module-remap-sink sink_name=XUSB1 sink_properties="device.description='X-USB channel 1'" remix=no master=alsa_output.usb-BEHRINGER_X-USB_xxyyxxyy-00.multichannel-output channels=1 master_channel_map=front-left channel_map=front-left
load-module module-remap-sink sink_name=XUSB2 sink_properties="device.description='X-USB channel 2'" remix=no master=alsa_output.usb-BEHRINGER_X-USB_xxyyxxyy-00.multichannel-output channels=1 master_channel_map=front-right channel_map=front-left
- Create a unique name for the virtual output under
sink_name=XUSBxyz
- Create a friendly name for the virtual output under
sink_properties="device.description='X-USB channel xyz'"
- Add the device name under
master=alsa_output.usb-BEHRINGER_X-USB_xxyyxxyy-00.multichannel-output
- Specify amount of channels to create under
channels=2
- Address the channel names of the multi-channel soundcard under
master_channel_map=xyz,xyz
- Address the channel names to represent on the virtual output under
channel_map=front-left,front-right
Note that you must address (master_channel_map
) the names of the channels of the multi-channel soundcard you want to used. As well as the names of channels you want them to represent them on the virtual output (channel_map
). For the virtual output you almost always want to start with the first channel every time. Use these names corresponding to the channel numbers:
# | Name | # | Name | # | Name | # | Name |
---|---|---|---|---|---|---|---|
Channel 1 | front-left |
Channel 9 | aux0 |
Channel 17 | aux8 |
Channel 25 | aux16 |
Channel 2 | front-right |
Channel 10 | aux1 |
Channel 18 | aux9 |
Channel 26 | aux17 |
Channel 3 | rear-left |
Channel 11 | aux2 |
Channel 19 | aux10 |
Channel 27 | aux18 |
Channel 4 | rear-right |
Channel 12 | aux3 |
Channel 20 | aux11 |
Channel 28 | aux19 |
Channel 5 | front-center |
Channel 13 | aux4 |
Channel 21 | aux12 |
Channel 29 | aux20 |
Channel 6 | lfe |
Channel 14 | aux5 |
Channel 22 | aux13 |
Channel 30 | aux21 |
Channel 7 | side-left |
Channel 15 | aux6 |
Channel 23 | aux14 |
Channel 31 | aux22 |
Channel 8 | side-right |
Channel 16 | aux7 |
Channel 24 | aux15 |
Channel 32 | aux23 |
Save the file when done adding the lines for the virtual outputs.
To restart PulseAudio without having to restart the computer run the following commands:
pulseaudio -k
pulseaudio -D
Use PulseAudio Volume Control to easily control which application sends audio to which output. In the playback tab of the control panel you can select the virtual output per application.
Install PulseAudio Volume Control with the following command:
sudo apt-get install pavucontrol
Thanks for this guide, works perfectly fine on my Arch machine!!!