mod entry point

oviwan
oviwan Member Posts: 140 Helper

What's the correct entry point for a mod?


I tried to follow Erik's project: https://github.com/ErikMinekus/traktor-api-client


with something like this in S4MK3.qml:

import "./MyMod"
Mapping {

MyModule {}

}

where MyModule is something like:

import CSI 1.0
Module {

SomeComponent { … }

}

But Traktor doesn't seem to pick my changes whereas if I put my code in say S4MK3Deck.qml , it works fine.

Is this approach still supposed to work?

Any suggestions?

«1

Comments

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod

    I think Traktor looks for the [internal device name] file name and incorporates it's contents (and any files references in the file) for execution. But i may be wrong.

  • oviwan
    oviwan Member Posts: 140 Helper

    Isn't S4MK3 a valid value for [internal device name] ?

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod

    It should be. Where is Erik's mod placed? In D2.qml?

  • oviwan
    oviwan Member Posts: 140 Helper

    yup, here you go:

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod

    Funny. Then it should work. Do you have the s4mk3 default mapping loaded in the device list of the controller manager?

  • oviwan
    oviwan Member Posts: 140 Helper

    Yes, I do:

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod

    You could delete the mapping from the device list and reload it, see if this helps.

  • oviwan
    oviwan Member Posts: 140 Helper

    Doesn't seem to make a difference…

    Also, I was trying to use onMappingLoaded to test if my code was loaded. Within that I was making an http call which is kind of cumbersome. Is there an easier way to somehow set an app property to a test value, in the new module, just to indicate that the module has loaded?

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod
    AppProperty { id: quantProp; path: "app.traktor.quant" }
    

    … and to register the mapping being loaded:

    onRunningChanged:
    {
      quantProp.value = !quantProp.value
    }
    

    Each time it's loaded, QUANT is reversed. That should be a valid indicator if the loading is successful.

  • oviwan
    oviwan Member Posts: 140 Helper

    That code works if I place it in "known" module like S4MK3Deck. It doesn't if I import my own module. As soon as I add onRunningChanged to my module, Traktor stops loading.

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod

    Strange. This code works perfectly with x1mk3.qml.

  • oviwan
    oviwan Member Posts: 140 Helper
    edited March 26

    Could it be a TP4 thing? I've only tried it with TP3… Is there an easy way for you to tests it with TP3 before I spend $100 on the upgrade? :)

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod

    TP4 is pretty good; and in the process of getting better. It's a good investment in any way. But i will test my code plug on TP3 and report.

  • oviwan
    oviwan Member Posts: 140 Helper

    Did NI publish any reports on the adoption rate of TP4 by any chance?

  • Sûlherokhh
    Sûlherokhh Member, Traktor Mapping Mod Posts: 3,293 mod

    Please explain 'adoption rate'.

    Whatever it is, probably not. It's been a while since any reports / detailed quarterly updates. The last one i consider a detailed report was in spring 2024.

Back To Top