General

APC40 clone in Lemur possible?

Started by drain on .

Sign in or create an account to join the conversation.

12 posts

Topic starter
Hello everybody,

Im using apc40 in live 9 (OSX mavericks) and want to clone some functions in Lemur.

As an example i want to do some knobs for the device controls.
Was trying to find out what the APC40 is sending via Midimonitor resulting:

From Akai APC40 Control 1 General Purpose 1 (coarse)

but setting a knob in Lemur with these Parameters won't do anything.

What i want to do:

if i change them in ableton with my mouse it updates on Lemur and APC40.
if i turn the knob in Lemur it updates in ableton and APC40
if i turn the knob on the APC40 it updates in ableton and Lemur

Im asking myself if the APC40 isn't communicating via midi but over something else?

Ableton sends data to the APC40 and viceversa for bidirectional control so there must be a way to emulate these exact same Parameters in Lemur or am i missing something?
The reason most dedicated Ableton Live controllers won't work when emulated is because they have a "secret" handshake programmed in - once connected to Ableton Live, Live sends a midi message to them (usually sysex) and the controller "responds" with a "reply" (also sysex). Live, then checks the "reply" and if it fits, it recognises the controller.

Now, I have managed to "read" such a secret handshake for Mackie when used with Cakewalk's Sonar - all I had to do, was interconnect the controller and the software with virtual midi cables, and in between the connection insert a software that will provide midi thru and at the same time "record" the midi messages. You can try something similar if you already have an APC40 to see what "reply" your APC40 sends to Live - with a little luck, you can emulate that reply with Lemur and make Live "believe" that your Lemur is yet another APC40.
maybe i got a workaround,
i just need Lemur to change interface page according to selected track in Ableton.

I already found out this can be done with selectinterface(x);
but now i need ableton to send values for selected track, so a midi remote script or some max4live could be the solution.

unfortunatly i can't program that stuff myself.....
Or is there another way to do this ?

where can i get these from ? im willing to pay for it.
Softcore wrote:The reason most dedicated Ableton Live controllers won't work when emulated is because they have a "secret" handshake programmed in
I think that it is our responsibility as paying users to re brand this as ' "secret" circle jerk'.
You 'd need to have the actual SYSEX message drain

Something like 00 0B 01 8B ....... actually, hexademical code

......but yeah generally speaking it is sort of complicated. I also suspect by reading the Python files related to Push, that for the APC 40, Live MIGHT send a different message each time (generated randomely) thus the reply from the APC 40 MIGHT also be different each time...
Hi
You could do stuff with by Midi mapping, ie not using the scripts . . .

Otherwise you need to crack the handshake protocol which does involve random number generation
Or you could edit the script to vary its handshake procedure make it send same code every time
There are a few Apc resources scattered atound the net that may help you .....

Cheers
Mm
I looked at the handshake before I did L'Pad n shove , the handshake is similar to shove except there is no timer. The actual handshake code appears to use some internal algorithm that answers the possibly very large random number then compares it with the same algorithm in live . One way I thought to do it was to reduce the random number generator parameters to 0-1 and then monitor the response from a real unit , and adjust the handshake script accordingly , I didn't have a real unit so I gave up trying , and concentrated on the other 2instead.
another method could be to see how clyphx achieves push emulation that bypasses the whole handshake ....
Also I noticed in the latest live release notes they have done something that will affect 3 party scripts so some could stop working . Shove should always work though using the non clyphx method though.
Looking forward to seeing what to emulate from namm 14 .........
wul wrote:Also I noticed in the latest live release notes they have done something that will affect 3 party scripts so some could stop working
As far as I can tell, LiveControl 2.1.2 is working fine in Live 9.1.1, so no issues there. Can't say for ClyphX / Shove / etc...
@wul - first of all, I got your handshake idea from Lpad2 - definitely some tasty code under the hood there, and Shove is VERY impressive.

I'm sure you've seen this wul, but if someone else here hasn't - here's a link to a site that not only hosts the original PDF, but a handy image reference of the note, channel, and CC data from the APC:

http://www.live-laptops.com/hardware/midi-controllers/akai-releases-midi-data-communication-protocol-for-apc40/

definitely worth pouring over - as after a successful handshake, the APC is literally just sending generic note and CC data.
also worth checking out - a few posts from the max forums:

changing the color of the buttons on your APC with a max patch. studying the if objects gives away a lot.
http://cycling74.com/forums/topic/ok-lets-hack-the-apc/

Full APC40 Mapped in Max:
http://cycling74.com/toolbox/apc-40-mapped-out-in-max/

not APC - but controlling the Push LCD with sysex:
http://cycling74.com/forums/topic/how-to-control-the-push-lcd-with-sysex-messages/

little patch for changing bottom button modes on the APC, as well as changing the APC's 'modes', Live mode 1, 2, and generic mode with a sysex send:
http://cycling74.com/forums/topic/akai-apc40-max-midi-from-scratch/


Livid Stuff - this stuff might come in handy for someone - not only for emulating something like a BASE, or OHM64, but also checking out their remote scripts for live 9 and digging through them:
The Livid Wiki has a LOT of dope info about their controllers - honestly looks like emulating a BASE or something might be more useful:
http://wiki.lividinstruments.com/wiki/Main_Page

and the best for last - if you're on a mac, a M4L device that allows full midi communication with Live!
http://cycling74.com/toolbox/midi-inout-for-maxforlive/

I know i'll be playing around with that last M4L device a LOT. damn, it's like sysex librarian or midimonitor IN live. that's pretty dope! Hope this helps someone here a bit - if you look around, there's a lot of information online about independent controller scripts, sysex messages, and how live handles the apc, the launchpad, and the push. good stuff!
Hello, i´m working with Emulator Pro and now i´ll try to do it in Lemur.
Yes, is possible and there isn´t any secret.
About APC40 i have a template for APC60 (hybrid ACP40+APC20) with Emulator Pro Script.
Can we try to do it here?

https://www.dropbox.com/s/o68yoo1h0zdb466/ableton%20fusion%20APC80%20%2B%20SEND%20%2B%20EQ.png?dl=0

https://www.dropbox.com/s/99iywz6442hls0b/ableton%20fusion%20APC80.png?dl=0

To do this we´ll need a native "Lemur Python script" for Ableton Live to be recognized as a real Remote Hardware, then you´ll see the active red square in Ableton (the same as a real controller was connected to Ableton), after that we can build a template using the midi inputs and outpus based in this script (we need a guide to show numbers and midi port used in the script), or you can fight with a manual midi mapping, but there is not a solution because with manual misi mapping you can´t navigate ableton browsing your loops and samples.
You can find some examples here: "C:\Program Files (x86)\Ableton\Live 9.0.6 Suite\Resources\MIDI Remote Scripts\APC40". Look for your installation address.

Isn´t so hard to configure, the hard side is find somebody with many experience in Phyton Scripts.

Adrián.