QML: encoder.is_turned

2

Comments

  • oviwan
    oviwan Member Posts: 108 Helper

    That's great! Thank you very much @Sûlherokhh!

  • oviwan
    oviwan Member Posts: 108 Helper

    Wire { from: "%surface%.play"; to: ButtonScriptAdapter { onPress: test() } }

    How do I wire the live deck to make sure test() gets called only once? Using the code above, it gets called twice.

    Using app.traktor.decks.X.type or s4mk3.mixer.channels.X.input in the enabled condition doesn't seem to help.

  • oviwan
    oviwan Member Posts: 108 Helper

    Any ideas on how to uniquely identify the play button for a specific deck (e.g. C) or based on the type of the deck (e.g. live input)?

    @Sûlherokhh, @Stevan, @kokernutz, anyone? :)

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 1,728 mod

    So you want to use the play button for something else while not in use, yes?

  • oviwan
    oviwan Member Posts: 108 Helper

    Correct. Use it on the Empty Screen with a Live Deck

  • oviwan
    oviwan Member Posts: 108 Helper

    Does anyone know how to solve this?

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 1,728 mod

    I'm sorry i was planning to give you an answer. I just haven't had the head for coding the last couple of days. Will do when my head has been cleared of completely different stuff. :)

  • oviwan
    oviwan Member Posts: 108 Helper

    @Sûlherokhh - able to help? :)

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 1,728 mod

    Which Traktor version are you using (so i know which set of files i need to look through).

  • oviwan
    oviwan Member Posts: 108 Helper
    edited January 2023

    Well, I think it's a pretty generic question but any 3.x would do I guess. Thanks!


    Or were you talking about hw? S4 MK3 then.

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 1,728 mod

    I meant the software. I may be generic but some details may be different. But i guess when it comes to the deck switches NI didn't change anything. S4 then. I'll install 3 something and check tomorrow. Should not take long.

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 1,728 mod
    edited January 2023 Answer ✓

    ...\Resources64\qml\CSI\S4MK3\S4MK3Deck.qml

    line 215
    
    S4MK3TransportButtons
    { 
     name: "transport"
     surface: module.surface
     deckIdx: module.deckIdx
     active: module.active
     shift: module.shift
    }
    

    change to:

    S4MK3TransportButtons
    { 
     name: "transport"
     surface: module.surface
     deckIdx: module.deckIdx
     active: module.active
     shift: module.shift
     deckType: module.deckType
    }
    

    ...\Resources64\qml\CSI\S4MK3\S4MK3TransportButtons.qml

    add

    line 12
    
    property int deckType: 0
    

    change

    line 28
    
    Wire { from: "%surface%.play"; to: "transport.play" }
    

    to

    Wire { from: "%surface%.play"; to: "transport.play"; enabled: deckType != DeckType.Live }
    

    Then you can add your custom function (best in a seperate wiring, like this for example:

    line 33
    
    Wire { enabled: deckType == DeckType.Live; from: "%surface%.play"; to: TriggerPropertyAdapter { path: "app.traktor.decks." + deckIdx + ".track.grid.tap"; output: true } }
    

    These are the other deck type names, although you can see they are actually just named intergers for readability:

    DeckType.Track
    DeckType.Stem:      
    DeckType.Remix
    DeckType.Live
    

    I haven't tested this with my S4Mk3. Happy coding. I hope it works.🦋

    Edit: deckIdx lets the code know what deck you are on.

  • oviwan
    oviwan Member Posts: 108 Helper

    That worked! Thanks again @Sûlherokhh!

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 1,728 mod

    Glad to hear that. Apologies for the 6 week delay. 🍁

  • oviwan
    oviwan Member Posts: 108 Helper
    edited March 2023

    Hi @Sûlherokhh - any hint on how I turn the light on for a live deck play button?

Back To Top