Help with QML edit to repurpose Kontrol S5 "Freeze" button as Active Loop toggle
I've done a little QML editing, but I'm having trouble with this challenge: On the S5, I wish there were a way to turn on "Active Loop" mode without setting a loop. In other words, a way to toggle the loop button to the right of the IN/OUT buttons on the UI:
My goal is to control whether or not my deck automatically starts looping the next time the playhead encounters one of my predefined loops.
Ideally, I'd be able to do something really fancy like toggle this with a double-touch (not double-press) on the loop encoder. But what I'd settle for is repurposing the FREEZE button as an active loop indicator/toggle since I've never once found FREEZE to be useful for how I mix.
I think I'm in the right area of code (see below) and while I was able to disable to freeze button I couldn't figure out how to repurpose it as the active loop toggle.
Any guidance/code would be very much appreciated. I am happy to contribute a few beers worth over PayPal as well.
Thanks!
function onFreezeButtonPress(padsMode, deckIsLoaded) { var exitFreeze = false; if (padsMode.value == freezeMode) { exitFreeze = true; } else if (deckIsLoaded) { exitFreeze = false; padsMode.value = freezeMode; } return exitFreeze; } function onFreezeButtonRelease(padsMode, exitFreeze, deckType) { if (exitFreeze) { updateDeckPadsMode(deckType, padsMode); } } // Deck A WiresGroup { enabled: (focusedDeckId == 1) Wire { from: "%surface%.hotcue"; to: SetPropertyAdapter { path: propertiesPath + ".top.pads_mode"; value: hotcueMode; color: Color.Blue } enabled: hasHotcues(deckAType) } Wire { from: "%surface%.freeze"; to: ButtonScriptAdapter { brightness: ((topDeckPadsMode.value == freezeMode) ? onBrightness : dimmedBrightness); color: Color.Blue; onPress: { deckAExitFreeze = onFreezeButtonPress(topDeckPadsMode, deckAIsLoaded.value); } onRelease: { onFreezeButtonRelease(topDeckPadsMode, deckAExitFreeze, deckAType); } } enabled: hasFreezeMode(deckAType) } Wire { from: "%surface%.remix"; to: SetPropertyAdapter { path: propertiesPath + ".top.pads_mode"; value: remixMode; color: (hasRemixMode(deckAType) ? Color.Blue : Color.White) } enabled: !hasStemMode(deckAType) && (hasRemixMode(deckAType) || hasRemixMode(deckCType)) } Wire { from: "%surface%.remix"; to: SetPropertyAdapter { path: propertiesPath + ".top.pads_mode"; value: stemMode; color: Color.Blue } enabled: hasStemMode(deckAType) } }
Best Answers
-
I can help you with that on the weekend. But first, know that there already is a LOOP ACTIVE toggle. It's SHIFT+LOOP ENCODER (PRESS).
1 -
The S5 manual doesn't mention this, nor the D2 and S8 manuals. All three use the same aggregate module for the LOOP encoder though. Trial and error works brilliantly, especially when tinkering with the code. I recreated the S4 encoder setup (MOVE enc + LOOP enc) with the basic commands, using the BROWSE encoder in place of the MOVE encoder when not in browser mode and toggling browser mode using the BACK button for D2 and S5 on top of a complex mod for TP 3.4.2 (my version of choice) and found out about it along the way.
If you want to know how the code can be constructed, you can't do better than to acquire Aleix's SUPREME EDITION MOD for D2, S5, S8 for TP3. He's a pro coder and he replaced the complete qml code NI provided with his own. It's not quite the limit what can be done but it's pretty close and you can read the code like a book (of you are a coder).
Here is a list of all the basic Traktor values that can be read and manipulated. Read the actual qml files to see how they are implemented. There are also various resource you can google that explain what can be done with qml. For some you need to import the relevant libraries (see in qml files top rows what's needed for what to work)
Sadly there is not much info on NI's custom modules (hardcoded references). I'm still in the process of gleaning both from the qml files as well as the Traktor.exe HEX code what variables and what arguments apply to those function calls.
I hope this encourages you to put in the work. Please check the MAPPING TRAKTOR section (where stuff like this belongs) for several qml Q&A's and projects. There is a lot to learn if you want to.
Welcome to the club! 🦋
0
Answers
-
I can help you with that on the weekend. But first, know that there already is a LOOP ACTIVE toggle. It's SHIFT+LOOP ENCODER (PRESS).
1 -
OMG that's even better. (I like to make as few changes to the QML as I can.) Thank you!!! I studied the manual, even fed it into Chat GPT, couldn't figure this out on my own. I must have missed something. (Or their manual is incomplete?)
Speaking of manuals, has anyone put together a little document that describes how the QML files work? I'm a programmer myself, but I'm having trouble intuiting the basic design and syntax of the language.1 -
The S5 manual doesn't mention this, nor the D2 and S8 manuals. All three use the same aggregate module for the LOOP encoder though. Trial and error works brilliantly, especially when tinkering with the code. I recreated the S4 encoder setup (MOVE enc + LOOP enc) with the basic commands, using the BROWSE encoder in place of the MOVE encoder when not in browser mode and toggling browser mode using the BACK button for D2 and S5 on top of a complex mod for TP 3.4.2 (my version of choice) and found out about it along the way.
If you want to know how the code can be constructed, you can't do better than to acquire Aleix's SUPREME EDITION MOD for D2, S5, S8 for TP3. He's a pro coder and he replaced the complete qml code NI provided with his own. It's not quite the limit what can be done but it's pretty close and you can read the code like a book (of you are a coder).
Here is a list of all the basic Traktor values that can be read and manipulated. Read the actual qml files to see how they are implemented. There are also various resource you can google that explain what can be done with qml. For some you need to import the relevant libraries (see in qml files top rows what's needed for what to work)
Sadly there is not much info on NI's custom modules (hardcoded references). I'm still in the process of gleaning both from the qml files as well as the Traktor.exe HEX code what variables and what arguments apply to those function calls.
I hope this encourages you to put in the work. Please check the MAPPING TRAKTOR section (where stuff like this belongs) for several qml Q&A's and projects. There is a lot to learn if you want to.
Welcome to the club! 🦋
0
Categories
- All Categories
- 19 Welcome
- 1.4K Hangout
- 60 NI News
- 731 Tech Talks
- 3.8K Native Access
- 15.8K Komplete
- 1.9K Komplete General
- 4.1K Komplete Kontrol
- 5.5K Kontakt
- 1.5K Reaktor
- 364 Battery 4
- 813 Guitar Rig & FX
- 416 Massive X & Synths
- 1.2K Other Software & Hardware
- 5.5K Maschine
- 6.9K Traktor
- 6.9K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators