Hercules P32 DJ controller mapping

No problems so far using those files under Windows and OS X using various audio formats throughout the day…

Great, I updated the files on GitHub to not use the timer.

Just got what looks like the usual hang and stall on OS X playing .m4a files.

Nothing stands out in the log beside the buttons being used, so I’ll try to see if I can get the same results on PC using the same files.

You didn’t see the “Warning [Main]: SHOULDN’T HAPPEN: seekInsideAdjustedLoop couldn’t find a new position – seeking to in point” error? It’s possible you came across an unrelated bug that may or may not have to do with the mapping.

Sorry. Been busy the last few days. Hoping I can get back to this soon.

A handful of updates, all available by downloading the files from GitHub linked on the wiki page.

I have mapped the effects sections. See the wiki page for a description of how it works. Please let me know what you think of the mapping and share any suggestions.

I didn’t think mapping the filter to the encoder labeled “filter” sounded very good because it goes in big steps. It lacked that delicious filtery sound. But now, the filter effect can be loaded in an effect rack and used with the smooth knobs for effects. Use shift + dry/wet to control the superknob like the stepped encoder was mapped before. Considering this, I decided to replace the functionality of the “filter” encoder with something I felt was lacking and more suited to being controlled by a stepped encoder, which is beat jumping. Turn the encoder to jump by a beat (shift + turn still controls pitch/tempo). Press the encoder to adjust how many beats to jump by, as shown on the LED display on the controller. When the encoder is released, the LED display will go back to showing the loop size.

I made the default loop size and beat jump sizes user configurable options that can be easily changed by editing the first few lines of the JS file. Again see the wiki page for details.

I mapped shift + play to stop the deck and jump to the beginning of the track.

Considering I don’t know what else to do with the Slicer mode of the pad grids, I’m thinking of mapping it to control more aspects of the effects, like scrolling through effects and enabling/disabling individual effects. Thoughts? Any other suggestions of what to do with the Slicer mode considering the current features of Mixxx?

Sounds nice. Hopefully I’ll find a bit of time to give that a go soon.

Regarding the Filter encoder, isn’t there a way to “smooth out” the steps (as you would with jogwheels) to make it behave like a standard knob ?

As for Slicer mode…I was stuck at that point in the mapping I had done. More controls is an idea (would need to think of the ergonomics), but than again, not every buttons needs to be mapped to something if there is no relevant functions to be used.

I think that would be possible with a bit of math, but there still wouldn’t be the tactile indication of its position that there is with the effects knobs. Jogwheels are a different matter. They also typically only send relative position information, but they’re much higher resolution. Before I changed the mapping around, I had the filter encoder mapped so that each turn of it would turn the knob on screen by the same angle. If there was some math adjusting the sensitivity of it, the angle of each turn wouldn’t match what’s on screen, which I suspect would be a bit confusing.

I added an option called loopEnabledDot which can be used easily by editing the top of the JS file in a text editor. When this is enabled, the dot on the loop size LED display indicates that a loop is active. Unfortunately, due to limitations of the P32’s firmware, there is no way to set the LED display to show 1 or 64 with a dot, so with this option, loop sizes are restricted to 2-32 beats.

Get a script error when using SHIFT + any of the FX buttons (ON or Macro) on both PC and MAC.
Script_error.PNG

Whoops, forgot to test that since refactoring the code last night. It is fixed with the current script on GitHub.

Unfortunately, seems like that error message it is still there. Crashed last night on MAC before I left the office and and on PC this morning.
Mixxx_crash_N_log(PC)29-04-2016.zip (1.61 MB)
Mixxx_crash_N_log(OSX)28-04-2016.zip (91.6 KB)

I’m at a loss for what’s going on with that error. I’ve reported the bug on Launchpad. Hopefully a developer will be able to figure out what’s going wrong here.

Could you try the script attached to this post? The +/- buttons on screen will stay lit after doubling/halving loops using this.
Hercules-P32-scripts.js (21.3 KB)

I have mapped the sampler pad mode. Press an unlit pad to load the track selected in the library to that sampler. Pads are blue when the sampler is loaded but not playing and red when playing. Press a blue pad to play the sample from its cue point. Press a red pad to jump back to the sample’s cue point. Press a red pad with shift to stop a playing sample. Press a blue pad with shift to eject a sample. Note that samplers are independent from decks; the left grid controls samplers 1-16 and the right grid controls samplers 17-32.

I’ve also refactored the code so a lot of it can be easily reused for other mappings.

Back from the road…and glad the source of the crash was found and the problem is being looked into. I guess you don’t need me to test the script you’ve posted ?

As for the mapping,it’s nice to know that Mixxx can have 32 sampler (or more?), but it seems a little overkill at the moment without a proper GUI to interact with (and so far I only see one skin which seems to include more than 4 sampler decks).

If I may offer a suggestion that would allow to exploit the samplers with any skins:

  • Use one row or column for Play/Stop of the 4 standard sampler deck, while the remaining buttons of the layout for 3 cue points per deck,
  • Use the colors to identify them: Blue/Red for Play/Stop, Purple/None for Cue created or empty);
  • Use the Shift mode for Sync, Loop, etc.
  • As an extra, SHIFT+SAMPLER could be used to show/hide the Sampler section

I’ve been thinking of adding controls to Deere to show up to 32 samplers. I’ve also been thinking of changing how the sample bank selection in Deere works so you could show multiple “banks” at once by clicking the numbers for multiple banks.

I’ve made the mapping assign the samplers on the left pad grid to the left side of the crossfader and the ones on the right to the right of the crossfader. If you don’t want to assign them to the crossfader, set the samplerCrossfaderAssign option at the top of the script to false.

Interesting idea, but there are 8 columns on the controller but only 4 decks in Mixxx.

I’ve mapped manual loop controls on the Loop mode of the pads. From left to right, the pads set the loop in point, set the loop out point, and toggle the loop (without changing its size).

Indeed, so for the time being, the Sampler section on deck B would control the same 4 decks.

Alrighty, I’m getting back to work on this. I just updated the mapping to switch around the shifted/unshifted functionality of the Filter/Move encoder. Now it adjusts tempo without shift and does beat jumping with shift. This allows for adjusting the tempo with one hand while doing something else to the other deck with the other hand. This will be particularly useful with sync lock/master sync enabled on multiple decks.

I tried to do this a while ago, but couldn’t get the numeric LED to change for setting the beatjump size with shift + press + turn. I made Mixxx able to print outgoing MIDI messages for debugging and figured out the issue. The firmware only changes the numeric LED when it’s sent messages on the unshifted channels (2-3), but not the shifted channels (4-5).

I’m still planning on doing something with the slicer pad mode, perhaps adding toggle switches for effects. I’m also planning on reworking the code a lot to make the library’s API easier to use.

I found that I never toggle keylock, I just always leave it on, so I replaced the keylock functionality (shift+cue) with aligning the beatgrid to the current position.