-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping for Numark Platinum FX #12872
Conversation
Thank you for this PR! Please sign the Mixxx Contributor Agreement and comment here when you have done so. It gives us permission to distribute your contribution under the GPL v2 or later license and the Apple Mac App Store. It is also helpful for us to have contact information for contributors in case we may need it in the future. |
Instead of commiting through the Github web API, I highly recommend you set up Deails can be found here https://github.com/mixxxdj/mixxx/blob/main/CONTRIBUTING.md#git-workflow Since you're working only on a mapping you don't need to worry about building Mixxx. |
@ronso0 I just signed the Mixxx Contributor Agreement. |
Just to clarify: Please confirm that the uploaded mapping files are exclusively your own work or are based exclusively on files that are already part of Mixxx. |
@JoergAtGithub the mapping is a mixxx community work. I believe I am the only active member from that forum. All the update from the mapping for the past year were all mine, the original mapping is almost not usable for mixxx 2.4. All the contributors are listed on the author's area of Numark Mixtrack Platinum FX.midi.xml The thread for the mapping - #12872 (comment) |
@ronso0 One more update then I will move locally on weekend., I was trying to work remotely, away from home. |
Great, because I think all these "Update ..." commits may as well be squashed. |
@ronso0 I believe this mapping is ready. I did not get any errors or warning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very shallow first look. This will take some work go get into shape. I'm a bit short on time rn so I kept my comments short, but please ask if they've been too short and/or you need help. Thank you.
// whether the corresponding Mixxx option is enabled | ||
// (Settings -> Preferences -> Waveforms -> Synchronize zoom level across all waveforms) | ||
MixtrackPlatinumFX.waveformsSynced = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is that relevant for the mapping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// need to zoom both channels if waveform sync is disabled in Mixxx settings.
// and when it's enabled then no need to zoom 2nd channel, as it will cause
// the zoom to jump 2 levels at once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see I see. I think this would be better solved by introducing a CO that always zooms the CO in unison regardless of the preference setting. Can you file a feature request for that?
AUTOLOOP: 0x0D, | ||
FADERCUTS: 0x07, | ||
SAMPLE1: 0x0B, | ||
BEATJUMP: 0x01, // DUMMY not used by controller |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you elaborate? what do you mean with not used by controller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beatjump is working on the map. It might just need correction to
BEATJUMP: 0x02
// state variable, don't touch | ||
MixtrackPlatinumFX.shifted = false; | ||
|
||
MixtrackPlatinumFX.initComplete=false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to remove this. its a rather ugly workaround and fixing the root problem would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will need more research or help on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to find some time to look into it. I'm just saying its a code smell for now.
// status, extra 04 is just more device id, not sure what the 05 is | ||
//F0 00 20 04 7F 03 01 05 F7 | ||
|
||
// wake (not sure what the extra 07 is for? | ||
//F0 7E 00 07 06 01 F7 | ||
|
||
// I think these are the dial updates | ||
//F0 00 20 04 7F 02 02 04 08 00 00 04 00 00 00 05 F7 | ||
//F0 00 20 04 7F 04 01 04 00 00 00 04 00 00 00 05 F7 | ||
//F0 00 20 04 7F 02 04 04 08 00 00 04 00 00 00 07 00 00 F7 | ||
//F0 00 20 04 7F 03 02 04 08 00 00 04 00 00 00 05 F7 | ||
//F0 00 20 04 7F 03 04 04 08 00 00 04 00 00 00 07 00 00 F7 | ||
//F0 00 20 04 7F 01 04 04 08 00 00 04 00 00 00 07 00 00 F7 | ||
//F0 00 20 04 7F 04 04 04 08 00 00 04 00 00 00 07 00 00 F7 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how relevant this is for you, but I've reverse-engineered this all already. https://github.com/mixxxdj/mixxx/pull/11075/files#diff-39ced933348af25b914ee7fcd0d44355bb001d6151fb8781d7aca1471e304d52R3-R42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will need more research or help on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment now just posts some messages, the link I shared has some extra info that explains them in better detail. I think some of this code could be better rewritten by salvaging code from that mapping, such as NS6II.numberToSysex
and NS6II.Display
.
MixtrackPlatinumFX.bpms = []; | ||
MixtrackPlatinumFX.trackBPM = function(value, group, _control) { | ||
// file_bpm always seems to be 0? | ||
// this doesn't work if we have to scan for bpm as it will be zero initially | ||
// so we hook into the bpm change as well, and if we have 0 then set it to the first value seen (in bpm output) | ||
MixtrackPlatinumFX.bpms[script.deckFromGroup(group) - 1] = engine.getValue(group,"bpm"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be removed. Either store the BPM along with the component or query it directly with engine.getValue
when you need it.
I can not reproduce the file_bpm
issue mentioned here.
Also, avoid script.deckFromGroup(group)
if possible. its slow. Also indexing into some array like here MixtrackPlatinumFX.bpms[script.deckFromGroup(group) - 1]
is usually a sign that some feature could've been implemented much better directly using components. So keep an eye out for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will check this..
// TODO in 2.3 it is not possible to "properly" map the FX selection buttons. | ||
// this should be done with load_preset and QuickEffects instead (when effect | ||
// chain preset saving/loading is available in Mixxx) | ||
MixtrackPlatinumFX.EffectUnit = function(deckNumber) { | ||
this.effects = [false, false, false]; | ||
this.isSwitchHolded = false; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this todo and implementation is now obsolete since you're targetting mixxx 2.4 and loaded_chain_preset
is available (just not yet documented, PR is in progress though, see the preview below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WIll check on this..
Also please take care of the eslint issues. Do you need help with setting that up? Also, you should probably create a new branch for this mapping, otherwise you will get problems down the line (the "don't commit to branch" pre-commit hook should've prevented you from this, but it seems you don't have pre-commit set up). |
Here's my template response that contains some links that should get you started with pre-commit: Please understand that in order for us to be able to merge this, your contribution need to follow our style guide. Most of the required changes can be made automatically by use of |
@Swiftb0y The mapping and manual started as a community work, I am the only one remaining that is still working on both. I'm actually working remotely and can't really setup to work on this locally. My time is also limited but this mapping is the community has been past due. I actually need all the help I can get. I really appreciate your feedback. |
Thats fine. May I ask for some more details on your setup so I can determine whats the best way to proceed then?
Sure sure, no problem. I suggest you start by trying to address my previous comments and if you have trouble implementing them, reply in the relevant thread and I can go into more detail if necessary. |
…ixtrack-Platinum-FX-scripts.js Co-authored-by: Swiftb0y <[email protected]>
Co-authored-by: Swiftb0y <[email protected]>
On weekdays, I'm mostly on android device.
Updated. |
What kind of work can you do from your android device and what can you from your arch/debian setups? Interacting with git? cloning the repo? compiling code? |
I understand that (and I understand you don't want to drop your current implementation unless strictly necessary ; ) but I think it would be much simpler: Browse and Tap are close and it would be consistent to use the same logic for both. (note that I don't insist on this, just want to share my thoughts for other reviewers to consider) |
If I use shift+BPM to select the deck, I will need to use BPM to reset both decks, no way to of selecting which deck to reset. I updated the manual on the BPM's instruction (item# 23). |
I thought of Shift (hold) + Tap longpress to do the reset. Wouldn't that also read left/right Shift? |
Left/Right - Shift (hold) + Tap longpress to do the reset. - I will work on this on my next update, Hopefully target mixxx target 2.4.2. I actually have an updated mapping that can switch the time elapse/remaining (using shift+play), This is being tested on the community now. I will include both on my next update. Targeting one of the future releases. |
Fix for pad mode buttons staying blinking when using multiple shift+pad mode.
Long press on pad mode did not work on 2.4, this is working now.
@ronso0 What is the review status here? |
I only tried to make some sugestions to improve the workflow. I think @Swiftb0y was reviewing the code. |
@Swiftb0y any updates on this? I know it's a huge PR |
well, most of the comments I made previously have stalled. I can try to take another swing at this if @evoixmr is available. |
Great. I'll try to take another look in the next couple days. Remind me in case I forget. |
@Swiftb0y Can we move forward on the next update? |
@Swiftb0y do you have time to review this? I'm hesitant to change the base to 2.5, don't know how this affects the review convos. |
Changing target should not affect the existing conversations. |
if (MixtrackPlatinumFX.tapChangesTempo) { | ||
this.tap = new components.Button({ | ||
unshift: function() { | ||
this.disconnect(); | ||
this.input = function(channel, control, value, _status, _group) { | ||
const tapch=MixtrackPlatinumFX.activeForTap(value)+1; | ||
if (tapch) { | ||
if (value>0) { | ||
const prelen = bpm.tap.length; | ||
const predelta = bpm.previousTapDelta; | ||
bpm.tapButton(tapch); | ||
// if the array reset, or changed then the tap was "accepted" | ||
if ((bpm.tap.length===0) || (bpm.tap.length!==prelen) || predelta!==bpm.previousTapDelta) { | ||
this.send(this.outValueScale(value)); | ||
} else { | ||
this.send(0); | ||
} | ||
} else { | ||
this.send(this.outValueScale(value)); | ||
} | ||
} | ||
}; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note:
by now (Mixxx 2.5) there is tempo_tap
#12104
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @evoixmr. I'm terribly sorry for putting this off until now. Where do you want to continue? Should we polish this or do you just want get it merged asap? Do you have time/motivation for follow up PRs?
// FX toggles | ||
MixtrackPlatinumFX.toggleFXControlEnable = true; | ||
MixtrackPlatinumFX.toggleFXControlSuper = false; | ||
|
||
MixtrackPlatinumFX.shiftBrowseIsZoom = false; | ||
|
||
// setting this to false sets tap the file bpm, but without a way to reset its dangerous | ||
MixtrackPlatinumFX.tapChangesTempo = true; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have UI support for some of these now: https://github.com/mixxxdj/mixxx/wiki/midi%20scripting#settings-api
Are you interested in refactoring accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would ne nice to get it merged , this PR is almost a year old. Yes I can work on future PR.
Refactoring? Does it need to be done through XML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, you need to declare your settings in the XML and then you can query them in the JS mapping using engine.getSetting("key")
. So while the majority of changes are in the XML, some JS changes are required to actually query the data. There are already a couple mappings implementing this if you'd like to work of some concrete examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave as is for now and merge first? The mapping has been tested by multiple user on 2.5 without any issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the code quality is not perfect, its above average and thus I'm okay with merging. Next we need to make sure the manual page is ready.
Just merged the manual. Thanks @evoixmr for your patience! |
Mapping base on - https://github.com/evoixmr/mixxx_numark_mixtrack_platinum_fx
Forum thread - https://mixxx.discourse.group/t/numark-mixtrack-platinum-fx-mapping/19985/215
Manual PR - mixxxdj/manual#623
Manual preview - https://deploy-preview-623--mixxx-manual.netlify.app/hardware/controllers/numark_mixtrack_platinum_fx
Manufacturer's product page - https://www.numark.com/product/mixtrack-platinum-fx