Akai LPD8 mapping - 4 decks, 30 hotcues, loops, etc. (v2)

UPDATED (v2): bug fixes - should fix the sticking reverse play thing and a few other buggy things that were happening with version 1 of this mapping.



I’ve put together this mapping for the Akai LPD8. It’s intended to be used as a supplementary controller in addition to a standard DJ controller, to give access to sampler decks, lots of hotcues, loop controls, etc. But it’s got transport controls on it too, etc. so it could be used as a standalone controller if you don’t have anything better. My plan is to use two of them in addition to a dj controller to give access to shitloads of decks, hotcues, functions and loop controls in a variety of configurations. I’ll probably make another specialized mapping for myself with more scripted special functions eventually since I don’t really need the transport controls on the main decks at least, but I put them on this mapping to make it more general purpose.

LED indicators for active loops, hotcues, etc.

The LPD8 has 4 presets, each of which has 8 knobs and 8 PAD buttons, 8 CC buttons and 8 PROG CHNG buttons. I’ve mapped each preset to control a deck - Preset 1 controls Channel 1, Preset 2 controls Channel 2, Preset 3 controls Sampler 1 and Preset 4 controls Sampler 2.

For each deck, PAD buttons 1-6 and 8 control hotcues, and there’s a beatjump function mapped to button 7. CC buttons control looping, with the same beatjump function on button 7. PROG CHNG buttons control stuff like play, cue, PFL, rewind, fast forward, reverse, mute, etc. PAD and CC buttons light up to show which loops and hotcues are activated.

IMPORTANT: The default settings on the LPD8 (at least the one I’ve got) maps some of the knobs to midi CC numbers that conflict with the CC buttons. If you want to use this mapping, use the Akai configuration software to remap the knobs on each preset to CC#s 101 (knob 1) through 108 (knob 8) - do this 4 times, once for each preset on the LPDB - all knobs on all channels should output these new #'s.

I have attached a zip file containing the saved preset settings - you can send them to your LPD8 using the Akai lpd8 config program, which you can download from akaipro.com/lpd8

Each preset on the LPD8 controls a deck. Preset 1 on the LPD8 controls Channel 1, Preset 2 controls Channel 2, Preset 3 controls Sampler 1 and Preset 4 controls Sampler 2.

Each deck has the following controls:

Knob 1: deck volume (soft takeover)
Knob 2: crossfader (soft takeover)
Knob 3: Headphone volume
Knob 4: Headphone Mix
Knob 5: Pitch (soft takeover)

Knobs 6 through 8 have special functions.

Knob 6: BEATJUMP DISTANCE - how far back to jump when the beatjump button is pressed. Minimum is about 1/4 beat, maximum is about 8 beats.

Knob 7: HOTCUE BANK SELECTOR - Select which “bank” of hotcues is active on the PAD buttons (30 hotcues are accessible, in 5 banks. Set the knob to minimum to show bank 1, maximum to show bank 5.) Buttons 1-5 should light up when the knob is turned to show which bank you’re on.

Knob 8: LOOP LENGTH - Hold down CC buttons 1-4 or 8 and turn this knob to shrink or grow the active loop. Minimum is a .125 beat loop, max is 8 beats.

Buttons 1-6: HOTCUES - Use knob 7 to select which bank of hotcues are active - 30 hotcues are available in 5 banks. The buttons should light up to show which hotcues are set.

Button 7: BEATJUMP - hit this button to jump back in the song. Knob 6 sets the distance you’ll jump back.

Button 8: CLEAR HOTCUE - hold this button down and press any hotcue button to clear that hotcue.

Button 1: 1 beat loop
Button 2: 2 beat loop
Button 3: 4 beat loop
Button 4: 8 beat loop
Button 5: Loop halve - halve the length of the active loop
Button 6: Loop double - double the length of the active loop
Button 7: BEATJUMP - hit this button to jump back in the song. Knob 6 sets the distance you’ll jump back.
Button 8: Reloop/exit

Hold down button 1, 2, 3, 4, or 8 and turn knob 8 to shrink or grow the active loop.

Hold down button 1, 2, 3, 4, or 8 while pressing Loop Halve or Loop Double to move the loop backwards or forwards by a few milliseconds per press.

Button 1: Play
Button 2: Cue
Button 3: Beatsync
Button 4: PFL
Button 5: toggle reverse play
Button 6: toggle mute
Button 7: toggle rewind
Button 8: toggle fast forward

Please let me know if you find any bugs in this thing, it’s my first attempt at this… I ran across some weird buggy behaviour around some of the LED lighting functions (particularly when turning the hotcue bank selector knob - the LPD8 LEDs stopped responding, but the buttons keep working… I had to stop mixxx, unplug and replug the LPD8, and set it back to preset 1 (I think it was being sent some signal that froze it up - every time I replugged it, it would be on preset 4 even if that wasn’t where I was when it froze. I added a function that checks that the midi data sent to the LPD8 is a valid LED address, and I think that fixed it…)) I think I’ve worked around that stuff, but let me know if you have any issues. Seems to be working pretty well for me now, but your mileage may vary.

PS: Thanks to the MIXXX developers for a great piece of software.

Make sure you’ve remapped the knob midi #'s for each preset on the LPD8 to #101-108 using the Akai configuration software. The default settings conflict with some of the CC buttons, so I remapped my knobs. If you don’t remap to the same numbers on each preset, your knobs won’t work.

I couldn’t get the PROG CHNG buttons to light up. If anyone happens to figure out how to do that, please let me know.

Here are some working notes I used while making this thing. If you’re having trouble getting the mapping to work, you might want to check this to see if your LPD8 is set to output the same midi #'s as mine.

Developed on Mixxx 1.10.1, also tested and works on 1.11 Beta2
LPD8v2.zip (7.35 KB)
LPD8_presets-Akai_config_program.zip (1.26 KB)


Added to the 1.11.0 release branch.

Updated - v2 - some bug fixes. Should prevent the “sticky” reverse play thing that was happening, and a few other minor buggy things.

Another minor bugfix update.

I’m not using the LPD8 in Mixxx anymore, so probably won’t be updating this controller mapping with any new functionality, or updating it for new versions of Mixxx after 1.11. If anyone wants to take it over or tweak it, feel free to do that. I’ll fix bugs though, if you come across any please let me know.

Added your updates to the 1.11.0 branch. Thanks!

the job you have done to the this thread is absolutely fantastic, of course i have been through every single line of your posts, xml and scripts.

For the record, the first thing i did after buying the LPD8 was to load your presets with the akai program for windows…

It really means a lot to me you took the time to reply…

I have tried to manipulate your scripts but for some reason what i am trying to do seems to be messing up things.

(In order to avoid misunderstandings i will refer to the square pads as buttons from now on)

It would be ideal for me to get program 1 to be able to control play/stop both decks.

For doing that i figured i could use the buttons in pad mode for deck 1 and the buttons in cc (or program change) mode for deck 2.

I have not been able to do that. I may try to modify your script but first i have to try and find my way through it (what does what and why)…

The main problem i have is that i find a bit awkward switching between the programs for controlling each deck (press PROGRAM button > select program > hit PAD or CC or PROGRAM CHANGE).

One other solution i am thinking of is to assign a knob for switching between the 4 programs.

That would be equally good for me.

I have two LPD8s - I’m not using them for mixxx much anymore because I’ve got other controllers, but when I was using them, I would have one on each side of my DJ controller, left one controlled deck 1, right one controlled deck 2.

But yeah, it is a bit of a pain to switch presets on the LPD8.

What controls do you want to have access to on both decks from one preset?

right now the pad buttons control hotcues, the cc buttons control loops, and the prog chng buttons control various things like play, cue, ff, rewind, beatsync and PFL. All the buttons are taken right now. You could remap buttons to other functions if you want though, or maybe remap preset 4 to do the stuff you’re thinking of, that way presets 1-3 will still offer all the looping and hotcue controls in case you need them…

Assigning a knob to change decks is a great idea. Wouldn’t be too hard to do - look at the hotcue knob function (LPD8RK.hotcueBankDial) for some insight on how to translate the knob value into a deck number and light indicator LEDs.

This was the first mapping I wrote for Mixxx - in my later mappings I use a curDeck variable that makes it really easy to switch decks. In the LPD8 mapping, I hard coded the deck number into the XML file, and then all functions receive a “group” parameter which is used to decide what Mixxx group (ie: deck) to apply the function to.

If you wanted to tweak the mapping to switch decks via a knob, that wouldn’t be very hard - implement the knob function first, based on the hotcuebankknob function, get it to light indicator lights so you can see what deck you’re set to, and then have it set a global variable LPD8RK.curDeck. That curDeck variable could have values like “[Channel1]”, “[Channel2]”, “[Channel3]”, “[Channel4]” (up to Channel8 works, maybe higher) or “[Sampler1]” and up. Basically, your function could take the 0-127 midi value, translate that into a smaller range of rounded integers, and then use the integer as a key to pick out the deck name string from an array, storing that string in the curdeck variable. When deck1 is selected, you could light button 1 for a moment as an indicator, deck2-button2, and so on.

These days I generally make my mappings control Channel1 through Channel8. I don’t use samplers anymore really, since you can’t scratch them, and they’re otherwise pretty much the same as regular decks.

Then, you’d have to go through the script function by function. Wherever a function uses the “group” parameter passed to it by Mixxx, replace the variable “group” with the variable LPD8RK.curDeck

Don’t forget to set a default value for LPD8RK.curDeck near the top of the script - like: LPD8RK.curDeck="[Channel1]";

You wouldn’t really have to edit the XML file much, I don’t think, since I think all the controls are mapped through scripts, not directly in the xml. …except you’d have to reassign one of the knobs to be your deck select knob. Knob1 or Knob2 - The ones currently assigned to “volume” (LPD8RK.softVolume) or “crossfader” (LPD8RK.softXfade) would be a pretty good bet. Note that the knobs are all assigned 4 times - once for each preset.

If you do this, upload your file here if you like. If you manage to do this, it would free up all the other LPD8 presets for other stuff, assuming it works, we can replace my version with your tweaked version. Good luck, feel free to ask if you have any more questions. It should be a pretty easy tweak.

Seems there’s some fighting with the xml and the scripts waiting for me…

I’ll give it a go and let you know what happens…

I have one question though, how can i set checkpoints (like the way you use the print command in your scripts), and view the output?

Is it like a logfile or a window message? That would be really helpfull…

Run Mixxx from the command line with the --controllerDebug flag. Output from the print statements is sent to the command line terminal window, and will appear in amongst the controller debug messages.

Incidentally, if you want to enable the debug statements in my script, set LPD8RK.debug=true; at the top of the script.

This is great, can’t wait till i start messing around with it… (probably wednesday or the weekend)…

If i do manage to get somewhere (well, with you on my side i believe i will handle it), i would consider it a fork to your version and not an update (like RKblue or something)…

But, there is much to do and a hill to climb before i get there, we’ll see… :slight_smile:

Hey I was wondering… could you explain HOW you fixed the hotcues etc. problem? Your mappings really great and I love the whole hotcue bank feature (that’s truly astounding! :slight_smile: ) but the mapping’s not suited to my style… hate to sound like an arrogant spoiled prick, and I absolutely HATE to be a bother, but… it would mean lot… (I have no programming skills except in Nyquist so a step by step would be perfect. I understand if you don’t want to though… please explain the general gist tho…)

It was a while ago, but I think the problem with the reverse play thing was that the way certain mixxx controls work, you have to set them on and then make sure you turn them off – ie: setValue([whatever], 0) – the controls don’t automatically turn themselves off when logic dictates that they should - ie: if you hit reverse play, then play without turning off reverse play, then reverse play stays set in an “on” state. Same with fast forward, rewind, etc.

So, the fix was making sure that the controls were set off at the appropriate times - for example, when “play” is activated, the script turns off reverse play, rewind, fast forward, etc. I did this manually in the script, not sure how you’d do it in a mapping created with midi learn.

I also made the reverse play, etc. buttons “toggle”, so if you hit the button once, it toggles the on state. If you hit it again, it toggles the off state. So, if it gets stuck for some unpredicted reason, you can toggle it on and then off and that should fix the stickiness - again, I did this with script. But I think there’s a toggle setting in the midi xml file, not sure if it’s accessible from the midi learn function though.

Oh a release issue okay thanks. I think I know some people who could code this for me now that I get what I’m looking for. Thanks a ton!