- Rekordbox Dj Linux Free
- Rekordbox Dj Linux Download
- Rekordbox Dj Linux Tutorial
- Rekordbox Dj Linux Software
Table of Contents
About Rekordbox. Pioneer's Rekordbox is one of the top commercial DJ software in the market. Beside preparing and managing your music files for DJ sets, you can play your sets live with your own Pioneer controller. Offical support by Pioneer. Officially there is no Linux support from Pioneer. Rekordbox 6 Until recently (Rekordbox version 6.3.0), Rekordbox 6 had removed the feature to export in xml format - meaning that we could only support going from MIXO to Rekordbox 6 (for Rekordbox 5, both import and export are supported).
Introduction to the Problem
In the previous article, we already got Rekordbox to run with Wine in Linux. But what we really want is to use Rekordbox with our Pioneer DJ controller (e.g. DDJ-SR, DDJ-SX2, etc). The DJ controller is basically a MIDI device and a USB soundcard. We can connect it to our system and it is also detected but we can not control Rekordbox with the controller itself. In this article, we will show how we can solve this problem.
How to detect MIDI controllers in Linux
In linux we can list all connected MIDI devices with the amidi utility. It reads from and writes to ALSA RawMIDI ports. By using amidi -l
we can list all connected MIDI devices.
Also we can see the devices information this way:
Comparing this output with windows, we can see that the appeneded 'MIDI 1' string at the end of the product name is not visible in Windows. But the proper product name is stored somewhere as we can see.
How to detect MIDI Controller in Windows
So how can a Windows application detect or enumerate MIDI devices? There are two handy functions for this:
- midiInGetDevCaps: Retrieves the capabilities of a given MIDI input device and places this information in the
MIDIINCAPS
structure. - midiOutGetDevCaps: Retrieves the capabilities of a given MIDI output device and places this information in the
MIDIOUTCAPS
structure.
The MIDICINCAPS
structure looks like this:
The interesting part for us is szPname
which is the 'Product name in a null-terminated string'. More information can be found here and here.
John Haskey has developed a tiny Windows application ([here[(http://haskey.com/midi/)) which enumartes MIDI devices this way and which we can use to understand how WINE sees our MIDI devices.
Hypothesis
I assume that Rekordbox detects the controller by product name. In Windows it shows up as 'PIONEER DDJ-SR' but in Linux it is 'PIONEER DDJ-SR MIDI 1'. If we can remove the 'MIDI 1' part from the product name, Rekordbox should be able to detect and use the controller again.
Rekordbox Dj Linux Free
Solution
There are two approaches I thought about how to solve this problem. We can either change this naming convention on Linux side so that Linux shows already the right product name from the beginning or we can change how Wine shows the product name in Windows applications.
I did the second approach but I have gathered some information for the first one as well, which I will list here for completeness.
The alsa-lib has some raw MIDI functions which are interesting in this case. snd_rawmidi_info_get_name
gets the rawmidi hardware driver name but there is no equivalent snd_rawmidi_info_set_name
function.
But there are other interesting functions like snd_seq_set_client_name()
and snd_seq_set_client_info()
which may be used to set the name. I was not able to create a working proof of concept for this. Tell me if you are successful!
So let's get to our working solution and the path of how it was found.
Changing MIDI product name in WINE
Our goal is to change what WINE sees as the product name of the MIDI devices so that other Windows applications see the same change.
First we have to get Rekordbox running in Wine. Please check my other article for this.
The we run Rekordbox the following way to get more verbose debug information:
WINEDEBUG=warn+mci,+mcimidi,+mmsys,+winmm,+midi wine rekordbox.exe &> ~/winemidi.log
The following line was particulary interesting which contains the wrong name received from Alsa:
I wandered from midiInGetDevCapsA()
in dlls/winealsa.drv/winmm.c
in the Wine sourcecode to dlls/winealsa.drv/midi.c
. midi.c
was actually the right file where we could solve the problem. I changed some places in ALSA_AddMidiPort()
to change the device name removing the 'MIDI 1' part at the end and added some debug messages to see if it really happened (GitHub).
To verify if this change is visible with Wine in Windows applications, we can test the previously mentioned midienum application:
This was not working at the beginning because it only change the IN devices name but not for the output. Changing the output in a similar way worked and the controller was detected in Rekordbox.
Demin Dmitriy had a better idea and found a cleaner solution. He modified the part where it gets the name and uses the client name instead of the port name:
with
See GitHub for more information.
Play touchgrind bmx online, free. Thanks again Demin! He also created an issue in the Wine bug tracker for this.
I still have the wine-staging
package in ArchLinux installed. To add these changes I downloaded the sourcecode and build Wine as described here. Additionally I build for 32-bit as well (see here) so that I could verify the changes with midienum.exe
but this is not mandatory as Rekordbox is x64.
Rekordbox Dj Linux Download
During compiling you should run make -j10
to run multiple recipies at the same time and speed up the process. When everything is compiled you have to copy two files to the right locations:
Additionally I copied 32-bit version but you don't have to:
If you do not want to compile Wine yourself, you can download those two files here.
Then we run Rekordbox as described in the previous article and voila.
Rekordbox detects the controller
If you have problems with getting the sound through the controller, check with pavucontrol
or your favorite audio tool, if Rekordbox uses the controller devices and that the controller device is chosen in the Rekordbox preferences.
I hope you guys liked this article and have fun using Rekordbox in Linux. Youtube to swf online.
Using the DDJ-SX2 in Linux
Rekordbox Dj Linux Tutorial
Ideas for the future
Rekordbox Dj Linux Software
- Give non-Pioneer controllers a Pioneer product name
- Check what happens, if we use DDJ-200 as product name ;)
- Translate midi commands at input and output to use any controller with Rekordboxaösa