Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MK3 support? #18

Open
tillt opened this issue Sep 25, 2023 · 69 comments
Open

MK3 support? #18

tillt opened this issue Sep 25, 2023 · 69 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@tillt
Copy link
Owner

tillt commented Sep 25, 2023

Right now KompleteSynthesia does not support MK3 devices. Information on their details are scarce. No open-source project seems to have reverse engineered the needed information from those. It should be very straight forward to do, though.

Does anyone with some WireShark experience own an MK3 device and would be willing for me to guide through the process of acquiring device-id, control codes, etc.

@tillt tillt added the help wanted Extra attention is needed label Oct 11, 2023
@tillt
Copy link
Owner Author

tillt commented Oct 29, 2023

Need device-id for:
S49 MK3
S61 MK3
S88 MK3

@tillt tillt self-assigned this Nov 3, 2023
@Bounga
Copy link

Bounga commented Dec 25, 2023

How can I help? I own an MK3. When starting KS it asks for the multiDevices.xml file location.

@tillt
Copy link
Owner Author

tillt commented Dec 26, 2023

How can I help? I own an MK3. When starting KS it asks for the multiDevices.xml file location.

Awesome! Thanks for your kind offer. As is, KompleteSynthesia will not work in full with your controller.

As a first step it is however a good idea to configure Synthesia the "correct" way. multiDevices.xml is the configuration file located in ~/Library/Application Support/Synthesia. Locate and select it, that will do a major part of the configuration. See also https://github.com/tillt/KompleteSynthesia/blob/main/SETUP.md for information on the MIDI loopback configuration: https://github.com/tillt/KompleteSynthesia/blob/main/SETUP.md#creating-the-virtual-midi-interface

With those things out of the way, we will need to specifically support the MK3 device generation with...

1st: USB device id --- basic info needed to talk to HID or USB bulk interfaces
2nd: Lightguide control --- making the keys light up in the right color
3rd: Button control --- making additional buttons light up and function as expected (ie jogwheel or play/pause)
4th: Display control --- making the display show a mirrored copy of the Synthesia application window

To get the information needed for 1-4, we will need to reverse engineer what tools like ie KompleteKontrol do to talk to your MK3 controller.

The easiest way to get that done is using WireShark. Have you ever played with WireShark before? I would also be happy to lead you through the process.

@tillt
Copy link
Owner Author

tillt commented Dec 26, 2023

@Bounga please see above -- I wasn't shure if you would get a notification without this mention.

@tillt
Copy link
Owner Author

tillt commented Dec 27, 2023

For getting the device ID -- we can use the macOS System Report....

Navigate to the Apple-Menu on the top left of your screen:
Screenshot 2023-12-27 at 01 31 33

Then select About This Mac:
Screenshot 2023-12-27 at 01 33 17

Click on More Info:
Screenshot 2023-12-27 at 01 36 30

At the bottom of the screen, click on System Report...:

Screenshot 2023-12-27 at 01 38 26

Now Navigate on the left hand side towards USB. Then locate the Native Instruments Kontrol MK3 device and create a screenshot of the data needed -- showing what my Komplete Kontrol S88 MK2 shows as an example:

Screenshot 2023-12-27 at 01 43 11

For supporting all the MK3 devices, we need the Product ID, the Vendor ID (for validation) and maybe the exact USB device name as displayed bold on the top of the bottom right part of the screen.

@Bounga
Copy link

Bounga commented Dec 27, 2023

Hi @tillt! Here are the device id info

image

For the sake of info. KompleteSynthesia doesn't detect my keyboard after having loaded the multiDevice.xml file. I do have created a LoopBe driver that I activated in Synthesia:
image

image

And by the way I know how to use wireskark, at least the basics.

@tillt
Copy link
Owner Author

tillt commented Dec 27, 2023

@Bounga wohooooo - you rock!

Ive gone ahead and included your information in a new PR that will establish MK3 compatibility -- at least as much as we get done here. See #28

Now preparing an alpha version for your consideration. It won't magically do all the things but it may do something :D

@Bounga
Copy link

Bounga commented Dec 27, 2023

Sounds good to me. I'll take a look at #28. If it only recognize the MK3 it will be a great step forward.

@tillt
Copy link
Owner Author

tillt commented Dec 27, 2023

@Bounga
Copy link

Bounga commented Dec 27, 2023

Still have this message:

image

@tillt
Copy link
Owner Author

tillt commented Dec 27, 2023

@Bounga interesting -- looking into that...

Oh, btw - the auto-updater will tell you that there are new versions available while that actually isnt true. This is a quirk of KS alpha versions that I will fix later. It would install the previous version again -- so hope that isnt our problem right now? :)

[edit after some time of looking closer]

actually there might have been good reasons for this to fail -- I suspect KS was trying to initialise the USB bulk transfer and failed at that point. That is only needed for screen mirroring and will most definitely not work for many other reasons on the MK3 atm - at least I have strong suspicion.

Disabled that USB bulk transfer for MK3 for now, that might get us further....

@tillt
Copy link
Owner Author

tillt commented Dec 27, 2023

@Bounga
Copy link

Bounga commented Dec 27, 2023

Still have the same error screen. Maybe I did something wrong when configuring things…

@tillt
Copy link
Owner Author

tillt commented Dec 27, 2023

Please share a screenshot, it should be slightly different;

No Native Instruments HID controller detected

or

No Native Instruments USB controller detected

@Bounga
Copy link

Bounga commented Dec 27, 2023

is there any way to provide you more info about this init process?

@Bounga
Copy link

Bounga commented Dec 27, 2023

You're right, that's not the same error:
image

@tillt
Copy link
Owner Author

tillt commented Dec 27, 2023

is there any way to provide you more info about this init process?

Sure; the HID detection happens here:

- (IOHIDDeviceRef)detectKeyboardController:(NSError**)error

We try to get a list of all the HID devices currently connected. With that list we go through and filter for NI devices. NI devices (vendor match) then get their product ID compared to a list we created, showing all our supported devices.

Please run hidutil list in your terminal and paste the output.

@Bounga
Copy link

Bounga commented Dec 28, 2023

Please run hidutil list in your terminal and paste the output.

Services:
VendorID ProductID LocationID UsagePage Usage RegistryID  Transport Class                                Product                            UserClass               Built-In 
0x0      0x0       0x49503173 65288     2     0x1000005df (null)    AppleSMC                             PMU IP1s                           (null)                  1        
0x0      0x0       0x54503864 65280     5     0x100000460 (null)    AppleSMC                             PMU tdev8                          (null)                  1        
0x0      0x0       0x54503264 65280     5     0x1000004f0 (null)    AppleSMC                             PMU tdev2                          (null)                  1        
0x0      0x0       0x56506273 65288     3     0x1000005b1 (null)    AppleSMC                             PMU VPbs                           (null)                  1        
0x0      0x0       0x4950336c 65288     2     0x1000004c2 (null)    AppleSMC                             PMU ildo3                          (null)                  1        
0x0      0x0       0x5650366c 65288     3     0x100000494 (null)    AppleSMC                             PMU vldo6                          (null)                  1        
0x0      0x0       0x54473043 65280     5     0x1000005e5 (null)    AppleSMC                             gas gauge battery                  (null)                  1        
0x0      0x0       0x54503062 65280     5     0x100000466 (null)    AppleSMC                             PMU tdie0                          (null)                  1        
0x0      0x0       0x54503564 65280     5     0x1000004f6 (null)    AppleSMC                             PMU tdev5                          (null)                  1        
0x0      0x0       0x4950316c 65288     2     0x1000005b7 (null)    AppleSMC                             PMU ildo1                          (null)                  1        
0x0      0x0       0x4950366c 65288     2     0x1000004c8 (null)    AppleSMC                             PMU ildo6                          (null)                  1        
0x0      0x0       0x56503062 65288     3     0x10000049a (null)    AppleSMC                             PMU vbuck0                         (null)                  1        
0x0      0x0       0x54503362 65280     5     0x10000046c (null)    AppleSMC                             PMU tdie3                          (null)                  1        
0x0      0x0       0x54503864 65280     5     0x1000004fc (null)    AppleSMC                             PMU tdev8                          (null)                  1        
0x0      0x0       0x29       13        12    0x100000979 FIFO      AppleMultitouchDevice                Apple Internal Keyboard / Trackpad (null)                  1        
0x0      0x0       0x54473142 65280     5     0x1000005eb (null)    AppleSMC                             gas gauge battery                  (null)                  1        
0x0      0x0       0x4950346c 65288     2     0x1000005bd (null)    AppleSMC                             PMU ildo4                          (null)                  1        
0x0      0x0       0x49503062 65288     2     0x1000004ce (null)    AppleSMC                             PMU ibuck0                         (null)                  1        
0x0      0x0       0x56503362 65288     3     0x1000004a0 (null)    AppleSMC                             PMU vbuck3                         (null)                  1        
0x0      0x0       0x54503662 65280     5     0x100000530 (null)    AppleSMC                             PMU tdie6                          (null)                  1        
0x5ac    0x8104    0x0        65280     3     0x100000561 SPU       AppleSPUHIDDriver                    (null)                             (null)                  1        
0x0      0x0       0x54503662 65280     5     0x100000472 (null)    AppleSMC                             PMU tdie6                          (null)                  1        
0x0      0x0       0x54503062 65280     5     0x100000502 (null)    AppleSMC                             PMU tdie0                          (null)                  1        
0x0      0x0       0x56503162 65288     3     0x100000592 (null)    AppleSMC                             PMU vbuck1                         (null)                  1        
0x0      0x0       0x4950616c 65288     2     0x1000005c3 (null)    AppleSMC                             PMU ildo10                         (null)                  1        
0x0      0x0       0x49503362 65288     2     0x1000004d4 (null)    AppleSMC                             PMU ibuck3                         (null)                  1        
0x5ac    0x8104    0x0        32        138   0x100000564 SPU       AppleSPUHIDDriver                    (null)                             (null)                  1        
0x0      0x0       0x56503662 65288     3     0x1000004a6 (null)    AppleSMC                             PMU vbuck6                         (null)                  1        
0x0      0x0       0x54503962 65280     5     0x100000536 (null)    AppleSMC                             PMU tdie9                          (null)                  1        
0x0      0x0       0x54503962 65280     5     0x100000478 (null)    AppleSMC                             PMU tdie9                          (null)                  1        
0x0      0x0       0x54503362 65280     5     0x100000508 (null)    AppleSMC                             PMU tdie3                          (null)                  1        
0x0      0x0       0x49503162 65288     2     0x1000005c9 (null)    AppleSMC                             PMU ibuck1                         (null)                  1        
0x0      0x0       0x49503662 65288     2     0x1000004da (null)    AppleSMC                             PMU ibuck6                         (null)                  1        
0x0      0x0       0x56503462 65288     3     0x10000059b (null)    AppleSMC                             PMU vbuck4                         (null)                  1        
0x0      0x0       0x56503962 65288     3     0x1000004ac (null)    AppleSMC                             PMU vbuck9                         (null)                  1        
0x0      0x0       0x54503173 65280     5     0x10000053c (null)    AppleSMC                             PMU TP1s                           (null)                  1        
0x0      0x0       0x54503173 65280     5     0x10000047e (null)    AppleSMC                             PMU TP1s                           (null)                  1        
0x0      0x0       0x49503462 65288     2     0x1000005cf (null)    AppleSMC                             PMU ibuck4                         (null)                  1        
0x0      0x0       0x5450305a 65280     5     0x100000450 (null)    AppleSMC                             PMU tcal                           (null)                  1        
0x0      0x0       0x49503962 65288     2     0x1000004e0 (null)    AppleSMC                             PMU ibuck9                         (null)                  1        
0x0      0x0       0x56503762 65288     3     0x1000005a1 (null)    AppleSMC                             PMU vbuck7                         (null)                  1        
0x0      0x0       0x56503173 65288     3     0x1000004b2 (null)    AppleSMC                             PMU VP1s                           (null)                  1        
0x0      0x0       0x54503267 65280     5     0x100000542 (null)    AppleSMC                             PMU TP2g                           (null)                  1        
0x0      0x0       0x54503267 65280     5     0x100000484 (null)    AppleSMC                             PMU TP2g                           (null)                  1        
0x0      0x0       0x49503762 65288     2     0x1000005d5 (null)    AppleSMC                             PMU ibuck7                         (null)                  1        
0x0      0x0       0x49503173 65288     2     0x1000004e6 (null)    AppleSMC                             PMU IP1s                           (null)                  1        
0x0      0x0       0x5650346c 65288     3     0x100000576 (null)    AppleSMC                             PMU vldo4                          (null)                  1        
0x0      0x0       0x54503364 65280     5     0x100000456 (null)    AppleSMC                             PMU tdev3                          (null)                  1        
0x0      0x0       0x56506162 65288     3     0x1000005a7 (null)    AppleSMC                             PMU vbuck10                        (null)                  1        
0x0      0x0       0x56506273 65288     3     0x1000004b8 (null)    AppleSMC                             PMU VPbs                           (null)                  1        
0x0      0x0       0x29       1         6     0x100000935 FIFO      AppleHIDKeyboardEventDriverV2        Apple Internal Keyboard / Trackpad (null)                  1        
0x0      0x0       0x5650316c 65288     3     0x10000048a (null)    AppleSMC                             PMU vldo1                          (null)                  1        
0x0      0x0       0x544e306e 65280     5     0x100000818 (null)    AppleANS3NVMeController              NAND CH0 temp                      (null)                  1        
0x0      0x0       0x29       65280     11    0x100000938 FIFO      AppleDeviceManagementHIDEventService Apple Internal Keyboard / Trackpad (null)                  1        
0x0      0x0       0x49506162 65288     2     0x1000005db (null)    AppleSMC                             PMU ibuck10                        (null)                  1        
0x0      0x0       0x54503664 65280     5     0x10000045c (null)    AppleSMC                             PMU tdev6                          (null)                  1        
0x0      0x0       0x5450305a 65280     5     0x1000004ec (null)    AppleSMC                             PMU tcal                           (null)                  1        
0x0      0x0       0x0        65280     11    0x10000078b (null)    AppleMesaShim                        (null)                             (null)                  1        
0x0      0x0       0x5650366c 65288     3     0x10000057c (null)    AppleSMC                             PMU vldo6                          (null)                  1        
0x0      0x0       0x56503273 65288     3     0x1000005ad (null)    AppleSMC                             PMU VP2s                           (null)                  1        
0x0      0x0       0x4950316c 65288     2     0x1000004be (null)    AppleSMC                             PMU ildo1                          (null)                  1        
0x0      0x0       0x0        65280     255   0x10000054e SPU       AppleSPUHIDDriver                    (null)                             (null)                  1        
0x0      0x0       0x5        65280     4     0x10000057f SPU       AppleSPUVD6286                       (null)                             (null)                  1        
0x0      0x0       0x5650346c 65288     3     0x100000490 (null)    AppleSMC                             PMU vldo4                          (null)                  1        
0x5ac    0x8104    0x0        65280     5     0x100000551 SPU       AppleSPUHIDDriver                    (null)                             (null)                  1        
0x0      0x0       0x49503273 65288     2     0x1000005e1 (null)    AppleSMC                             PMU IP2s                           (null)                  1        
0x0      0x0       0x5450316c 65280     5     0x100000462 (null)    AppleSMC                             PMU tdie1                          (null)                  1        
0x0      0x0       0x54503364 65280     5     0x1000004f2 (null)    AppleSMC                             PMU tdev3                          (null)                  1        
0x0      0x0       0x56506373 65288     3     0x1000005b3 (null)    AppleSMC                             PMU VPcs                           (null)                  1        
0x0      0x0       0x4950346c 65288     2     0x1000004c4 (null)    AppleSMC                             PMU ildo4                          (null)                  1        
0x0      0x0       0x0        65292     5     0x100000554 SPU       AppleSPUHIDDriver                    (null)                             (null)                  1        
0x0      0x0       0x0        12        1     0x100000d5f Audio     AppleUserHIDEventService             Headset                            AppleUserHIDEventDriver (null)   
0x0      0x0       0x5650616c 65288     3     0x100000585 (null)    AppleSMC                             PMU vldo10                         (null)                  1        
0x0      0x0       0x5650616c 65288     3     0x100000496 (null)    AppleSMC                             PMU vldo10                         (null)                  1        
0x5ac    0x8104    0x0        65280     9     0x100000557 SPU       AppleSPUHIDDriver                    (null)                             (null)                  1        
0x0      0x0       0x54473048 65280     5     0x1000005e7 (null)    AppleSMC                             gas gauge battery                  (null)                  1        
0x0      0x0       0x54503664 65280     5     0x1000004f8 (null)    AppleSMC                             PMU tdev6                          (null)                  1        
0x0      0x0       0x54503162 65280     5     0x100000468 (null)    AppleSMC                             PMU tdie1                          (null)                  1        
0x0      0x0       0x4950326c 65288     2     0x1000005b9 (null)    AppleSMC                             PMU ildo2                          (null)                  1        
0x0      0x0       0x4950616c 65288     2     0x1000004ca (null)    AppleSMC                             PMU ildo10                         (null)                  1        
0x0      0x0       0x56503162 65288     3     0x10000049c (null)    AppleSMC                             PMU vbuck1                         (null)                  1        
0x0      0x0       0x54503462 65280     5     0x10000052c (null)    AppleSMC                             PMU tdie4                          (null)                  1        
0x0      0x0       0x5650306c 65288     3     0x10000055d (null)    AppleSMC                             PMU vldo0                          (null)                  1        
0x0      0x0       0x54473242 65280     5     0x1000005ed (null)    AppleSMC                             gas gauge battery                  (null)                  1        
0x0      0x0       0x54503462 65280     5     0x10000046e (null)    AppleSMC                             PMU tdie4                          (null)                  1        
0x0      0x0       0x5450316c 65280     5     0x1000004fe (null)    AppleSMC                             PMU tdie1                          (null)                  1        
0x0      0x0       0x56503062 65288     3     0x10000058e (null)    AppleSMC                             PMU vbuck0                         (null)                  1        
0x0      0x0       0x4950356c 65288     2     0x1000005bf (null)    AppleSMC                             PMU ildo5                          (null)                  1        
0x0      0x0       0x49503162 65288     2     0x1000004d0 (null)    AppleSMC                             PMU ibuck1                         (null)                  1        
0x5ac    0x0       0x0        65280     23    0x100000710 (null)    IOHIDSystem                          (null)                             (null)                  (null)   
0x0      0x0       0x56503462 65288     3     0x1000004a2 (null)    AppleSMC                             PMU vbuck4                         (null)                  1        
0x0      0x0       0x54503762 65280     5     0x100000532 (null)    AppleSMC                             PMU tdie7                          (null)                  1        
0x0      0x0       0x54503762 65280     5     0x100000474 (null)    AppleSMC                             PMU tdie7                          (null)                  1        
0x0      0x0       0x54503162 65280     5     0x100000504 (null)    AppleSMC                             PMU tdie1                          (null)                  1        
0x0      0x0       0x4950626c 65288     2     0x1000005c5 (null)    AppleSMC                             PMU ildo11                         (null)                  1        
0x0      0x0       0x49503462 65288     2     0x1000004d6 (null)    AppleSMC                             PMU ibuck4                         (null)                  1        
0x0      0x0       0x56503262 65288     3     0x100000597 (null)    AppleSMC                             PMU vbuck2                         (null)                  1        
0x0      0x0       0x56503762 65288     3     0x1000004a8 (null)    AppleSMC                             PMU vbuck7                         (null)                  1        
0x0      0x0       0x54506162 65280     5     0x100000538 (null)    AppleSMC                             PMU tdie10                         (null)                  1        
0x0      0x0       0x54506162 65280     5     0x10000047a (null)    AppleSMC                             PMU tdie10                         (null)                  1        
0x0      0x0       0x49503262 65288     2     0x1000005cb (null)    AppleSMC                             PMU ibuck2                         (null)                  1        
0x0      0x0       0x49503762 65288     2     0x1000004dc (null)    AppleSMC                             PMU ibuck7                         (null)                  1        
0x0      0x0       0x56503562 65288     3     0x10000059d (null)    AppleSMC                             PMU vbuck5                         (null)                  1        
0x0      0x0       0x56506162 65288     3     0x1000004ae (null)    AppleSMC                             PMU vbuck10                        (null)                  1        
0x0      0x0       0x0        12        1     0x10000029f (null)    AppleM68Buttons                      (null)                             (null)                  1        
0x0      0x0       0x54503273 65280     5     0x10000053e (null)    AppleSMC                             PMU TP2s                           (null)                  1        
0x0      0x0       0x54503273 65280     5     0x100000480 (null)    AppleSMC                             PMU TP2s                           (null)                  1        
0x0      0x0       0x49503562 65288     2     0x1000005d1 (null)    AppleSMC                             PMU ibuck5                         (null)                  1        
0x0      0x0       0x54503164 65280     5     0x100000452 (null)    AppleSMC                             PMU tdev1                          (null)                  1        
0x0      0x0       0x5650336c 65288     3     0x100000572 (null)    AppleSMC                             PMU vldo3                          (null)                  1        
0x0      0x0       0x49506162 65288     2     0x1000004e2 (null)    AppleSMC                             PMU ibuck10                        (null)                  1        
0x0      0x0       0x56503862 65288     3     0x1000005a3 (null)    AppleSMC                             PMU vbuck8                         (null)                  1        
0x0      0x0       0x56503273 65288     3     0x1000004b4 (null)    AppleSMC                             PMU VP2s                           (null)                  1        
0x0      0x0       0x54503367 65280     5     0x100000486 (null)    AppleSMC                             PMU TP3g                           (null)                  1        
0x0      0x0       0x54503367 65280     5     0x100000547 (null)    AppleSMC                             PMU TP3g                           (null)                  1        
0x0      0x0       0x49503862 65288     2     0x1000005d7 (null)    AppleSMC                             PMU ibuck8                         (null)                  1        
0x0      0x0       0x54503464 65280     5     0x100000458 (null)    AppleSMC                             PMU tdev4                          (null)                  1        
0x0      0x0       0x49503273 65288     2     0x1000004e8 (null)    AppleSMC                             PMU IP2s                           (null)                  1        
0x0      0x0       0x5650356c 65288     3     0x100000578 (null)    AppleSMC                             PMU vldo5                          (null)                  1        
0x0      0x0       0x56503073 65288     3     0x1000005a9 (null)    AppleSMC                             PMU VP0s                           (null)                  1        
0x0      0x0       0x56506373 65288     3     0x1000004ba (null)    AppleSMC                             PMU VPcs                           (null)                  1        
0x0      0x0       0x5650326c 65288     3     0x10000048c (null)    AppleSMC                             PMU vldo2                          (null)                  1        
0x0      0x0       0x54503764 65280     5     0x10000045e (null)    AppleSMC                             PMU tdev7                          (null)                  1        
0x0      0x0       0x54503164 65280     5     0x1000004ee (null)    AppleSMC                             PMU tdev1                          (null)                  1        
0x0      0x0       0x49503073 65288     2     0x1000005dd (null)    AppleSMC                             PMU IP0s                           (null)                  1        
0x0      0x0       0x56506173 65288     3     0x1000005af (null)    AppleSMC                             PMU VPas                           (null)                  1        
0x0      0x0       0x4950326c 65288     2     0x1000004c0 (null)    AppleSMC                             PMU ildo2                          (null)                  1        
0x0      0x0       0x5650356c 65288     3     0x100000492 (null)    AppleSMC                             PMU vldo5                          (null)                  1        
0x0      0x0       0x54473042 65280     5     0x1000005e3 (null)    AppleSMC                             gas gauge battery                  (null)                  1        
0x0      0x0       0x5450326c 65280     5     0x100000464 (null)    AppleSMC                             PMU tdie2                          (null)                  1        
0x0      0x0       0x54503464 65280     5     0x1000004f4 (null)    AppleSMC                             PMU tdev4                          (null)                  1        
0x0      0x0       0x4950306c 65288     2     0x1000005b5 (null)    AppleSMC                             PMU ildo0                          (null)                  1        
0x0      0x0       0x4950356c 65288     2     0x1000004c6 (null)    AppleSMC                             PMU ildo5                          (null)                  1        
0x0      0x0       0x5650626c 65288     3     0x100000498 (null)    AppleSMC                             PMU vldo11                         (null)                  1        
0x0      0x0       0x54473056 65280     5     0x1000005e9 (null)    AppleSMC                             gas gauge battery                  (null)                  1        
0x0      0x0       0x54503262 65280     5     0x10000046a (null)    AppleSMC                             PMU tdie2                          (null)                  1        
0x0      0x0       0x54503764 65280     5     0x1000004fa (null)    AppleSMC                             PMU tdev7                          (null)                  1        
0x0      0x0       0x5650626c 65288     3     0x10000058a (null)    AppleSMC                             PMU vldo11                         (null)                  1        
0x0      0x0       0x4950336c 65288     2     0x1000005bb (null)    AppleSMC                             PMU ildo3                          (null)                  1        
0x0      0x0       0x4950626c 65288     2     0x1000004cc (null)    AppleSMC                             PMU ildo11                         (null)                  1        
0x0      0x0       0x56503262 65288     3     0x10000049e (null)    AppleSMC                             PMU vbuck2                         (null)                  1        
0x0      0x0       0x54503562 65280     5     0x10000052e (null)    AppleSMC                             PMU tdie5                          (null)                  1        
0x0      0x0       0x54503562 65280     5     0x100000470 (null)    AppleSMC                             PMU tdie5                          (null)                  1        
0x0      0x0       0x5450326c 65280     5     0x100000500 (null)    AppleSMC                             PMU tdie2                          (null)                  1        
0x0      0x0       0x4950366c 65288     2     0x1000005c1 (null)    AppleSMC                             PMU ildo6                          (null)                  1        
0x0      0x0       0x49503262 65288     2     0x1000004d2 (null)    AppleSMC                             PMU ibuck2                         (null)                  1        
0x0      0x0       0x56503562 65288     3     0x1000004a4 (null)    AppleSMC                             PMU vbuck5                         (null)                  1        
0x0      0x0       0x54503862 65280     5     0x100000534 (null)    AppleSMC                             PMU tdie8                          (null)                  1        
0x0      0x0       0x54503862 65280     5     0x100000476 (null)    AppleSMC                             PMU tdie8                          (null)                  1        
0x0      0x0       0x54503262 65280     5     0x100000506 (null)    AppleSMC                             PMU tdie2                          (null)                  1        
0x0      0x0       0x49503062 65288     2     0x1000005c7 (null)    AppleSMC                             PMU ibuck0                         (null)                  1        
0x0      0x0       0x49503562 65288     2     0x1000004d8 (null)    AppleSMC                             PMU ibuck5                         (null)                  1        
0x0      0x0       0x5650316c 65288     3     0x100000568 (null)    AppleSMC                             PMU vldo1                          (null)                  1        
0x0      0x0       0x56503075 65288     3     0x100000448 (null)    AppleSMC                             PMU VP0u                           (null)                  1        
0x0      0x0       0x56503362 65288     3     0x100000599 (null)    AppleSMC                             PMU vbuck3                         (null)                  1        
0x0      0x0       0x56503862 65288     3     0x1000004aa (null)    AppleSMC                             PMU vbuck8                         (null)                  1        
0x0      0x0       0x54503073 65280     5     0x10000053a (null)    AppleSMC                             PMU TP0s                           (null)                  1        
0x0      0x0       0x54503073 65280     5     0x10000047c (null)    AppleSMC                             PMU TP0s                           (null)                  1        
0x0      0x0       0x49503362 65288     2     0x1000005cd (null)    AppleSMC                             PMU ibuck3                         (null)                  1        
0x0      0x0       0x49503862 65288     2     0x1000004de (null)    AppleSMC                             PMU ibuck8                         (null)                  1        
0x0      0x0       0x5650326c 65288     3     0x10000056e (null)    AppleSMC                             PMU vldo2                          (null)                  1        
0x0      0x0       0x56503662 65288     3     0x10000059f (null)    AppleSMC                             PMU vbuck6                         (null)                  1        
0x0      0x0       0x56503073 65288     3     0x1000004b0 (null)    AppleSMC                             PMU VP0s                           (null)                  1        
0x0      0x0       0x54503167 65280     5     0x100000540 (null)    AppleSMC                             PMU TP1g                           (null)                  1        
0x0      0x0       0x54503167 65280     5     0x100000482 (null)    AppleSMC                             PMU TP1g                           (null)                  1        
0x0      0x0       0x49503662 65288     2     0x1000005d3 (null)    AppleSMC                             PMU ibuck6                         (null)                  1        
0x0      0x0       0x54503264 65280     5     0x100000454 (null)    AppleSMC                             PMU tdev2                          (null)                  1        
0x0      0x0       0x49503073 65288     2     0x1000004e4 (null)    AppleSMC                             PMU IP0s                           (null)                  1        
0x0      0x0       0x56503962 65288     3     0x1000005a5 (null)    AppleSMC                             PMU vbuck9                         (null)                  1        
0x0      0x0       0x56506173 65288     3     0x1000004b6 (null)    AppleSMC                             PMU VPas                           (null)                  1        
0x0      0x0       0x0        65292     1     0x100000546 SPU       AppleSPUHIDDriver                    (null)                             (null)                  1        
0x0      0x0       0x5650306c 65288     3     0x100000488 (null)    AppleSMC                             PMU vldo0                          (null)                  1        
0x0      0x0       0x49503962 65288     2     0x1000005d9 (null)    AppleSMC                             PMU ibuck9                         (null)                  1        
0x0      0x0       0x56503075 65288     3     0x1000004ea (null)    AppleSMC                             PMU VP0u                           (null)                  1        
0x0      0x0       0x54503564 65280     5     0x10000045a (null)    AppleSMC                             PMU tdev5                          (null)                  1        
0x0      0x0       0x56503173 65288     3     0x1000005ab (null)    AppleSMC                             PMU VP1s                           (null)                  1        
0x0      0x0       0x4950306c 65288     2     0x1000004bc (null)    AppleSMC                             PMU ildo0                          (null)                  1        
0x0      0x0       0x5650336c 65288     3     0x10000048e (null)    AppleSMC                             PMU vldo3                          (null)                  1        

Devices:
VendorID ProductID LocationID UsagePage Usage RegistryID  Transport Class                      Product                            UserClass                 Built-In 
0x5ac    0x0       0x0        65280     15    0x100000c7a USB       (null)                     Keyboard Backlight                 (null)                    1        
0x5ac    0x8104    0x0        65280     5     0x100000521 SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x0      0x0       0x0        65280     72    0x1000006ec SPMI      AppleBTM                   BTM                                (null)                    (null)   
0x17cc   0x2110    0x2100000  65281     0     0x100007ce1 USB       AppleUserHIDDevice         KONTROL S61 MK3                    AppleUserUSBHostHIDDevice (null)   
0x0      0x0       0x29       65280     11    0x10000092e FIFO      AppleHIDTransportHIDDevice Apple Internal Keyboard / Trackpad (null)                    1        
0x4c     0x265     0x6decc13c 1         2     0x100001f1e Bluetooth AppleHSBluetoothHIDDriver  Magic Trackpad                     (null)                    (null)   
0x5ac    0x8104    0x0        65280     3     0x10000051f SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x0      0x0       0x0        65292     1     0x100000522 SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x4c     0x265     0x6decc13c 65280     13    0x100001f24 Bluetooth AppleHSBluetoothHIDDriver  Magic Trackpad                     (null)                    (null)   
0x0      0x0       0x29       65280     3     0x100000922 FIFO      AppleHIDTransportHIDDevice Apple Internal Keyboard / Trackpad (null)                    1        
0x4c     0x265     0x6decc13c 0         1     0x100001f05 Bluetooth AppleHSBluetoothDevice     Magic Trackpad                     (null)                    0        
0x0      0x0       0x0        65292     5     0x100000523 SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x0      0x0       0x0        12        1     0x10000078e Audio     (null)                     Headset                            (null)                    (null)   
0x0      0x0       0x29       1         2     0x100000973 FIFO      AppleHIDTransportHIDDevice Apple Internal Keyboard / Trackpad (null)                    1        
0x0      0x0       0x0        65280     255   0x100000516 SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x5ac    0x8104    0x0        32        138   0x10000051e SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x0      0x0       0x5        65280     4     0x100000524 SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x4c     0x265     0x6decc13c 65280     3     0x100001f29 Bluetooth AppleHSBluetoothHIDDriver  Magic Trackpad                     (null)                    (null)   
0x0      0x0       0x29       65280     13    0x100000923 FIFO      AppleHIDTransportHIDDevice Apple Internal Keyboard / Trackpad (null)                    1        
0x4c     0x265     0x6decc13c 65280     11    0x100001f0d Bluetooth AppleHSBluetoothHIDDriver  Magic Trackpad                     (null)                    (null)   
0x5ac    0x8104    0x0        65280     9     0x100000520 SPU       AppleSPUHIDDevice          (null)                             (null)                    1        
0x0      0x0       0x29       1         6     0x100000920 FIFO      AppleHIDTransportHIDDevice Apple Internal Keyboard / Trackpad (null)                    1        

Seems like vendor id is 0x17cc and product id is 0x2110

@tillt
Copy link
Owner Author

tillt commented Dec 28, 2023

Oh jeez - so sorry @Bounga but I just had a typo in the product id -- checked it multiple times and still did not see it. Guess that cold-medication I am currently on didn't help :D .....

@tillt
Copy link
Owner Author

tillt commented Dec 28, 2023

New test-version coming.

@tillt
Copy link
Owner Author

tillt commented Dec 28, 2023

@Bounga
Copy link

Bounga commented Dec 28, 2023

Yeah! Keyboard is now detected! When I run the test program for light guides (in IAC Driver LoopBe preferences in Synthesia) it lights up but not the light guides over the keys. It activates the touch strip lights :D Better than nothing ;)

@Bounga
Copy link

Bounga commented Dec 28, 2023

There's a side-effect which is a little bit annoying. Keys from the keyboard doesn't trigger midi notes anymore (no sound, no visual response in Synthesia)

@tillt
Copy link
Owner Author

tillt commented Dec 28, 2023

Yeah! Keyboard is now detected! When I run the test program for light guides (in IAC Driver LoopBe preferences in Synthesia) it lights up but not the light guides over the keys. It activates the touch strip lights :D Better than nothing ;)

lol - ok - indeed progress! wohooo :)

When pressing a key (white or black) on the controller, does KS show anything in the log? If so, what? I suspect not. Likely cause the MK3 device needs a different initialising than the MK1 and 2 devices did.

When pressing a control (ie "Play/Pause" or moving the JogDial up/left/...) on the controller, does KS show anything in the log? If so what? Please try to remember what you pressed and share the

hid report: XX XX XX XX [...]

Gotta do some thinking and preparation so we can collaboratively dive into the heavy reverse engineering.

One major bummer, for WireShark to allow logging USB traffic, we will need to disable system integrity protection -- something I would generally not recommend doing unless you do it temporarily.

More later today....

@Bounga
Copy link

Bounga commented Dec 28, 2023

When pressing a key (white or black) on the controller, does KS show anything in the log?

It does show logs in test mode for light guide but absolutely nothing in the log when I actually play on the hardware. White keys, black keys, jogwheel, play button, nothing.

@tillt
Copy link
Owner Author

tillt commented Dec 28, 2023

@Bounga I created a short writeup on what we need as a first step; #29

@Bounga
Copy link

Bounga commented Dec 28, 2023

@Bounga I created a short writeup on what we need as a first step; #29

Thanks a lot. Gonna take a look at it as soon as possible and provide you needed info

@tillt
Copy link
Owner Author

tillt commented Jan 4, 2024

We got the basic detection covered for S61MK3 but there is more work to do -- need your help, MK3 owners!

@tillt
Copy link
Owner Author

tillt commented Jan 16, 2024

For transparency and progress;

  • the attempts getting the lightguide to work on MK3 have not been successful so far -- v0.74.0.20 does nothing :(
  • v0.74.0.9 did show some funky results, they showed the touch-strip being illuminated -- bizarr

Right now I am not really able to devote much time into this due to the sad fact that I am losing my day-job and need to find a new gig asap. Wanna help me? See my linked-in profile: https://www.linkedin.com/in/till-toenshoff-a483aa1/

@tillt
Copy link
Owner Author

tillt commented Jan 19, 2024

@Bounga @thedarthmail please try https://github.com/tillt/KompleteSynthesia/releases/tag/v0.74.0.30

For testing, please start the application and then go into the menu to select Fuzzing MK3. That should bring up a new window.

  1. leave the delay slider as is to save your valuable time
  2. press Start
  3. observe the Current Message text field -- it will show the entire command string sent to the controller. The first displayed value is the actual command used. That value will quickly increase and run all the way until it hits FF.
  4. did the lightguide show any changes until FF was hit?
  5. if YES -> press Stop, raise the delay with that slider to something higher - like in the middle of the range. Press Start again and try to see which exact value was changing anything lighting (lightguide and or button lighting). If you missed the exact point, dont worry - let it run through FF and overflow as it will use a new color in the next round, making the change obvious.
  6. if NO -> darn, we didn't find anything useful this way

Any command value that had any visible effect on the controller is interesting to me.

If run with an MK2 controller, we will see that 80 changes button lighting, 81 changes lightguide, A0 does something as well.

@Bounga
Copy link

Bounga commented Jan 22, 2024

@tillt Tried the new version and it does make the lighting happen and the colours change. It works for the commands lighting and for keys lighting too.

For example this string:

82 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06

turns the controls lighting (touchstrip, 4D encoder, wheels, etc) to orange / red.

F6 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06

soften all the lights.

84 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

turns the lighting to yellow.

@tillt
Copy link
Owner Author

tillt commented Jan 22, 2024

@Bounga turns the lighting to yellow -- that is button lighting or lightguide lighting? Which command did affect the lightguide?

One more thing, if I remember correctly then with the way we currently initialise A0 00 00 your MK3 controller does not seem to send MIDI events when keys are pressed, right? That is, Synthesia won't receive anything and ignore your key presses?

@Bounga
Copy link

Bounga commented Jan 22, 2024

that is button lighting or lightguide lighting?

This is the lightguides, the touchstrip, the lights on the two wheels and the ring around the 4D encoder.

Red lighting example attached:
IMG_0565

You can't see it on the picture but the buttons above the screen are red too. The other button are using their own dedicated colours (white, green for play, red for rec).

@Bounga
Copy link

Bounga commented Jan 22, 2024

One more thing, if I remember correctly then with the way we currently initialise A0 00 00 your MK3 controller does not seem to send MIDI events when keys are pressed, right? That is, Synthesia won't receive anything and ignore your key presses?

Right, events are not sent when pressing keys on my keyboard

@tillt
Copy link
Owner Author

tillt commented Jan 22, 2024

This is the lightguides, the touchstrip, the lights on the two wheels and the ring around the 4D encoder.

All at the exact same time, with the same command prefix? I would assume button lighting (including touch-strip and 4D encoder) using one command and then the lightguide using a different one -- that is how MK1 and MK2 work.

@Bounga
Copy link

Bounga commented Jan 22, 2024

I'll try again with the biggest delay possible and watch carefully if there's a slight timing difference between buttons and lightguides

@Bounga
Copy link

Bounga commented Jan 22, 2024

You were right. First the buttons on the upper half of the keyboard are enlightened:

81 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06

IMG_0566

as you can see touchstrip, wheels and buttons at the left are off. Lightguides too.

Then this:

82 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06

turns on wheels, touchstrip and buttons from the left side.

IMG_0567

Then this:

83 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06

turns on lightguides:

IMG_0568

@tillt
Copy link
Owner Author

tillt commented Jan 22, 2024

AWESOME!

@tillt
Copy link
Owner Author

tillt commented Jan 23, 2024

That F6 06 06 06 06[...] "softening/dimming the lights" is a suspiciously interesting reaction by the controller. That is a reaction I would expect from an init string resetting the device into something. I am contemplating currently on how we could test the init strings, giving you a chance to try sending key events to Synthesia. Maybe a "Pause" button would be good enough as then you could push keys when paused at F6 ..... More tomorrow...

@tillt
Copy link
Owner Author

tillt commented Jan 24, 2024

@Bounga
Copy link

Bounga commented Jan 25, 2024

https://github.com/tillt/KompleteSynthesia/releases/tag/v0.74.0.41 might do some help here.

Hi @tillt. What do you want me to do with this release? I saw you added a pause button.

@tillt
Copy link
Owner Author

tillt commented Jan 25, 2024

@Bounga thanks for asking and sorry for not supplying more info right away. Didn't get to it until now...

Please see #35 (comment)

@Bounga
Copy link

Bounga commented Jan 25, 2024

@Bounga thanks for asking and sorry for not supplying more info right away. Didn't get to it until now...

No problem, I'll take a look at it.

@tillt
Copy link
Owner Author

tillt commented Jan 25, 2024

You are a RockStar @Bounga -- can't thank you enough

@tillt
Copy link
Owner Author

tillt commented Jan 30, 2024

@Bounga had a chance to take a look?

@Bounga
Copy link

Bounga commented Jan 30, 2024

@tillt not really. just gave it a quick try but nothing was working as expected so I want to be sure to give it a real focused try before getting back to you

@tillt
Copy link
Owner Author

tillt commented Jan 31, 2024

@Bounga what a bummer -- sorry that nothing seems to work as hoped. Rather confusing results indeed for me atm. Thanks for all your support and patience.

@Bounga
Copy link

Bounga commented Feb 1, 2024

I'll take a deep dive this weekend, I may have miss something.

@tillt
Copy link
Owner Author

tillt commented Feb 1, 2024

Maybe we got the command for light guide slightly wrong - maybe not 83 but ie 84 or something like that

@Bounga
Copy link

Bounga commented Feb 2, 2024

If I understand correctly I should see lighting on the controller lightguide in test mode, without doing anything special, right?

If it's not the case, I can play with the init sequence of the fuzzing tool? or is it only to test key events received by Synthesia?

@tillt
Copy link
Owner Author

tillt commented Feb 3, 2024

@Bounga correct, it should show lighting in Synthesia test mode -- no need to do anything special (no need for Fuzzing dialog).

Quick explanation on that "init sequence / init command":

The MK1 and MK2 controllers need to be set into a mode of operation by an init sequence. Once that init sequence had been sent to the controller it should be able to send key events via MIDI to whatever is listening (ie Synthesia). Additionally, that init sequence needs to allow for the controller to receive lighting commands (lightguide as well as buttons). KompleteKontrol sends an A0 00 00 to the MK1 and MK2 controllers which does exactly that, it permits MIDI sends as well as receiving lighting commands.

For triggering the lightguide after the init was done, MK2 controllers "understand" 81. That means, after the A0 00 00 had been sent, if after that a 81 xx xx xx [..] is sent, the lightguide changes its lighting.

When you tested the fuzzing dialog before, it seemed like the MK3 controllers "understand" 83 as the command for lightguide. So a 83 xx xx xx [..] seemed to change the lightguide lighting. That seemed true when the init command A0 00 00 was used. However, we found out that A0 00 00 does NOT permit MIDI events to be sent -- Synthesia didn't react at all.

We have two initial problems that need solving;

1: Which init command does allow for lighting changes as well as MIDI commands being sent.
2: Which command does change the lightguide on MK3 controllers once the init was done.

Given that (1) influences (2), we have a complex problem to solve.

With your observations, we were led to believe that the init A0 00 00 does allow for changing the lightguide when the command 83 was used. However it didn't allow for key events to be transmitted as MIDI (to Synthesia).

https://github.com/tillt/KompleteSynthesia/releases/tag/v0.74.0.41 should be using 83 for the lightguide control for MK3 controllers --- but you dont see any changes when Synthesia was running its test function. That means we are missing something.

--- test 1 ---
1st: Run KS v0.74.0.41
2nd: Try Synthesia's test function
-> no lighting -> shit, we missed something

--- test 2 ---
1st: Run KS v0.74.0.41
2nd: Try the KS fuzzing dialog and simply click on "Start" with a rather slow delay so you can find the right value -- note, Pause, change delay, Unpause can help
3rd: double/tripple-check that it was indeed 83 that caused the controller to change lightguide colours

--- test 3 ---
1st: Run KS v0.74.0.41
2nd: Try the KS fuzzing dialog and adapt the init string towards ie F6 00 00.
3rd: Use Reset in the KS menu
4th: Now press keys -- does Synthesia receive anything? You could also validate a transmission of MIDI events using https://www.snoize.com/midimonitor

@tillt
Copy link
Owner Author

tillt commented Mar 2, 2024

@Bounga ping ;)

@Bounga
Copy link

Bounga commented Mar 2, 2024

@Bounga ping ;)

Hi. Sorry, I was into something else lately. I’ll have a look at it tomorrow. Hope I can find something relevant and heplful.

@skylerwshaw
Copy link

skylerwshaw commented Apr 18, 2024

Heya @tillt, I'm a software developer with some outdated (old job) iOS ObjC/Swift knowledge. I have an S88 MK3 and am curious if I can be of help. I am new to MIDI protocol but am reading up on it in case it's of help debugging.

Per your test 1,2,3 above:

--- test 1 ---
If by test you mean having Synthesia play a midi and expecting it to light the keyboard, it's not functioning in my case.

--- test 2 ---
81 06 turns red on the buttons above the screen and the rotary encoder at once.
82 06 turns red on the far left controls
83 06 turns red on the keys

81 12 ... yellow top
82 12 ... yellow far left
82 12 ... yellow keys


Photos of the above 81 -> 82 -> 83 progression while having passed the 06 (red) color sequence, approaching the yellow (12) transition:

top change far left change keys change
DDF04193-3EAF-48D7-BAC1-61701B931FDF_1_102_o 2799CF8B-F17C-455D-A104-3F11A3826B6C_1_102_o E6A8F886-4108-4D8B-B918-D6A3A3E438B4_1_102_o

--- test 3 ---
Changing the init string to F6 00 00 made no noticeable change.
Using the reset button gives an error:
"The operation could not be completed. No other information is available about the problem"
MIDIMonitor shows nothing when KS is intercepting.

@tillt
Copy link
Owner Author

tillt commented Apr 25, 2024

Allright, thanks a bunch for confirming @skylerwshaw. That means I did screw up somehow as Test1 should really do at this point, using 83 (hex) for switching lighting. We can see it works when using the fuzzing function tests.

What worries me more is that so far, we did not find any way to allow for the keyboard to do both; transmit regular MIDI events as well as allow for color changes. That is likely a problem of an incorrect init command. As mentioned before, currently we are attempting A0 00 00 as that works for MK1 and MK2 devices. My lame guess using F6 00 00 doesn't seem to have any effect according to @Bounga and according to your tests it doesnt seem to be usable at all -- your results make me wonder if I introduced a new bug. It really was just a guess as that is something we see being transmitted a lot by the KK software when looking at the captures provided by both @Bounga and @thedarthmail.

Coming weekend I will dive back into the issues and maybe I have some new results then. Until then, please stay tuned and thanks a bunch for offering your help @skylerwshaw - much appreciated.

@skylerwshaw
Copy link

@tillt I do have an old MacBook on which I can disable SIP. Would this allow me to sniff the traffic that Komplete Kontrol is sending to the device and identify color commands? Looking into wireshark capabilities.

@tillt
Copy link
Owner Author

tillt commented Apr 25, 2024

Totally @skylerwshaw - I guess you saw #29

@tillt
Copy link
Owner Author

tillt commented Oct 4, 2024

No progress - issue is still open and help is needed. Try the latest beta and tell me what the things do for you on your MK3 device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants