1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE
NOTICE:

Our Traktor Pro Public Beta is available again in our new online community. Join us if you want to try new features.

MORE INFO

D2/S5/S8 mod - move active loop by 1 beat

Discussion in 'KONTROL S5/ KONTROL S8' started by Nick Moon, Sep 11, 2018.

  1. Jike

    Jike NI Product Owner

    Messages:
    103
    2. I use the MasterTempo push to reset to filter all the channels (In mixer.qml). It's fast and easy to use in a gig :
    Code:
    WiresGroup
        {
            enabled: !shift
    
            Wire { from: "%surface%.mixer.tempo.push";  to: SetPropertyAdapter { path: "app.traktor.mixer.channels.1.fx.select"; value: 0; } }
            Wire { from: "%surface%.mixer.tempo.push";  to: SetPropertyAdapter { path: "app.traktor.mixer.channels.2.fx.select"; value: 0; } }
            Wire { from: "%surface%.mixer.tempo.push";  to: SetPropertyAdapter { path: "app.traktor.mixer.channels.3.fx.select"; value: 0; } }
            Wire { from: "%surface%.mixer.tempo.push";  to: SetPropertyAdapter { path: "app.traktor.mixer.channels.4.fx.select"; value: 0; } }
        }
    3. Yes, it's less important because we don't use all the 8 effects. 4 favorites is enough.

    1. I think this is the fastest way to assign effects on a channel. A good idea.

    But, one question : The way you use your shift by testing OnPush/OnRelease must be done in each functions or can it be used like "enabled: 2ndShift" or "enabled: !2ndShift" ? I think that the good way to use a second shift in the code must be simple. We can assign FREEZE (Or another one) as a second shift and SHIFT+FREEZE to engage the Freeze mode.

    I hope that you can understand what i mean ! My English is not as good as yours (Of course, i'm French lol).

    For the PopUp with the effect name, it's also what we need. But can we read the preferences in TP3 to get the names of the 4 favorites effects ? Because, if we can't, we will need to add it in the code and modify it each time we change the favorites...
     
  2. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    Once the core changes have been made for the secondary shift key, it can be referenced in code as required. For example (I have 3 shift buttons - SHIFT, BACK & DECK) the following snippet shows how I capture BACK+MIDI BUTTON 1 & 2 which are used to unload a track:
    Code:
        // NM BACK+MIDI button overrides applied when MIDI footer menu displayed
        WiresGroup {
          // conditions to be met before even thinking what the buttons should do...
          enabled: (ModPrefs.reuseMIDIControls) && (module.back) && (!module.deckButton) && (!module.shift) && (module.screenView.value == ScreenView.deck) && !isInEditMode && (footerPage.value == FooterPage.midi);
    
          // Deck A Unload
          WiresGroup
          {
            enabled: (deckAIsLoaded.value)
            Wire { from: "%surface%.buttons.1"; to: TriggerPropertyAdapter { path:"app.traktor.decks.1.unload"; } }
            Wire { from: "%surface%.buttons.1"; to: ButtonScriptAdapter { brightness: (deckARunning.value) ? onBrightness : dimmedBrightness; } }
          }       
          // Deck B Unload
          WiresGroup
          {
            enabled: (deckBIsLoaded.value)
            Wire { from: "%surface%.buttons.2"; to: TriggerPropertyAdapter { path:"app.traktor.decks.2.unload"; } }
            Wire { from: "%surface%.buttons.2"; to: ButtonScriptAdapter { brightness: (deckBRunning.value) ? onBrightness : dimmedBrightness; } }
          }       
    etc
    
    I was thinking maybe pad 5 could be orange to return the setting to Filter...

    So I thought I'd make a start with the mod tonight... and as I have a Filter slider displayed on my screens I'd really like it to display the mixer fx abbreviation as well... so I'm currently tackling one of my outstanding complicated tasks - reading the Traktor settings file. IMG_9268.jpg
     
  3. Jike

    Jike NI Product Owner

    Messages:
    103
    How ? I've tried to do something based on the // SHIFT // snippet for the FREEZE button but no success. The button turns white (Like the SHIFT) but
    nothing works when i use module.freeze in my code...
     
  4. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    Did you try the example I posted in this thread on 2nd October? But I was planning on doing that part for you anyway, and you test on the S5 so I can either make the changes on the factory S5Deck.qml or you send me your and I edit it with comments. Will towards the first weekend in the New Year now before I can look at specific stuff for the S5 but I'll carry on with the work I've started on Mixer FX.
     
  5. Jike

    Jike NI Product Owner

    Messages:
    103
    i'll take a look at your post, i remember now !
     
  6. thespirit

    thespirit New Member

    Messages:
    7
    hey nick, thanks for the report of the process of your work. when will this new version be ready? :) really looking forward, great job, thanks man
     
  7. Jike

    Jike NI Product Owner

    Messages:
    103
    I've done some work today in my S5Deck.qml file...

    I'm using the FREEZE button as a 2nd Shift, not the DECK button like you, and pads 5~8 to select effects (Pads 1 or 4 to select Filter).

    Works only in HotCue mode.

    1. Making Shift+FREEZE to enable Freeze mode so the direct FREEZE button can be re-used :
    (Just adding && module.shift for each deck and at another line near L2900)
    Code:
    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) && module.shift }
    and
    Code:
    Wire { from: "%surface%.freeze"; to: DirectPropertyAdapter { path: propertiesPath + ".freeze"; output: false } enabled: hasFreezeMode(focusedDeckType) && module.shift }

    2. Adding 4 properties to manage thoses 2nd Shifts, deck by deck :
    Code:
    property bool modDeckAShift2: false //FREEZE as a 2nd Shift - Deck A
    property bool modDeckBShift2: false //FREEZE as a 2nd Shift - Deck B
    property bool modDeckCShift2: false //FREEZE as a 2nd Shift - Deck C
    property bool modDeckDShift2: false //FREEZE as a 2nd Shift - Deck D

    3. Adding for each deck (With enabled: !module.shift && padsMode.value == hotcueMode to avoid errors...) :
    Code:
    Wire { from: "%surface%.freeze";  to: ButtonScriptAdapter { brightness: ((modDeckAShift2 == true) ? onBrightness : dimmedBrightness); color: Color.White; onPress: { modDeckAShift2 = true;  } onRelease: { modDeckAShift2 = false } } enabled: !module.shift && padsMode.value == hotcueMode }

    4. In Hotcues Wires Groups, adding && !modDeckAShift2 to avoid mistakes :
    Code:
    WiresGroup //HotCues
              {
                enabled: !module.shift && !modDeckAShift2
    
                Wire { from: "%surface%.pads.1";   to: "decks.1.hotcues.1.trigger" } .../...
    and
    Code:
    WiresGroup //Delete mode
              {
                enabled: module.shift && !modDeckAShift2
    
                Wire { from: "%surface%.pads.1";   to: "decks.1.hotcues.1.delete" } .../...

    5. Adding new Wires Groups for each deck to use pads for MixerFx select :
    Code:
    WiresGroup
              {
                enabled: modDeckAShift2 && !module.shift
    
                Wire { from: "%surface%.pads.1";   to: SetPropertyAdapter { color: Color.LightOrange; path: "app.traktor.mixer.channels.1.fx.select"; value: 0; } }
                Wire { from: "%surface%.pads.4";   to: SetPropertyAdapter { color: Color.LightOrange; path: "app.traktor.mixer.channels.1.fx.select"; value: 0; } }
                Wire { from: "%surface%.pads.5";   to: SetPropertyAdapter { color: Color.Red; path: "app.traktor.mixer.channels.1.fx.select"; value: 1; } }
                Wire { from: "%surface%.pads.6";   to: SetPropertyAdapter { color: Color.Green; path: "app.traktor.mixer.channels.1.fx.select"; value: 2; } }
                Wire { from: "%surface%.pads.7";   to: SetPropertyAdapter { color: Color.Blue; path: "app.traktor.mixer.channels.1.fx.select"; value: 3; } }
                Wire { from: "%surface%.pads.8";   to: SetPropertyAdapter { color: Color.Yellow; path: "app.traktor.mixer.channels.1.fx.select"; value: 4; } }
              }

    As you can see, i'm usings pads 1 and 4 to return to filter on a channel so you can make it with your right or left hand ;)

    https://maps.djtechtools.com/mappings/8924
     

    Attached Files:

    Last edited: Dec 31, 2018
    • Like Like x 1
  8. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    Well apart from still adding and tweaking things, an unexected piece of DIY prevented me from completing it over the Christmas break. Something wasn't sitting right with me for the compromises we've had to make to implement MIixerFX. NI bloody well should have done it themselves. So rather than a variation of what everyone else had done, I have (nearly):

    1) Confirmed the Traktor Settings.tsi file is (well formed) XML
    2) Identified the settings for MixerFX and what the values mean/how they are used.
    3) Written code to read the Traktor Settings.tsi file at startup - in theory this should not have been difficult. Reality is we have none of the QML XML classes in the NI release, and don't think we can add them. Once I worked out how to open and read the file into memory I then had to use primitive (dirty) JavaScript to extract the data. This took about 4 evenings to get to where it is!

    So the above had given gives me the ability to correctly label/color the MixerFX slider I have on my screens. What I still didn't love is the use of pads to select the effect and no feedback as to what the effect selected is. I think I'm neary 75% done with implementing a centred overlay (as used for BPM & Key selection).

    The popup will be displayed showing the currently selected effect (color coded). I may use a solid rectangle with the text transparent to indicate the filter is ON.
    The Browse Encoder will be used to scroll through the list of (5) MixerFX's that have been elected by the use
    The popup allow the user to return to the orignal value (stated) via the BACK button.

    * I may still implement the pads as well, using one my DECK+ secodary shift key.

    And finally, changing subject to the Traktor Settings.tsi file, I will try to implement the key notation settings as well before launch - its perhaps the most important mod from a music perspective I guess. This should only be about 30 mins work and reduces documentation/scope for user error.
     
    • Like Like x 1
  9. thespirit

    thespirit New Member

    Messages:
    7
    What sould I say?

    Thank you so much, everything you do sounds for so detailed specialized coding work!

    Really looking forward for the release of your next display mod!

    You kick the coding thick! Thanks Nick!
     
  10. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    Everything takes so much longer than I think it will, but I have my MixerFX popup working which I'm pleased with... I want to tidy a few more things up such as also implementing MixerFX via pads and automatically detecting the key notation from the Traktor Settinsg.tsi file - looking at towards the end of the weekend/early next week now :(
    IMG_9311.jpg IMG_9310.jpg IMG_9309.jpg IMG_9308.jpg IMG_9307.jpg
     
    • Like Like x 2
  11. Jike

    Jike NI Product Owner

    Messages:
    103
    Huge work !! Your popups are very nice !
     
  12. Aleix Jiménez

    Aleix Jiménez Active Member

    Messages:
    345
    Wow, EPIC work Nick, you have taken the modding of S5/S8/D2 to the next level, this is amazing, and i speak as someone who knows about programming and who has made some steps in modding my S8 behaviour, but compares to what you have achieved, they look as baby steps!! Keep Going!!! You have my full support as you already know!!!
     
    • Like Like x 1
  13. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    Whilst I'm very pleased with the BPM/Tempo style popup I created for Mixer FX, I think a pads option was needed as well. I've taken you approach and made a few adjustments :)
    1) Firstly, I found a solution to make DECK as a alternate SHIFT button work better than it was. My logic is - if the DECK button is held for more than a certain time (I have 300ms as default but controllable via preference) then the intent is it is being used as a shift button and even if the user releases it without doing anything else it will not swap deck. Works very well...
    2) I like the scheme of using pads 1, 5, 6, 7, 8 and have implemented the same, plus the pad for the currently selected Mixer FX will be displayed at full brightness
    3) I've used pad 4 as a Mixer FX on/off (bright/dim) button, which changes colour to match the selected Mixer FX.

    Mixer FX is Filter and is On (pad 4 bright)
    IMG_8074.JPG

    Mixer FX is Filter and is Off (pad 4 dim)
    IMG_1785.JPG
    Mixer FX is the third one (colour Cyan) but is off (pad 4 dim)
    IMG_3989.JPG
     
  14. Jike

    Jike NI Product Owner

    Messages:
    103
    I can see that your DESK button is close to your SHIFT button. I understand now why you want to use it as a second shift !

    On my S5, the desk button is under the screen but I'm interested by the way you use it with a 300ms threshold. It's "smart" !

    Can you show me your snippet ?

    With all of our works, it's now funny and more "user friendly" to use the D2/S5/S8 !
     
    • Like Like x 1
  15. Michael Niotakis

    Michael Niotakis NI Product Owner

    Messages:
    27
    Stop teasing us Nick Moon ;) ... I can't wait to test your TP3 build!

    You guys are the reason I recently bought an obsolete D2 controller. I'm running kokernutz atm and loving it. So thank you all!
     
    • Funny Funny x 1
  16. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    I've been doing some work on the user notes. The notes for v1 were about 12 pages. As well as loads of screen grabs, I need to explain the new deck header properly, and the 32 beat bar that makes 4, 8, 16 & 32 beat phrase matching between the outgoing and incoming track so simple that "real DJs" will frown even more. Not in the right headspace to write notes :(

    Are you suggesting I should release it without the notes for people to review and call it a beta version?! I would actually welcome another D2 user validating the AB CD deck switching work though...
     
  17. Michael Niotakis

    Michael Niotakis NI Product Owner

    Messages:
    27
    i thought you'd never ask :D hahaha

    you have taken on a lot man, share the load I say! I am relatively new to the the NI / DJing world but happy to help where I can.

    I'm a 'hack' coder, not trained but can get by on the WordPress and Magento sites I run ... and do openly provide feedback to opensource communities and extension developers. I may be able to assist you. My issue reports may be better than the average Joe given my background.

    Did you have longer term plans to move to github at all? Version/issue tracking and quicker commits etc?
     
    • Like Like x 1
  18. JuanT

    JuanT NI Product Owner

    Messages:
    24
    I recently bought an S5 second hand and was so deceived with the lack of support to do custom mappings, as I had on my old S2, and specially with the unmatched view of displays compared to what you can see on the PC :mad::mad::mad:

    But, gosh!!! BIG BIG THANK YOU to you ALL for making this and other mods I'm finding in these forums.

    They are really awesome!!! And it's amazing the stuff you are doing, having to even do reverse engineer. You guys rock!!!

    And I can't still believe NI isn't delivering themselves any such kind of display mods, as the factory display just sucks!!! Or even support you or give you guys recognition for what you are doing... (sigh)

    Nick Moon , what you seem to be working on now is simply mouth watering... (lol) And, answering to your question on your last post here, yesss, please! pleeeasee!!! Release a beta version of that mod!!! :D If that can be of any help, I'll happily test it thoroughly and give you feedback (I have large experience testing out alpha/beta software for game developers), and also have a close friend with an S8 that I could borrow. Would also be happy to even help you make a "formal" user manual with screenshots and usage videos ;)
     
    • Like Like x 1
  19. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    I'd class myself as a hack coder these days lol. And Magento :) I launched my own online business in June 2010 (version 1.2 I think!) using it and then worked with it professionally a few times... Nightmare to code with lol.

    I'll pull together a beta release, over the weekend. Last night I found one of the new mods I'd only implemented on 1 deck, and also realised I'd not put appropriate code in for Windows file paths when I read the Traktor Settings.tsi file for Mixer FX options & Key Notation. Sharing that piece of code alone will allow others to make their mods even better. And no doubt I'll spot a few TODO comments in the code that I won't be able to resist dealing with. And I must hook up a CDJ to test the changes I made around sections of code that reference the barely documented Timecode features.
     
  20. Nick Moon

    Nick Moon NI Product Owner

    Messages:
    162
    Thank you for your words of support & encouragement.

    The situation with NI is simply terrible. When I saw they had stuck with Qt/QML for the new Mk3 controllers I genuinely thought they'd fix a few bugs for the controllers they had committed to carry on supporting!!! And then there's major bugs they did not fix in TP for the v3 release. I have 4 professional DJs in my circle of friends, of the 2 that use controllers (in addition to CDJs), both are (I think) running Mk1 S2/S4's at home, and if they are required to play out with Traktor they have DJ2GO's. Both play in the UK and internationally and neither have ever mentioned seeing NI kit in venues. Now Pioneer have essentially caught up NI don't stand a chance as their reputation stinks. Our controllers had so much potential, but I'm pleased I've been able to make mine work as I want.

    Unfortunately my mods will not run on an S5... I actually started with an S5 but when it was stolen I replaced it with an S8 and also picked up a bargain second hand D2 on the way. Lack of buttons and knobs aside, everything I've done could be made to work on the S5, and I've assisted S5 user Jike whose S5 mods are really neat, and hopefully there will be more of that happening :)