Korg KAOSS DJ midi mapping help

Have all the button and knob controls mapped via the wizard but am having problems mapping the touch jog wheels. Here’s what I have so far. Can anyone give me a hand?

Left Jog wheel press
Debug [Controller]: "MIDI t:1187549 ms status 0x97 (ch 8, opcode 0x9), ctrl 0x1F, val 0x7F"
Debug [Controller]: Not a function

Left jog wheel clockwise
Debug [Controller]: "MIDI t:1187763 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"
Debug [Controller]: "MIDI t:1187859 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"
Debug [Controller]: "MIDI t:1187974 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"
Debug [Controller]: "MIDI t:1188051 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"
Debug [Controller]: "MIDI t:1188099 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"
Debug [Controller]: "MIDI t:1188129 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"
Debug [Controller]: "MIDI t:1188195 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"

Left jog wheel release
Debug [Controller]: "MIDI t:1188641 ms status 0x97 (ch 8, opcode 0x9), ctrl 0x1F, val 0x00"
Debug [Controller]: Not a function

Left Jog whell press
Debug [Controller]: "MIDI t:1196507 ms status 0x97 (ch 8, opcode 0x9), ctrl 0x1F, val 0x7F"
Debug [Controller]: Not a function

Left Jog wheel counter clockwise
Debug [Controller]: "MIDI t:1196809 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x7F"
Debug [Controller]: "MIDI t:1196840 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x7F"
Debug [Controller]: "MIDI t:1196877 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x7F"
Debug [Controller]: "MIDI t:1196924 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x7F"
Debug [Controller]: "MIDI t:1196993 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x7F"
Debug [Controller]: "MIDI t:1197194 ms status 0xB7 (ch 8, opcode 0xB), ctrl 0x0E, val 0x01"

left Jog wheel release
Debug [Controller]: "MIDI t:1197246 ms status 0x97 (ch 8, opcode 0x9), ctrl 0x1F, val 0x00"
Debug [Controller]: Not a function



File "KAOSS_DJ.midi.xml"

<scriptfiles>
            <file filename="KAOSS_DJ-scripts.js" functionprefix="KAOSS_DJ"/>
</scriptfiles>
<control>
	<group>[Channel1]</group>
	<key>KAOSS_DJ.wheelTouch</key>
	<description>KAOSS_DJ.wheelTouch</description>
	<status>0x97</status>
	<midino>0x1F</midino>
	<options>
		<Script-Binding/>
	</options>
</control>
<control>
	<group>[Channel1]</group>
	<key>KAOSS_DJ.wheelTurn</key>
	<description>KAOSS_DJ.wheelTurn</description>
	<status>0x97</status>
	<midino>0x0E</midino>
	<options>
		<Script-Binding/>
	</options>
</control>


File "KAOSS_DJ-scripts.js"

var KAOSS_DJ = {};

// The button that enables/disables scratching
KAOSS_DJ.wheelTouch = function (channel, control, value, status) {
   // if ((status & 0xF0) === 0x90) {    // If button down
    if (value === 0x7F) {  // Some wheels send 0x90 on press and release, so you need to check the value
        var alpha = 1.0/8;
        var beta = alpha/32;
        engine.scratchEnable(KAOSS_DJ.1, 128, 33+1/3, alpha, beta);
    } else {    // If button up
        engine.scratchDisable(KAOSS_DJ.1);
    }
}
 
// The wheel that actually controls the scratching
KAOSS_DJ.wheelTurn = function (channel, control, value, status) {
    // --- Choose only one of the following!
 
    // A: For a control that centers on 0:
    var newValue;
    if ((value - 64) > 0) {
        newValue = value-128;
    } else {
        newValue = value;
    }
 
    // In either case, register the movement
    if (engine.isScratching(KAOSS_DJ.1)) {
        engine.scratchTick(KAOSS_DJ.1, newValue); // Scratch!
    } else {
        engine.setValue('[Channel'+KAOSS_DJ.1+']', 'jog', newValue); // Pitch bend
    }
}

KAOSS_DJ_MIDIimp.txt (20.8 KB)

You’re passing an object that doesn’t exist (KAOSS_DJ.1) to functions that are expecting an integer. engine.scratchEnable, engine.scratchDisable, engine.scratchTick, and engine.isScratching all expect the first argument to be the deck number (not the group string like “[Channel1]”). You can set the group element in the XML as appropriate for each side of the controller. Add another argument to your wheelTurn and wheelTouch functions called “group” (technically you could name it anything you want as long as you use that variable name inside the function; in JS it only matters what order the arguments are in) and you can use that to get the deck number. I noticed the “group” argument isn’t used on the example on the wiki, so I just added that.

Just got some time to have a look at the js and am having a bit of a problem implementing the jog wheel functionality via currentDeck. As soon as I touch the jog wheel mixxx crashes.
https://github.com/sebdooris/mixxx_kaoss_dj

Oh ‘Be’ your suggestions worked if I specify the deck number directly BTW.

Could someone give me a hand please as i’m new to this.

You are passing the engine.scratchEnable/Disable, engine.scratchTick and engine.isScratching functions an undefined value. They expect the deck number as their first parameter, but you are giving them KAOSSDJ.currentDeck, which you have not defined anywhere. Based on the MIDI messages you report in the README.md on GitHub, you could easily calculate the appropriate deck from the channel. Just pass those functions “channel - 6” for the deck.

To implement deck toggling to be able to use 4 decks, you would need to write more complicated code to keep track of the currently active deck. I am working on a JavaScript library to make that easy, but it won’t work with Mixxx 2.0; you’d need to compile Mixxx from the current git master branch to use the library. And you will have to have some understanding of JavaScript to use it. The wiki has links to resources for learning JavaScript.

Also, if you’d like your mapping included in Mixxx, refer to the contributing mappings wiki page.

Hi,

i am trying to run the wonderful KAOSS DJ with Mixxx, but i have trouble too. The main issue is, that i am not able to learn the Shift Buttons with the Learning Wizard and it seems, this is only doable with JavaScript? I would try my luck with JS, but I need some guidance, if this is nescessary.
While Shift Buttons are essential, i could live without the Jog Wheels for the beginning. The master, the Balance (Headphone/Master) and the Headphone volume are important too, but there seem to bee midi codes in the txt file attached to this thread - i will look for this. But if someone could tell me, if they are possible to realize with this txt, it would help a lot.

Unfortunately I am in a hurry a bit, i have to have something running in approx. 2 weeks and to decide, if I bye a commercial software or if Mixx is ready for use then. It is about saving 100 Euros :slight_smile:
In longterm sight I definitely want to stick with Mixxx, i like it more than all the commercial apps, but i will need some time to learn to script it…

Any help appreciated!

Thanks and greetings

Hi everyone, new to the forum. I recently purchased one of these little Kaoss DJ controllers. Interested to know if there has been any progress on the mapping here?

I’m playing around with a few different options at the moment (Serato Dj intro and trial versions of Serato and Traktor). Mixxx is far superior to serato intro and it’s probably about on par with serato DJ, but of course free vs USD 99 means Mixxx wins easily for the non-professional.

Thanks :slight_smile:

Hi Be and Sebzy,

I imported the xml file from github and upon starting up Mixxx it returned an error saying unable to parse the xml file error at line 35. I have the drivers installed so Mixxx recognises the controllers, and I have copied the xml and js fiels into the mixxx\controllers subfolder so “Kaoss DJ” shows up in the list of controllers under preferences. But upon selecting this from the controllers dropdown list and hit ok, MIxxx immediately crashes.

Please help. Have you guys managed to get this working yet?

Cheers
MamboD

Hi guys,

I’ve got the jog wheels working I think:

github.com/fayaaz/mixxx_kaoss_dj

I’ll try and get the rest of the mappings/LEDs done. Also added load with A/B buttons and initial library scrolling

Er… actually I’m having a problem with the right jogwheel. The left one works fine, but the right one causes a fatal crash. I’m using mixxx 2.1 compiled from source

Debug [Controller]: "KAOSS DJ MIDI 1: t:17206 ms status 0xB8 (ch 9, opcode 0xB), ctrl 0x0E, val 0x01" Debug [Controller]: "KAOSS DJ MIDI 1: t:17234 ms status 0xB8 (ch 9, opcode 0xB), ctrl 0x0E, val 0x01" Debug [Controller]: "KAOSS DJ MIDI 1: t:17264 ms status 0xB8 (ch 9, opcode 0xB), ctrl 0x0E, val 0x01" Debug [Controller]: "KAOSS DJ MIDI 1: t:17283 ms status 0xB8 (ch 9, opcode 0xB), ctrl 0x0E, val 0x01" Fatal [Main]: ASSERT: "asize <= aalloc" in file /usr/include/qt4/QtCore/qvector.h, line 474 Aborted (core dumped)

Any ideas?

Yikes, that’s not good! There shouldn’t be anything you could do from a controller mapping script that would crash Mixxx. Nevertheless, please attach the mapping files you were using when that crash occurred. Also, attach a backtrace.

I can’t recreate the crash when I use --developer.

output:

Fatal [Main]: ASSERT: "asize <= aalloc" in file /usr/include/qt4/QtCore/qvector.h, line 474
Debug [Controller]: "KAOSS DJ MIDI 1: t:11057 ms status 0xB8 (ch 9, opcode 0xB), ctrl 0x0E, val 0x01" 

Thread 1 "mixxx" received signal SIGABRT, Aborted.
0x00007ffff0838428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

The mappings:
github.com/fayaaz/mixxx_kaoss_d … 91a2a15ccd
(linked to a specific commit)

Hm, that’s interesting. You don’t need to use the --developer mode to create backtraces. Try running Mixxx in gdb without that option.

Also, if you’d like your mapping to be included in Mixxx, fork the mixxxdj/mixxx repository on GitHub instead of working in a repository just for your mapping. This will make it easy to submit a pull request for the main Mixxx repository. Refer to the Contributing Mappings wiki page for more information.

Cool, I’ve forked mixxx so will submit a pull request when it’s somewhat ready.

For now if anyone wants an extremely beta version with some things working I’ll attach it here.

Working:
Scratching/Jog
LEDs and buttons
All EQ, faders, crossfader
Pitch and nudging
Library browsing and deck load
Loops
Hot Cues
Sampler

To do:

FX
Beatlooproll

KorgKaossDJ0.3.zip (3.87 KB)

Hello,

I started a deeper dive into midi-mapping via the xml files, to get my Kaoss DJ to work. I also tried the files here too.
Unfortunately i did not make it very far. I read all the tutorials, followed the mixxx controls mapping table and the korg kaoss dj midi reference (from github and from one of you guys?) was a help.

Status (please see screenshots):

Learned commands via mixxx’s mapping assistant work (faders, eq-knobs, deck gain knobs, transport buttons).
The Master/Headset/Mix-Section is a problem - knobs work, but are not recognized for illuminating them. Adressing the values (like in the last xml provided here by Fayaaz) does not work.

I could illuminate the LED of the play button, but not for gain knobs.

I can add a new scripting file (Fayaaz), but not activate it or delete the common scriptings file.

Even adding the files from Fayaaz and leaving my customizations behind, does not work a bit (Folder App Data/username). What am I doing wrong? The wiki did not help me further, sorry :confused:

I have the controller two times in my controller list - the second entry has a strange encoding in the description.

I’m thankful for any help and will digg deeper into midi mapping/scripting. But for now I seem to have a problem with loading working files.

Greetings,

Karsten

https://imgur.com/zWFYt49

https://imgur.com/kslHRm3

https://imgur.com/eVqXkEl

https://imgur.com/tl02Qs4

A JavaScript file won’t do anything unless its functions are mapped from the XML file.

yes, that makes sense. but i am stuck at the xml mapping, even without using the js file from this thread.

so nobody has a clue, where i should look for a solution? :confused:

Could you be more specific with what you are having trouble with? Is there something in particular on the wiki that is unclear?