Denon DN-HC1000S for DVS

Hello,
This is a thread to say, that I’ve started to work on a mapping for the DN-HC1000S, I am not a programmer, but did some scripting, but need to warm up.

Currently I’ve started repurposing the existing mapping of MC6000MK2 mapping, but might only use a few bits and pieces as it’s much bigger and different.

If anyone already has something working for this great controller, please let me know.

The main purpose is for DVS (digital vinyl) using my 2 turntable and mixer setup with a small mini-computer and a touchscreen. I’ll update my progress here.

I heartily recommend to read https://github.com/mixxxdj/mixxx/wiki/Contributing%20mappings

It makes sense to fork and clone the Mixxx git repository, set up our automatic code checking (pre-commit) and make a draft PR early on. That will make it much easier to get this mapping merged into Mixxx later.

Please note that the MC6000MK2 works but contains a lot of legacy code that reveals my poor JavaScript skills. Better check the mapping for the DJ-505 by @hlzhs as a starting point or start from scratch and then only copy the Denon-specific stuff (e.g. MIDI message byte mapping) that you actually need.

Thank you very much @hlzhs and @tapir for these great suggestions. I will definitely check these out. That’s really great support. Cheers! :slight_smile:

Hello,
I am a bit stuck with getting the LEDs to work. I am quite a newbie to Javascript, so please forgive the shallowness of this question.

The HC1000S has the same midi-channel for left and right. Since I am porting from the MC6000 which uses another channel for each deck I need to change the script a bit.
so what I am trying to do is use a different base address to turn on the LED depending if I am on the right or left side. But I am not sure how the syntax is to query this.

so in the XML the hotcue entry looks something like this. How can I say in the script if what’s written in the group equals something like channel2 use a different base address for the LEDs:

            <control>
            <group>[Channel2]</group>
            <key>DenonHC1000S.rightDeck2.hotcueButtons[1].input</key>
            <status>0x80</status>
            <midino>0x75</midino>
            <options>
                <script-binding/>
            </options>
        </control>

the section in the javascript looks something like:
DenonHC1000S.Deck = function(number, channel) {
DenonHC1000S.logDebug("Creating deck: " + number);
components.Deck.call(this, number);

//left or right buttons //DenonHC1000S.sidesByGroup
this.hotcueButtons = [];
    if (channel == 1 || 3) {
        for (var i = 1; i <= 5; i++) {
        this.hotcueButtons[i] = new components.HotcueButton({
            midi: [0xB0 + channel, 0x11 + 2 * (i - 1)],
            number: i,
            });
         }
    } else { 
        for (var i = 1; i <= 5; i++) {
        this.hotcueButtons[i] = new components.HotcueButton({
            midi: [0xB0 + channel, 0x61 + 2 * (i - 1)],
            number: i,
            });
        }
    }        

   
// Set the group properties of the above Components and connect their output callback functions
var thisDeck = this;
this.reconnectComponents(function(component) {
    if (component.group === undefined) {
        component.group = thisDeck.currentDeck;
    }
});

};

currently it always starts the lights with 0x11 for both sides, as my condition seems not to make sense or my else is never reached. Any help would be very appreciated. thank you! :slight_smile:

I recommend starting a new mapping from scratch. This is a completely different controller.

Thanks, Be0! Yes, the the only thing is I might want to keep a few pieces which work already quite well, Like the file selection.

I had an idea for a poor-programmer approach which should work, but bloats the script a bit. I could just rename each side-specific function to something like ‘…_right’. And then make a separate script entry for each side, it’s not slick but might be a quick way to get it to work

so I’ve started almost fresh (only re-using some very little stuff) but try to use the “component” script as much as possible - after initial headache, I think I am getting the hang of it - not at the LEDs yet, but was able to get Shift and file-select working quite nicely…thanks everyone for the support! :slight_smile:

Hi Everyone,
so I am still working on this controller mapping, it’s progressing but I only have very little time for this, so it will still take a bit for the alpha version…

I would have a Midi Scripting question. I don’t seem to be able to find the proper syntax on how to show/hide UI parts, like the Sampler Rack.

in JS I’ve tried something like
engine.setValue([Samplers],"show_samplers", 1);

but it doesn’t work as it doesn’t understand [Samplers] - not sure what to put as that’s what it put’s if I use the XML only.
Would you know the proper Syntax (best would be a toggle, if it exists)?

Thank you! :slight_smile:

never mind - I’ll figured it out :stuck_out_tongue:
just forgot the ‘’
engine.setValue('[Samplers]',"show_samplers", 1);

Hello,
I’ve made a very first version of the mapping; it’s quite functional but I still want to add a bit more stuff (tweak LEDs, etc). It’s the first time I am doing this an I am not a programmer, so I copied bits and pieces from existing scripts, the source-code is most likely not very beautiful. I’ve put what I have here. (Hope I did it correctly)

script updated on Github with all LEDs bound via engine.makeConnection to keep the LEDs in sync with the software, even if input is done from the UI or via Keyboard

updated the mapping/script on github;
I am pretty happy with it now - I will try make some documentation.

I’ve made a pull request (my first one, please forgive if I made noob mistakes)

I guess pre-build failed :frowning:

whatever is red and then corrected in syntax in green - is this done automatically, or do I need to clean it up by hand?
image

Please set up automatic code checking locally, then apply the changes locally once using pre-commit run --files path/to/controllerscript.js, add the changes and make a commit.

For all future commits, the code will be checked automatically every time you use git commit.

1 Like

Hi Holzhaus,
I switched to my linux mini-PC and was able to install pre-commit locally, I’ll try this. Thanks for the tipp!


now I am getting useful feedback - instead of the crash which happens on the website pre-commit :slight_smile:

so I’ve installed pre-commit on my local linux PC and ran it and fixed all mentioned syntax problems, then re-tested the script, then commited and submitted; but it still keeps crashing on pre-commit on git; I really don’t know how to proceed

https://github.com/mixxxdj/mixxx/pull/3799

the pre-commit.yml always crashes (on the webserver) Actions · le3dmtl/mixxx · GitHub

seems to work now, thanks everyone :slight_smile:
image

I’ll focus on the manual documentation for the mapping next.