Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 18 of 18

Thread: Sonar / Cakewalk Mackie SysEx

  1. #1
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36

    Sonar / Cakewalk Mackie SysEx

    I keep evolving my project and testing every DAWs I can.
    I'm having trouble with the Sonar/Cakewalk.
    It constantly sends the SysEx F0 00 00 66 14 1a 00 F7 and my controller does not work.
    I know I need to send an answer, but I don't know what, something generic that doesn't interfere with the other DAWs.
    I've searched a lot on the Internet, analyzed the code Zeus-DPC (Amazing project of Gerrit!), but I have not succeeded in changing values etc.
    Any suggestions?
    Thanks

  2. #2
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    732
    I don’t know if Cakewalk has some kind of special functions on a Mackie Control, but F0 00 00 66 14 1A 00 F7 is not a valid Mackie Control message as far as the documentation that’s available suggests.

  3. #3
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    181
    Thanks for the compliment

    That looks like a device query, the response should be a host connection query:

    Code:
    const byte sysExHostConnectionQuery[18]           = {0xF0,0x00,0x00,0x66,0x14,0x01,0x49,0x41,0x31,0x33,0x35,0x36,0x38,0x64,0x7A,0x61,0x41,0xF7};
    Here's an updated version of my controller: Zeus-DPC.ino
    I changed the code from emulating a Logic control to Mackie control as it makes no difference for use with Logic Pro and it makes the code more useful for others. This version also no longer uses the 4D library so it should compile and run without any issues. The two 4D Systems displays are controlled directly from the sketch (asynchronous). You could use this sketch to test if the sysex handshake is correct, the Teensy should respond the device query.
    All Mackie control functions are now working, beware that these functions depend on the DAW host. I was surprised to find out that the way plugins are selected in Cubase is completely different from the way it works in Logic.

    By the way, it could be that there's some debugging code in there as I'm working on the next phase: Midi Synth controller.

    Kind regards,

    Gerrit

  4. #4
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36
    Quote Originally Posted by Gerrit View Post
    Thanks for the compliment

    That looks like a device query, the response should be a host connection query:

    Code:
    const byte sysExHostConnectionQuery[18]           = {0xF0,0x00,0x00,0x66,0x14,0x01,0x49,0x41,0x31,0x33,0x35,0x36,0x38,0x64,0x7A,0x61,0x41,0xF7};
    Here's an updated version of my controller: Zeus-DPC.ino
    I changed the code from emulating a Logic control to Mackie control as it makes no difference for use with Logic Pro and it makes the code more useful for others. This version also no longer uses the 4D library so it should compile and run without any issues. The two 4D Systems displays are controlled directly from the sketch (asynchronous). You could use this sketch to test if the sysex handshake is correct, the Teensy should respond the device query.
    All Mackie control functions are now working, beware that these functions depend on the DAW host. I was surprised to find out that the way plugins are selected in Cubase is completely different from the way it works in Logic.

    By the way, it could be that there's some debugging code in there as I'm working on the next phase: Midi Synth controller.

    Kind regards,

    Gerrit
    I looked at your update version and tried to adapt to my project.
    Maybe something like that?


    Code:
    // Mackie Control system exclusive messages
    const byte sysExHeader[5]                         = {0xF0,0x00,0x00,0x66,0x14};
    const byte sysExDeviceQuery[7]                    = {0xF0,0x00,0x00,0x66,0x14,0x00,0xF7};
    const byte sysExHostConnectionQuery[18]           = {0xF0,0x00,0x00,0x66,0x14,0x01,0x49,0x41,0x31,0x33,0x35,0x36,0x38,0x64,0x7A,0x61,0x41,0xF7};
    const byte sysExHostConnectionConfirmation[14]    = {0xF0,0x00,0x00,0x66,0x14,0x03,0x49,0x41,0x31,0x33,0x35,0x36,0x38,0xF7};
    const byte sysExVersionReply[12]                  = {0xF0,0x00,0x00,0x66,0x14,0x14,0x56,0x31,0x2E,0x30,0x32,0xF7};
    
    
    
    void handleSysEx(const byte* sysExData, uint16_t sysExSize, bool complete) {
      uint8_t midiPort;
      boolean isMackieControlMessage = true;
      boolean isMackieControlXTMessage = true;
    
      midiPort = usbMIDI.getCable();
      switch (midiPort) {
        // Logic Control Main on Port 0
        case 0:
          // compare the first five bytes of the message to the sysExHeader to check if it is a Mackie control message
          for (int i = 0; i < 5; i++) {
            if (sysExData[i] != sysExHeader[i]) {
              isMackieControlMessage = false;
            }
          }
          // handle mackie control message
          if (isMackieControlMessage) {
            boolean processMessage = true;
            // handle different message types
            switch (sysExData[5]) {
              // respond to device query
              case 0:
                usbMIDI.sendSysEx(18, sysExHostConnectionQuery, true, 0);
                break;
              // respond to host connection reply with connection confirmation
              case 2:
                usbMIDI.sendSysEx(14, sysExHostConnectionConfirmation, true, 0);
                break;
              // respond to firmware version request
              case 19:
                usbMIDI.sendSysEx(12, sysExVersionReply, true, 0);
                break;
            }
          }
      }
    }

  5. #5
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    732
    Just to confirm is the message being sent “F0 00 00 66 14 1A 00 F7” or “F0 00 00 66 14 00 F7”, the first one is what you originally said was being sent and it’s not a standard MCU message, but the second one is a Device Query message and does expect a response.

  6. #6
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36
    Quote Originally Posted by vjmuzik View Post
    Just to confirm is the message being sent “F0 00 00 66 14 1A 00 F7” or “F0 00 00 66 14 00 F7”, the first one is what you originally said was being sent and it’s not a standard MCU message, but the second one is a Device Query message and does expect a response.
    It's the message that's constantly being sent by Sonar when I set it to MCU. (F0 00 00 66 14 1A 00 F7).
    And unlike what happens to the other Daws I've tested, it doesn't recognize the functions of my controller, it just keeps sending that message.
    It is not crucial at this point for my project, but it would be interesting to know what happens.

  7. #7
    Senior Member
    Join Date
    Jan 2017
    Location
    Maastricht
    Posts
    181
    Quote Originally Posted by Lenogi View Post
    I looked at your update version and tried to adapt to my project.
    Maybe something like that?


    Code:
    // Mackie Control system exclusive messages
    const byte sysExHeader[5]                         = {0xF0,0x00,0x00,0x66,0x14};
    const byte sysExDeviceQuery[7]                    = {0xF0,0x00,0x00,0x66,0x14,0x00,0xF7};
    const byte sysExHostConnectionQuery[18]           = {0xF0,0x00,0x00,0x66,0x14,0x01,0x49,0x41,0x31,0x33,0x35,0x36,0x38,0x64,0x7A,0x61,0x41,0xF7};
    const byte sysExHostConnectionConfirmation[14]    = {0xF0,0x00,0x00,0x66,0x14,0x03,0x49,0x41,0x31,0x33,0x35,0x36,0x38,0xF7};
    const byte sysExVersionReply[12]                  = {0xF0,0x00,0x00,0x66,0x14,0x14,0x56,0x31,0x2E,0x30,0x32,0xF7};
    
    
    
    void handleSysEx(const byte* sysExData, uint16_t sysExSize, bool complete) {
      uint8_t midiPort;
      boolean isMackieControlMessage = true;
      boolean isMackieControlXTMessage = true;
    
      midiPort = usbMIDI.getCable();
      switch (midiPort) {
        // Logic Control Main on Port 0
        case 0:
          // compare the first five bytes of the message to the sysExHeader to check if it is a Mackie control message
          for (int i = 0; i < 5; i++) {
            if (sysExData[i] != sysExHeader[i]) {
              isMackieControlMessage = false;
            }
          }
          // handle mackie control message
          if (isMackieControlMessage) {
            boolean processMessage = true;
            // handle different message types
            switch (sysExData[5]) {
              // respond to device query
              case 0:
                usbMIDI.sendSysEx(18, sysExHostConnectionQuery, true, 0);
                break;
              // respond to host connection reply with connection confirmation
              case 2:
                usbMIDI.sendSysEx(14, sysExHostConnectionConfirmation, true, 0);
                break;
              // respond to firmware version request
              case 19:
                usbMIDI.sendSysEx(12, sysExVersionReply, true, 0);
                break;
            }
          }
      }
    }
    That would be the relevant snippets. Can you try running the sketch as is? It should work without the displays present.

    Kind regards,

    Gerrit

  8. #8
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    732
    Quote Originally Posted by Lenogi View Post
    It's the message that's constantly being sent by Sonar when I set it to MCU. (F0 00 00 66 14 1A 00 F7).
    And unlike what happens to the other Daws I've tested, it doesn't recognize the functions of my controller, it just keeps sending that message.
    It is not crucial at this point for my project, but it would be interesting to know what happens.
    Yeah I don’t know what Sonar is expecting, that’s not a message in any of the documentation that I have of MCU.

  9. #9
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36
    I'm running tests and updating the thread if I get something.
    Thank you all for now.

  10. #10
    Senior Member bmillier's Avatar
    Join Date
    Apr 2016
    Location
    Halifax, N.S. Canada
    Posts
    159
    @ lenogi: I've built a MCU-based transport controller which uses the Mackie control surface protocol. I use Sonar DAW software and it works fine. After I have configured Sonar for a Mackie control surface, when I start up Sonar, in a small text box in the Control surface section of the toolbar, I see" Connecting". From documentation I have, I found that I had to make the controller send out the following sys-ex message, in order for the Sonar DAW software to recognize the presence of the Mackie:
    F0 00 00 66 14 1B 58 59 5A 00 00 00 00 F7 (all hex values)
    After it receives this, the "connecting" message disappears, amd is replaced by a message outlining the number of tracks it is setup for (which is meaningless in my particular case). At this point Sonar will receive control messages from my MCU-based controller.
    The sys-ex message you are getting from Sonar, is likely a device query of some sort- which the above sys-ex message will satisfy (at least in my case). I don't even use a MIDI input port on my MCU-based transport controller, so I don't even see that message in my setup.
    I don't actually have a Mackie, but the above message I found in some documentation I found on line regarding the Mackie protocol.
    Hope this works for you too.

  11. #11
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36
    Quote Originally Posted by bmillier View Post
    @ lenogi: I've built a MCU-based transport controller which uses the Mackie control surface protocol. I use Sonar DAW software and it works fine. After I have configured Sonar for a Mackie control surface, when I start up Sonar, in a small text box in the Control surface section of the toolbar, I see" Connecting". From documentation I have, I found that I had to make the controller send out the following sys-ex message, in order for the Sonar DAW software to recognize the presence of the Mackie:
    F0 00 00 66 14 1B 58 59 5A 00 00 00 00 F7 (all hex values)
    After it receives this, the "connecting" message disappears, amd is replaced by a message outlining the number of tracks it is setup for (which is meaningless in my particular case). At this point Sonar will receive control messages from my MCU-based controller.
    The sys-ex message you are getting from Sonar, is likely a device query of some sort- which the above sys-ex message will satisfy (at least in my case). I don't even use a MIDI input port on my MCU-based transport controller, so I don't even see that message in my setup.
    I don't actually have a Mackie, but the above message I found in some documentation I found on line regarding the Mackie protocol.
    Hope this works for you too.
    That Works!!!!
    Thank you!

  12. #12
    Senior Member bmillier's Avatar
    Join Date
    Apr 2016
    Location
    Halifax, N.S. Canada
    Posts
    159
    That was fast- instant feedback
    Aren't forums great!

  13. #13
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36
    Quote Originally Posted by bmillier View Post
    That was fast- instant feedback
    Aren't forums great!
    I just added the values on a switch button and pressed it to test.
    Now I'm going to include it correctly in the code.
    Again, thanks to everyone who helped.

  14. #14
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    732
    I’ve finally figured it out after looking through the Cakewalk Control Surface SDK. “F0 00 00 66 14 1A 00 F7” is a serial number request. So what you send back is “F0 00 00 66 14 1B [7 byte serial number] F7” , you have to have a different serial number per device. There’s also some other things that the MCU should respond to, but it should still work without it.

  15. #15
    Senior Member bmillier's Avatar
    Join Date
    Apr 2016
    Location
    Halifax, N.S. Canada
    Posts
    159
    I just checked out my browser bookmark for the Mackie info I had used.It was from an individual, not Mackie. I was going to send it on to you, but unfortunately the link has expired. I'm lucky it was there when I needed it to build my unit, several years back.

  16. #16
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36
    Quote Originally Posted by vjmuzik View Post
    I’ve finally figured it out after looking through the Cakewalk Control Surface SDK. “F0 00 00 66 14 1A 00 F7” is a serial number request. So what you send back is “F0 00 00 66 14 1B [7 byte serial number] F7” , you have to have a different serial number per device. There’s also some other things that the MCU should respond to, but it should still work without it.
    Only Sonar has asked for the SysEx so far.

  17. #17
    Member
    Join Date
    Jan 2018
    Location
    Brazil
    Posts
    36
    Quote Originally Posted by bmillier View Post
    I just checked out my browser bookmark for the Mackie info I had used.It was from an individual, not Mackie. I was going to send it on to you, but unfortunately the link has expired. I'm lucky it was there when I needed it to build my unit, several years back.
    Don't worry about the link.
    The important thing is that you had the information and now it's available here.

  18. #18
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    732
    Quote Originally Posted by Lenogi View Post
    Only Sonar has asked for the SysEx so far.

    MCU is a specification not a protocol so people can choose to implement as much or as little as they want, being that this works with a standard Mackie Control I would venture to say that this is in the official spec and nobody else just implements it as it doesn't physically hinder the ability of the controller. As to the reason why Cakewalk chose this to verify a valid connection to the MCU and not the actual query message that is normally used to verify it like every other DAW is beyond me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •