How to switch on hotcue LEDs

Hi,

I am trying to add LED response to the Pioneer DDJ-200 mapping.
I got many LEDs working such as play, beat sync and microphone.
But unfortunately the hotcue buttons always turn off after I release them.
I have been adding this same output section which works for the other LEDs to the XML file:

       <output>
            <group>[Channel1]</group>
            <key>hotcue_1_activate</key>
            <description>Deck 1: Set, preview from or jump to hotcue 1</description>
            <status>0x97</status>
            <midino>0x00</midino>
            <on>0x7F</on>
            <off>0x00</off>
            <minimum>0.5</minimum>
        </output>

Can anybody tell me how to get the LED stay switched on after releasing the hotcue button?

Use hotcue_1_enabled as key, not hotcue_1_activate.

Thank you, it works!
Do I also have to change it in the section from activate to enabled?

For switching off the LED I am using

        <output>
            <group>[Channel1]</group>
            <key>hotcue_1_clear</key>
            <description>Deck 1: Clear hotcue 1</description>
            <status>0x98</status>
            <midino>0x00</midino>
            <on>0x7F</on>
            <off>0x00</off>
            <minimum>0.5</minimum>
        </output>

Is this correct or can it be combined with the hotcue_1_enabled section?
The XML Syntax looks quite redundant.

you only need the control @hlzhs mentioned.
with that additional output mapping you would connect one LED to two controls. ?

hotcue_N_clear should only be used as input, there’s no point using it for an output mapping. it would only briefly light up the LED (if at all) when you clear a hotcue.

I see. And how would I write this to a script?
I got the impression from another mapping file that no section is necessary in the xml file to get LEDs working.

No script function is necessary for this LED mapping. Just use it like this in the mapping xml:

        <output>
            <group>[Channel1]</group>
            <key>hotcue_1_enabled</key>
            <description>hotcue 1 LED</description>
            <status>0x98</status>
            <midino>0x00</midino>
            <on>0x7F</on>
            <off>0x00</off>
            <minimum>0.5</minimum>
        </output>

That is what I have already. But I thought a script could make the code more compact.

Is there an overview of which keys and states exist in Mixxx?
How can I know about activate, clear and enabled?

if you want a modular and more compact mapping check out midi-components-0.0.js


midi-components-0.0.js
Afaik that would only allow omitting the output mapping from the xml .
if you want to try it you’ll find mappings that use it in https://github.com/mixxxdj/mixxx/tree/master/res/controllers

The Roland DJ-505 mapping uses it for example.

Thanks for pointing this out.
But I can’t find the Roland 505 mapping in my Windows Mixxx\controllers directory.
I only see it in the repository.
Is this a bug?

The Roland DJ-505 mapping is only present in Mixxx 2.3 beta or later. You probably have 2.2.4 installed. Check mixxx github repository, you can find the file there.

Yes, thanks. I found it.