Akai APC40 hax


I’m a little unsure about the /grid/led/map address. From the protocol document

Set a quad (8×8, 64 buttons) in a single message. Each number in the list is a bitmask of the buttons in a row, one number in the list for each row. The message will fail if the list doesn’t have 8 entries plus offsets.

If my grid is 8x8 is this address equivalent to /grid/led/all


no, /grid/led/all takes a single binary argument and sets all the leds on the device to full on or full off.


So the /grid/led/map address can turn 64 buttons on or off, based on a bitmasks?


yes. /led/map is 1 byte per column, 1 bit per led.

/led/level, /led/level/map, led/level/all are analogous but for variable brightness using1B per led


I just thought it was funny that akai saw fit to dissuade people from using monome in their official faq

aren’t those encoders all over the right side of the thing?


The knobs on the right are pots, 0-127

In other news, I got it all working and the PD grid studies loaded. I had to hack [serialosc] for manual connections to the server. I have to implement a few more things in the row, col and map callbacks but check it out!

Gonna take a little break from this for a few days.


Nice project! I have been trying to reclaim my Ableton Push 1 to be used with some PureData patches. Right now I have a very rough interface between PD and the Push via Python - but in lieu of not being able to get rtmidi working I opted for Jack Client.

I’m keen to comb through your work and see if I can learn and adopt some of your methods.


Speaking of APC40 hax, has anyone successfully removed the big side wings? There are some instructions on the Ableton forum but the pics were all hosted on photobucket and are now dead. I’m about to pick one up super cheap and would like to slim it down.


My code for rtmidi is a single callback for the set_callback() function.

Check it out. Going through the grid studies patches today, probably will make a sequencer tomorrow.


I think it’s 6 hex bolts. I can check later when I get to the studio.

UPDATE: Nope, removed the bolts and couldn’t take the wings off.


evidently not, stoked to see this up and running so quickly - great hack!


Turns out I do need a queue. The OSC messages sent to different addresses do not have their order retained because they use different callbacks which are not synchronized. Bleh.

update: python 3 has a built in queue and multiprocess module. I this seems to work as expected.


I got the APC40, MacBook Pro, Ableton Live and Novation Impulse 61. The 61 has a Mac control panel called AutoMap that can be edited with Python. So I’m following your discoveries but it’s way over my head. Can you recommend how I can approach programming these devices?



There’s no GUI in my repo. I’m not sure how other hardware works but my code should work with any APC40 and Puredata.

The MIDI x,y mapping is abstracted enough that I can imagine a configuration system where a vector of MIDI messages is defined and the translator “just works” but that for the future.

I’ve been considering the suggestion from @zebra to make a hardware adaptor. My shop space has enough hardware the make this happen.


Lol…there was a flag on the OSC library to work in blocking mode. Now all order is maintained for messages.


@zebra you mentioned building a programmable MIDI to Monome serial hardware adapter would be a generically useful thing to have. I agree and I’ve been thinking about this since you mentioned. It seems there was an art school project in 2008 to do something kind of like this. Most references are broken.

My protocol adapter is working fine. The clock seems to be very fast and the LED response is as realtime as I can perceive. I’m thinking of making a mode switch to take the 8x8 into 4 quadrant modes to get a 256 grid.


yeah, seemed like for a while there were quite a few DIY arduinomes out there.

the arduinome source code is still up:
[ https://sourceforge.net/projects/arduinome/files/Arduinome/ ]
[ed: woops, fixed the link]

tbh, it’s… well it’s not the prettiest thing i’ve ever seen. derived from original 40h firmware i think.

(you know all the official monome device sources are online right? https://github.com/monome/mk )

the official firmware itself is done in a very clean but very direct, low-level style squarely targeting 8-bit AVRs.

i have long thought that a nice modular, platform-agnostic implementation of the device side serial protocol would be a cool thing to do. but have never got around to it :weary:


Oh my, that’s awesome. I was not aware. This is a niche community and it’s been a fast ramp to get caught up. It’s pretty much living the dream.


I’m revisiting the idea of a hardware adapter to convert MIDI to Monome Serial. It looks like nearly everything can be done with a Teensy++ and a USB host shield. Here’s my notes. Is this crazy?

MIDI to Monome Serial adapter


Firmware requirements


Seems like it works for a foundation. I think there will be some art in the translation to and from the serialosc protocol, eh?