Traktor Kontrol S2MK3: Use FX select buttons to set quick effect presets#11702
Conversation
25b1bd6 to
558877d
Compare
|
Thank you! |
echozio
left a comment
There was a problem hiding this comment.
I tested this out with the controller, and the 8 effect logic works intuitively, however pressing 1 sets the effect at index 0, which is no effect (not visible when reordering in the settings).
This change should fix that.
| const activeFx = {}; | ||
| // Detect which fx should be enabled | ||
| for (const group of targetGroups) { | ||
| activeFx[group] = engine.getValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset"); |
There was a problem hiding this comment.
| activeFx[group] = engine.getValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset"); | |
| activeFx[group] = engine.getValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset") - 1; |
| TraktorS2MK3.outputHandler(TraktorS2MK3.fxButtonState[fxNumber], field.group, "fxButton" + fxNumber); | ||
| // Now apply the new fx value | ||
| for (const group of targetGroups) { | ||
| engine.setValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset", fxToApply[group]); |
There was a problem hiding this comment.
| engine.setValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset", fxToApply[group]); | |
| engine.setValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset", fxToApply[group] + 1); |
|
|
||
| const activeFx = {}; | ||
| for (const group of availableGroups) { | ||
| activeFx[group] = engine.getValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset"); |
There was a problem hiding this comment.
| activeFx[group] = engine.getValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset"); | |
| activeFx[group] = engine.getValue(`[QuickEffectRack1_${group}]`, "loaded_chain_preset") - 1; |
There was a problem hiding this comment.
Actually I didn't want to sort it out this way, because I believe there's probably a bug in the quick effects settings page.
in 2.4-beta - at least for me:
- the list order is never saved upon Mixxx exit and needs to be changed after restart
- List index does not start with the first effect in the list but with "---" - If you get to the effect settings, hit "Restore Defaults", then the first index becomes the first effect
I believe that working around this behavior in the mapping will thus break next time the effect list behavior is sorted out
There was a problem hiding this comment.
the list order is never saved upon Mixxx exit and needs to be changed after restart
Can't confirm. The list is saved correctly to effects.xml when Mixxx exits. Are you sure Mixxx is shutting correctly?
There was a problem hiding this comment.
List index does not start with the first effect in the list but with "---" - If you get to the effect settings, hit "Restore Defaults", then the first index becomes the first effect
I would imagine this is a bug in the restore logic ("---" is not re-added when restoring)?
There was a problem hiding this comment.
Mmmmh I must have badly tested, you're right list is properly saved, but "---" disappear on "Restore Defaults" which would break the "workaround" mapping though.
Which way should we fix it first? :)
|
Yes, I added the empty preset in #10859 so the list is 1-based. |
|
Ok so I tested @echozio fix and added a new commit. |
|
Fix for the missing empty preset / list offset is here #11705 |
|
If mappings are created/updated the respective manual PR is a prerequisite for merging. |
| // If no shift button was pressed fall back to target all decks. | ||
| if (targetGroups.length === 0) { | ||
| targetGroups = availableGroups; | ||
| noShift = true; | ||
| } |
There was a problem hiding this comment.
Wouldn't it make sense to check here that the effect knob is in zero position (or close to it)? Otherwise we could reassign the effect chain preset, while it's audible.
There was a problem hiding this comment.
IMO this is up to the user to decide, and the learing curve should be pretty steep ;)
Related: #11198
There was a problem hiding this comment.
I'm not sure how this works currently, but when I used the code from my old PR knobs would always reset when switching effect, whether that be to the center position or the zero position and the knob would only control it again when moved back to the initial point.
|
@ronso0 Than I think we can merge this. But in mixxxdj/manual#568 you asked to have a final look, when the mapping PR is ready. |
|
Indeed, I'll do so soonish. |
|
LGTM! Thank you! |
|
Hi @olivier-mauras thank you for your contribution. |
Rework of #11104 on 2.4 branch