MIDI Mapping for Pioneer DDJ-SB


Currently there are two versions of Mixxx available for you to play with:

  • v1.11 which is the stable version
  • v1.12 which is in beta and has a ton more cool features

I highly recommend you download the beta version and switch to that one as it is the only one that actually implements ALL of the features available on the DDJ-SB. To give an example, v1.11 did not have FX so the FX knobs, the filter knob and the crossfade filter won’t work as intended in that version.

I’ve been testing with the beta version and imho it is stable. A real joy to work with. Some people on Windows report problems with headphone cue’ing but it does not always seem to be the case.

So unless you don’t want to play with the beta, use v1.12 with the matching mapping files found in this thread or here:
raw.githubusercontent.com/mixxx … scripts.js
raw.githubusercontent.com/mixxx … B.midi.xml
raw.githubusercontent.com/mixxx … scripts.js

If you need to stick to v1.11 for some reason (you have older hardware or an older OS) use the files found here:
raw.githubusercontent.com/wingc … scripts.js
raw.githubusercontent.com/wingc … B.midi.xml

If you try one version, then another or when you are replacing files from another version, be sure to replace them in the the system directory as well as the home directory (more info in this thread) and reload the mapping. If things still don’t work, reboot Mixxx or eventually reboot your computer. I don’t know why but people have reported this to be an issue sometimes (people on Windows)

The documentation of the mapping can be found on those pages and in this thread (mixxx.org/forums/viewtopic.php?p=25304#p25304)

If you have any questions/problems or comments, feel free to ask…


Pioneer-DDJ-SB.midi.xml (66.3 KB)
common-controller-scripts.js (14.8 KB)
Pioneer-DDJ-SB-scripts.js (34.3 KB)

Very cool man! I’m very glad to see someone is making good use of some the code I’ve written, and I can see you’ve put in a fair huge effort here :smiley: I know it’s no joke reading someone else’s code, so well done!

By the way, I believe filters are coming in Mixxx v1.12.0. I guess we’ll both have to go and have a look at how they work when that’s released. You can get hold of the alpha builds here: http://downloads.mixxx.org/builds/master. I’m not sure how much of my original mapping works with it though (I believe the scratching ended up being way too sensitive last time I tried it, but that would have been a while back and things could have changed).

I really need to get back an update the mapping on the DDJ-SR side soon; life’s been getting in the way of my mini-hobby projects like this I’m afraid. All the best of luck with this!

I am running Mixxx on Linux Mint and I am trying to use a Pioneer DDJ-SB but have not had any success getting it to work. I have downloaded the files and saved them to /usr/share/mixxx/midi because there were some other mapping files there and I did not see a controller folder. I am not having any luck connecting to the controller. Can any help?


Are you running Mixxx v1.11?

My Ubuntu had the v1.10 version in the standard repository. The fact that you have a midi folder instead of a controller folder also points to you running a v1.10 version. The script is using stuff that is v1.11 only… check that first. I’ll help you out further if that is not the case.

PS: You will probably also run into this: if you find your volume controls are not working -> you need to change the settings so the soundcard is set to your ddj-sb instead of your internal (pc) soundcard. Would have saved me alot of time figuring out wtf was wrong with the volume :wink:

@hrudham: your code has been a real help m8, thank you for that… it gave me a very good starting point!

I’ve cleaned up your xml file (very necessary in your version because it has ALOT of double/triple/quadrupple entries in it’s current form and that’s very annoying) and i’ve also fixed these bugs:

  • The performance pad leds: you were working with an enum that was bigger then the number of buttons you have (6 in your case). The led feedback is a “1 to 1 mapping”. If you have only 6 buttons and you save the state in an enum of 8, your system will have trouble knowing which is which unless you read the xml and query which ones you’ve mapped. I’ve not found a consistent generic way that’s correct in ALL cases but changing mappings will require some work, always

  • The jogwheel sensitity problem: i don’t know if it’s just a typo or if this stuff works on your machine but not on mine but i’ve found that, in the script that is offered on github, the enums are referred incorrectly… You are retrieving indexes instead of the values that are found at these indexes. Since there are number behind the indexes as well, it looks like it works but it gets completely different values… hence the sensitivity problem. I think. I found this really weird because it looks like something you would have noticed yourself… but still, i had good results when I changed the way i referenced the enum.

The thing I skipped was your timer function… but i think i get it now why it was there :slight_smile: Just haven’t needed it yet.

That said: i will release an updated version within a few weeks and I might take a look at the alpha build then too. I’ve run into a few things I would like to see like other beatloop intervals, deleting loops completely and maybe make a pregain function out of the filtering “wheelbuttons”… unless of course we can assign real filtering to them. I’ll decide that later :wink:

But it’s usable now and I’m enjoying mixxxing with it a bit first :smiley:

How well does this work for 1.12 beta? It would be great to have a DDJ-SB mapping included in 1.12.

Uhmmm, I only figured out now, that even though I created this post, I still need to subscribe to it to get notifications :confused:

I’ll try to look into v1.12 next week… got a few days of then. Been too busy using the existing one :wink:

**EDIT: No sorry, can’t do. I’m on 12.04 and appearently only 14.04 and up is supported. I’ve heard reports from people that have no sound on the ddj-sb in 14.04 and moreover the machine this is running on, is too critical to upgrade right now. Don’t feel like upgrading and spending days while everything still does what I want it to do.

That said, I’ve changed a thing or two to the mapping.
Some initialization stuff and I’ve mapped the filter knobs to be used as pregain… can come in handy.

Next thing I want to look into is the jogwheel sensitivity. It’s not really bad but still I find that in Serato I can “grab” a beat more precisely. I want that.
Other stuff will only be added as I start needing it…

Or you can always ask to implement something (i probably don’t know the use for it yet)

Pioneer-DDJ-SB-scripts.js (10.2 KB)
Pioneer-DDJ-SB.midi.xml (16.5 KB)


thanks for your work, wingcom, I was very glad to find a working mapping for the DDJ-SB.

I started making small improvements on your mapping and ended up with a mapping that implements all features of the controller and some more :slight_smile: It definitely works better than in Serato DJ Intro (I didn’t try the full version as I don’t have it).

I tried the current version only with the git master of Mixxx, I still have to test version 1.12 but I’m confident it will work well there, too. I guess most features will work with 1.11, but I have not tested it.

What is done:

  • All basic controls, including library browsing, the features not available in Serato DJ Intro, filtering, slipping, etc. Some features that are not labeled on the controller, like pregain control and kill switches, are implemented too.
  • Effects.
  • Jog wheels, including touch sensitive scratching in vinyl mode.
  • 4 decks (switch decks with the tempo range buttons).
  • Makes use of 14 bit resolution where available (actually the controller has a lower resolution, somewhere between 8 and 9 bit).

You can download the two files under these URL:
raw.githubusercontent.com/jardi … scripts.js
raw.githubusercontent.com/jardi … B.midi.xml

Or see the whole repository at github.com/jardiacaj/mixxx

I intend to test the mapping a bit more the next days, maybe make the code a bit nicer too (it has become looong) and write some documentation for it.

Feedback would be very appreciated, it would be great if other DDJ-SB users can test it!


wow VERY cool jardiacaj!

I really felt like I needed to work on this some more but I was happy just dj’ing instead of coding :stuck_out_tongue:
Coding is work, dj’ing is relaxation :wink:

And now someone magically did all the work for me.
The community works :slight_smile: Super!
You even have Filtering and Effects implemented. Very nice!

I’m gonna install your mapping tonight and will start using it from then on.
I will report back with feedback as soon as I’ve tested the basics and will report issues on the github issues-system

Thank you very much for your work m8

I had a chance to play with a DDJ-SB last night and tested the mapping. I noticed two issues that should be easy to fix. The sync button uses the old beatsync control. Change it to use the new sync_enabled to take advantage of master sync. Also, shift+hotcue activated hotcues 11-15 rather than 5-8 (on the left deck; I didn’t test that on the right deck).

The filter crossfade is interesting. I’m going to map my Electrix Tweaker to do that and play around with it.

Is the sync_enabled a v1.12 thing?
I didn’t know it was there… searched for it before though, weird.

This will make my life easier and my experience with Mixxx even better :wink:

Yes, sync_enabled is new in 1.12.

mixxx.org/manual/1.12/chapters/d … aster-sync


I also checked “what’s new in v1.12” … so many cool features!
So now I need to move to 1.12

I hope I can get it working on my current linux version :-/

Thanks for trying out the mapping, Be. I just fixed some issues (including the hotcues bug) and will use sync_enabled instead, I didn’t know this feature was there!

The filter crossfade on the DDJ-SB is implemented by the controller (it sends the filter messages when moving the crossfader when filter fade is on) so it was cool to see it “just work” without any additional mapping to do.

@wingcom, once I tried 1.12 I never wanted to go back! :slight_smile:

Nice, I’m glad to see this moving along. :slight_smile:

Oh that’s interesting. Any fader could be mapped to do it with JavaScript though.

This is kinda a matter of personal taste, but I find blinking LEDs annoying and distracting. You could add a boolean variable defined at the top of the script so users could toggle that on and off easily by editing the script. See the Electrix Tweaker script for an example. See also Bug 1470278.

Also, the jog wheels didn’t do anything while a deck is playing.

I’m wondering why wouldn’t the jog wheels work. I just tested on 1.12 and everything seems to work fine. Will you be able to test the mapping again and see what the logs say? Any errors, or what messages are being sent by the controller?

I’m also wondering why I get this message in the log whenever the mapping reloads after editing the js file:

Warning [Controller]: ControllerEngine::slotValueChanged() Shouldn’t happen – sender == NULL

I guess something is not shutting down properly, but I don’t see what. The controller keeps working normally after reload.

I don’t know if I’ll have access to it again. I’m not sure what that warning is.

I can’t fully switch since v1.12 won’t install on Ubuntu 12.04 (just given it a try) and that system (standup desk) is to critical to be updated right now.
I’m saving for a laptop but untill then I can have a few test sessions on Windows 7

I’ve given it a quick test and most things seem to work.

  • I can confirm that the jogwheels act differently as in my setup. There is no visible or audible difference between Vinyl mode and Normal mode. You can only fast forward using the jogwheel when it’s playing. Maybe this is wanted. But I think my original mapping was closer to Serato’s. So it is doing “something” but I can’t seem to scratch right now… Not that I am a scratcher :smiley:

Everything else in the mapping seems to be ok for now…

I have noticed a few things in Mixxx though:

  • My headphone pre-queuing is not working properly. Headphone plays only what is being outputed on MAIN. My audio setup is set to channels 1-2 for main and channels 3-4 for headphones. If I press the cue button I can see it is mapped right, cus it is turned on in the UI but nothing happens. I need to move the slider so the channel is outputted in main and then it is outputting on the headphones too. Tried several settings but I can’t seem to fix this
  • I ve had crashes of the waveforms where it would show a white areas. If I minimized Mixxx and maximized it afterwards, the white area was gone but replaced with just black, no waveform showing.
  • First two songs I tried were beatmatched wrong (I gotta admit that these are tracks that are appearently hard to beat match, Serato has troubles with those too… only djay2 on iPad seems to be matching them correctly, but I had to try)
  • I also had two crashes switchin to the “Deere” skin

Gotta do some other stuff now but I’ll dig deeper into it later

PS: I know the blinking light is also there in Serato but I’m not a big fan of it either. An option to disable it would be great :wink:

Couldn’t stop testing yet, too exited about the new version :slight_smile:

Great news: Mixxx v1.12 DOES work on Ubuntu 12.04 but your only way of installing is through the mixxx-beta ppa. Absolutely no problem with that. Just a bit of inaccurate information on the beta thread which states that you need 14.04 and up… That’s why I only tried compiling, I thought that would give me my best shot.

So great… i can really test now :wink:

On the other hand I find it very strange that your ( jardiacaj ) mapping is not working on my Ubuntu machine. In debug mode it continuously states “No Function” and the UI is not responding to my controller requests. It has to be something stupid because it worked in Windows 7 but not in linux. Will investigate, but this is really odd behavior… ive seen it work ffs :-/

Edit: the headphone/master playback IS working on Ubuntu, seems to be Windows 7 only issue

Problem solved. It was because my old script file was still in the ~/.mixxx folder
I deleted those files and then Mixxx takes the newer version of the .js from the /usr/share/mixxx folder
Nothing worked because almost everything is scripted now and the wrong script was loaded

Now I’m really gonna do some other work first :smiley: