Mackie Control C4 - Template for Sonar

Post your Lemur Projects.
RagsInRags
Newbie
Posts: 14
Joined: 04 Feb 2014 22:31
Contact:

Mackie Control C4 - Template for Sonar

Post by RagsInRags »

OK.. This is a bit awkward :oops:

I am quite a noob to Lemur and the whole control surface stuff. I own Sonar X3 and wanted a Mackie MCU+C4 desperately. Looking at the price and also the "unavailability" of stock to actually see the product working before buying, I almost gave up my dream of owning them. Thats when Lemur happened...

Long story short - There were (are) not many Sonar Templates on Lemur User Templates section. I spent the last couple of weeks unravelling the inner workings of Lemur Scripting. And I think I have a template based on Mackie Control C4 protocol working for Sonar (I know it works atleast on my machine)!! :twisted:
Sonar Template based on Mackie Control C4 Protocol !!
Sonar Template based on Mackie Control C4 Protocol !!
ScreenShot.png (90.83 KiB) Viewed 5095 times
Seeing the secrecy surrounding the Mackie C4 protocol, I am not sure if I should upload my template to the user section (dont know if the FBI or MI6 will come knocking on my door stating that I infringed on some copyright law or company confidentiality clause :?: ). This is particularly the case because I have not seen any document outlining the C4-Protocol as yet on the internet in plain english. And it did not take me long to figure out the midi implementation for C4 :ugeek:. If it was this simple, I am wondering why no-one has yet posted any such stuff yet (neither for Sonar nor other DAWs).

I am looking for advice from long-timers on this forum. Any / All guidance that will help me not get into trouble will be appreciated.
Korg Triton Studio, Sonar X3, Doepfer R2M Ribbon
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Mackie Control C4 - Template for Sonar

Post by Phil999 »

this is great! Yes, Mackie C4 templates were non existent until now, and it was one of those things I wanted to do. I have a C4, but don't know the protocol. I was hoping to use Lemur as a translator so that I can use the C4 for other software. Especially the text in the scribble strips. But knowing the protocol would of course also be useful to integrate into a pure Lemur template to control the few DAW's that can understand that protocol.

So, how did you do it? My plan was to intercept the MIDI ports of my C4 and note all sysex commands, create a table, and think about how to implement all together into Lemur.

About the secrecy around the C4 protocol: I was asking myself the same question. Probably not many devices were built, and not many software companies have included the protocol, so it hasn't become very popular. I saw one single video on YT that showed custom text appearing on the C4 scribble strips, wrote to the author, no reply. I think it's no breach of any secret if you make your template public. Especially if you found out the MIDI implementation yourself. If you hacked the Mackie website to access that data, that would be another thing of course. But I'm not a lawyer, so better wait a little what others have to say to this.

Meanwhile, I'm interested in your template. I don't have Sonar, but I could try it with Tracktion, Reason, and Logic. Only if you feel good with it, send it to me via PM. If not it's ok, now that I see that it works, I'm more confident to find out the MIDI implementation and build a Lemur template myself. Before your post, I was a bit unsure. And it's not very important, other things are more pressing.

Thanks for your post, that is good news.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
RagsInRags
Newbie
Posts: 14
Joined: 04 Feb 2014 22:31
Contact:

Re: Mackie Control C4 - Template for Sonar

Post by RagsInRags »

Hey Phil,

Thanks for being the 1st to reply. You are right. I neither own a C4 nor did I hack into their site :lol: . So I should (theoritically) not be bound to any confidentiality / copyright clauses. For all I know, I may have got the protocol all wrong ! Im just worried about the lack of information there is (especially since it would take not more than a day to figure out the protocol if one has a C4). I think if you know how Traction, Reason or any other DAW queries the C4 and the response it expects, you should be able to use this template with little tweak.

How did I do it?

1. Did quite some reading on MCU protocol. Some were incidental (during my search for info on C4). Others were intentional to understand the structure in which Mackie Protocol works. So have gone through the motions of HUIDocs, MCMap and the likes.
2. Took quite a few clues from softcore MCU template to understand how Sonar reacts to Mackie messages. Added my little programming experience to this and tried to make sense.
3. Used Midi-OX to monitor the midi messages that Sonar sends out. When sonar connects, it sends series of reset/initialize messages. That gave a big clue on what the different controls and sysex might be to communicate with Sonar.
4. Came across Geoff Waddington's work on creating a C4 emulator. I think this is the video you talk off where he shows custom text on a C4 display (http://stash.reaper.fm/v/11712/WaddMCUC4.zip). That gave me lots of clues.
5. After all this, had most of the stuff figured out. What remained was to get the way C4 tells Sonar when an encoder is moved. I did not find that info anywhere (atleast not in a way I could understand it). It took a bit of luck and brute force approach to figure this one out. but I did it !! :D
My plan was to intercept the MIDI ports of my C4 and note all sysex commands, create a table, and think about how to implement all together into Lemur.
I was also of the belief that there would be a lot of sysex commands to work with. Probably this has been done intentionally to dissuade ppl from investigating. My initial searches were aimed to find SysEx information :x . But from what I found, SysEx is used only for display data. Rest are note combinations and controllers (like the MCU - albeit different ones).

My biggest challenge was that not owning a C4, I did not know how the unit works. the documentation is not detailed enough to imagine the unit's behaviour. So there was a lot of guess-work and "connecting the observed behaviour with functionality mentioned in the user guides".

I'll PM you what I have so far. It will also be a good test-run for the template ;)
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Mackie Control C4 - Template for Sonar

Post by Phil999 »

wow, you don't have a C4 and figured it out? That is I think a big achievement. Congratulations, very well done!

I'm currently reading the thread in the Reaper forum. Seems like I didn't know that one.

Really great news, thank you.

Oh, and I think it's not a problem to post the template in the user library or here. You didn't steal anything or broke any contract. Why the C4 implementation is so hard to find may have other, ordinary reasons. But that's just my thinking, one never knows ... better keep it for yourself until we know for sure. Maybe Macciza joins the discussion, I think he has a C4 as well, according to his signature.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
RagsInRags
Newbie
Posts: 14
Joined: 04 Feb 2014 22:31
Contact:

Re: Mackie Control C4 - Template for Sonar

Post by RagsInRags »

Oh, and I think it's not a problem to post the template in the user library or here. You didn't steal anything or broke any contract.
Just needed to hear someone else say that :D. Uploaded the template to the user library. It has a document listing out my findings for the C4 MIDI protocol. that should help you get started with your stuff.
https://liine.net/en/community/user-library/view/448/

Now I will go silent and wait to hear some feedback ;)
Korg Triton Studio, Sonar X3, Doepfer R2M Ribbon
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Mackie Control C4 - Template for Sonar

Post by Phil999 »

just for now, very professional pdf. Impressing. It even takes care of note-on and note-off. Forgive me for praising your work again, but this is rare.


Edit: Reason appears to function very well with this template.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Mackie Control C4 - Template for Sonar

Post by Softcore »

OOOOhhhh niiiice! This will pair up perfectly with my LeMackie! Thanks for the efforts man!

P.S. Yes you can upload it!

look here!
https://liine.net/en/community/user-library/view/342/

;)
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Mackie Control C4 - Template for Sonar

Post by Softcore »

Oh I also request permission to use your C4 findings as a second page on an upcoming LeMackie update. ;)
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Mackie Control C4 - Template for Sonar

Post by Macciza »

Hmm
Looks very interesting, it's another thing I had started on at one point....

Not got my computer at the moment but when I get it back will check it out..
I have a C4 sitting around so can probably doing comparisons and give additional info...

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
RagsInRags
Newbie
Posts: 14
Joined: 04 Feb 2014 22:31
Contact:

Re: Mackie Control C4 - Template for Sonar

Post by RagsInRags »

:D I am a happy man this morning :)

@Phil - thanks for your kind words. So did it work just like that or did you have to make any changes to get reaper to recognize it? If it worked just like that, I think I should change the name and make ir more generic (not linked to Sonar). A wider audience should be encouraged to use it then. Can you also confirm if the "modifier section" works? I figure since you have a C4, you should know what those buttons are supposed to do.

@Softcore - I've released the template under GNU GPL. So feel free to use it :) . I dont want to get rich... but I wont mind getting famous ;) .
In fact I was going to reach out to you once I got confirmation that the template works outside of my machine to combine the two of our templates. That will be a powerful combination for Lemur users. I had that in mind when I made the template work on MIDI 1 (and not MIDI 0). I have already done it at my end. If you are OK, I can upload the combined template with the following disclaimer:
Combined Disclaimer
Combined Disclaimer
Disclaimer.png (45.04 KiB) Viewed 5019 times
Will need to tweak the install document and will distribute your installation document along with the template. Offcourse, your next version with more advancements / improvement will be awaited.

@Macciaza - cant wait till you get back to your PC :D
Korg Triton Studio, Sonar X3, Doepfer R2M Ribbon
Post Reply