I am trying to setup Duplex to work with Akai APC MIni device controller.
So far I have created lua and xml files and get APC mini controller fader and button working (mixer application). OK.
I have define a Mute button (pushbutton) and solo buttons
When I first press let’s say a “mute” button, the button turns green on the apc mini and the track is muted. fine
problem is when I press the same button a second time to “unmute” the track, the track is unmuted in renoise but the button stays green.
I have used APC20 existing lua file to create a APCtest class. I think the problem is there, somewhere in the functions… but I don’t understand the colorspace principle and I don’t have any ideas of what shoud be the APC Mini controller incoming midi messages
here is my APCtest.lua and APCtest.xml files (controlmaps and configurations)
seems that this unit needs a value greater than 0 to trigger the LED output.
I think the APCtest.lua file needs to adapt the “class” and function definition to send 1 instead of 0 when status is “OFF”, does anyone knows how to do that ?
I am going to test de apc mini lights playing with qlc light controller plus… will update later
Thanks Danoise, I didn’t mention this technical informations on the qlc forum.
It’s a start.
in fact, I tried this sysex message to initialize device in mode 0, mode 1, and mode 2 (0x40, 0x41 and 0x42), but did’nt notice any changes
I don’t think the problem is linked to the colorspace, I think (but might be wrong), the problem is related to midi message sends from Duplex that are not compatible with this device.
I opened a ticket on the Akai forum and asked them to provide a “communication protocol” document for the APC Mini… Not sure I will get it !!!
Still trying to make this device working with renoise
I add this function in the APCtest.lua main configuration file (get it from the MidiDevice.lua)
function APCtest:send_note_message(key,velocity,channel)
if (not self.midi_out or not self.midi_out.is_open) then
return
end
key = math.floor(key)
velocity = math.floor(velocity)
local message = {nil, key, velocity}
if not channel then
channel = self.default_midi_channel
end
message[1] = 0x8F+channel -- note-on
TRACE(("MidiDevice: %s send MIDI %X %X %X"):format(
self.port_out, message[1], message[2], message[3]))
if(self.dump_midi)then
LOG(("MidiDevice: %s send MIDI %X %X %X"):format(
self.port_out, message[1], message[2], message[3]))
end
self.midi_out:send(message)
end
I simply delete the test on velocity 0 and note on
And it’s working !! the led correctly turn to green when I press the button and then turn back off when I press it again (like mute/unmute)
Now I need to understand the “colorspace” concept so that I can use all 3 colors for my device (green red and yellow), also would like to setup the recorder and to be able to flash (yellow) a button when counting down before starting recording…
Did this project ever complete? I’m new to renoise and thinking about getting an akai apc mini for using with duplex, but I don’t think there is a template for it built in to duplex yet.
Would be really interested to know if this ever got anywhere as well as I have one of these on the way and would like to use it in a Renoise live setup. Anyone ever get one of these working?
Haven’t assigned all the buttons yet but the main button grid is set up for GridPie, the Mixer that genesis06 made is still set up on the sliders, and the arrow buttons are set up for GridPie pattern and track navigation.
I tried assigning a Navigator to the Scene Launch column at the right but the colours don’t seem to want to cooperate over there for some reason. Probably something I’ve done wrong.
EDIT: Thanks to genesis06 for providing the starting point for all this, I doubt I’d have got very far without the code you put up here.
Heh, lucky break for me, as I just found this forum/topic for the first time today, searching for info on programming the APC Mini. Unlike some of their other products, Akai doesn’t seem to want to put programming info up on their web site. So, people have had to resort to “cracking” the device.
Don’t know if this will be of help to you or anyone else here (I’m not a Renoise user, at the moment), but my tests have indicated that you cannot send the Mini more than 128 MIDI status messages without giving the device 10ms to process them. If you do, nothing will happen on the Mini (that is, any lights you’re trying to turn on or off won’t change) until after you stop sending data, and only the first 128 messages you sent will take any effect. When you’re talking about using it as a control pad for Ableton Live, or a DAW, that’s probably not much of a restriction. But if you write code that (as mine did) might send multiple redundant messages rapidly, you can exceed that 128-message limit quite easily.
I haven’t tested it yet, but I think a procedure like this will handle it:
if count = 128
Sleep (Max(0, 10ms - timer))
set count to zero
reset timer
increment count
send message
Do you write code for the Mini? I’d be interested in comparing notes with anyone else who does.