Numark Mixtrack Platinum midi mapping#1855
Conversation
|
Looks like a very comprehensive mapping. No glaring issues popped up during my reading of this code. I would recommend looking at this though: https://www.codefactor.io/repository/github/mixxxdj/mixxx/pull/1855. You can safely ignore the "variable declared not used" warnings imo, but you may want to think about the code duplication issues. Minor nitpick, some mixing of camelCase with under_score, but I don't think this should hold up merge. Has this been tested by others? |
|
Yeah, I got sloppy with the variable naming. My preference is under_score, but Mixxx leans towards CamelCase. I'll look into refactoring some of the duplication, but most of it came from custom implementation of built in mapping classes. I might be able to use inhertiance there. I'll take a look. This has been tested by myself and several others on the Mixxx forum. The only known issue is the previously mentioned soft takeover issue. |
|
Thanks for submitting this @iamcodemaker! And thanks for the review comments @radusuciu. I quickly glanced at the code and it looks neat and tidy. I'll go through the wiki and review the design for this soon, but right now my main focus is on fixing bugs for the 2.2.0 release. If we don't get it all done by the 2.2.0 release it's no big deal because we can easily make point releases. |
|
I removed one instance of duplicate code. The other one is necessary and currently there isn't a better way to share that code without modifying the midi components code. |
|
I think I fixed the soft takeover issue on the EQ knobs. I'll need to test some more to be sure. Also there is another known issue: the first platter touch doesn't activate scratch mode properly for some reason. Things work fine on subsequent touches. |
Be-ing
left a comment
There was a problem hiding this comment.
I haven't read through all the code yet, but here's a start.
| if (engine.getValue(group, key)) { | ||
| midi.sendShortMsg(0x90 | midi_channel, midino, 0x7F); | ||
| } | ||
| else { |
There was a problem hiding this comment.
please put } and else { on the same line
There was a problem hiding this comment.
I'll make a sweep and fix these soon.
| // update duration, time elapsed, and the spinner | ||
| var duration = engine.getValue(group, 'duration'); | ||
| var position = engine.getValue(group, 'playposition'); | ||
| if (duration == 0) position = 0; |
There was a problem hiding this comment.
Always use brackets and multiple lines for if statements:
if (duration === 0) {
position = 0;
}
There was a problem hiding this comment.
An artifact of my personal coding style. For single line if statements I put everything on one line and omit the brackets. Being on one line makes it harder to accidentally add another statement with the same indent but leaving it out the if statement. I'll update it (and other instances) according to your style.
There was a problem hiding this comment.
Always doing it one way means you don't have to worry about such subtle bugs and quirks of the language :)
There was a problem hiding this comment.
I'll make a sweep through and expand these soon.
|
I was about to merge this but I noticed it was targeted at master. Can you rebase this on 2.2 before I merge it? I had a chance to play with a Mixtrack Platinum with Serato for a little bit a few weeks ago and I think it's a great deal and a good controller to recommend for new users. Thanks for your work on this! |
This is a mapping for the Numark Mixtrack Platinum. Most features of the controller are supported including the LCD screens and 4 deck control. This mapping is targeted for Mixxx 2.0.0. Notes: - FX buttons always operat channels 1 and 2. This is a limitation of the controller that could be scripted around, but I got lazy (also how it works in Serato). - Both FX dry/wet strips control the same effects chain and will affect both channels 1 and 2 if effects are enabled on them. Serato has isolated effects banks for each channel. - The "BEATS" knobs are not mapped, this concept did not translate cleanly to Mixxx. - Sometimes there are artifacts in the auto after long spinback maneuvers. This may not have anything to do with the controller. - The sub-beat auto-loop buttons do not light up when enabled unless the shift key is pressed. This is different from how the work in Serato. - Master sync enable and disable works like in the Mixxx software interface, not how it works in Serato. Shift-sync is not mapped. - The slip mode indicator is not mapped, this is trivial to fix (midi codes are documented in the JS file), but I couldn't figure out how to use slip mode in the Mixxx interface. - The up/down indicators on the LCD screens to indicate which direction to adjust the pitch slider are not implemented. It's possible to do, but would require some scripting. - Browse knob press is unmapped. I couldn't get this to do something sensible in Mixxx 2.0.0. Version 2.1.0 seems to have more sensible options.
Also use a closure instead of the legacy text method to set the callback function.
Previously, this would only take effect when triggered by the controller buttons. Now any focus change (like at mixxx startup) will triger show_focus.
This is necessary so that when we trigger the entire deck, the position gets updated properly. This happens after sending the controller init message which will clear out the position value, and thus needs to be re-sent.
When spinning the platter backwards and letting it go, stop scratching sooner. This enables tighter scratching.
e03e724 to
b3bb479
Compare
|
Rebased. I was still planing on going through and tweaking the formatting of if/else statements and such, though it may be a few days before I can get to that. Obviously you can merge with out that. |
This is a mapping for the Numark Mixtrack Platinum controller. Nearly all of the features of the controller are supported including the LCD display screens and jog wheels. Support for controlling Mixxx's effects and effect parameters is supported as well. I have also extended the functionality of the controller to support 8 hotcues.
Documentation here https://www.mixxx.org/wiki/doku.php/numark_mixtrack_platinum
There are a bunch of commits here, I can squash if necessary.