Akai APC Key25 mk2 driver

I cannot find any official sources, but the protocols differ quite a bit between the first edition and mk2.

There is no pulsing, no intensity, and way less colors.

What I did find is this (on GitHub - rogribas/AKAI-APC-Key-25-LED-Feedback-fix: Solution to fix bug in AKAI APC light feedback)

Each button of the APC Key grid corresponds to a note, the midi message to change the led color is:
NOTE_ON + <note_of_the_button> + VELOCITY_VALUE

The velocity value defines which color the led should be:

0=off,
1=green,
2=green blink,
3=red,
4=red blink,
5=yellow,
6=yellow blink,
7-127=green

Ableton Live sends the following message when the midi mapped control is OFF:
NOTE_OFF + <note_of_the_button> + 64

Hello I’m back after a while trying to fix the issue related to light.

In the meanwhile, is the configuration of the init file as described in section 2.10.1 of Contributing to Zynthian Development - ZynthianWiki still necessary? The init.py is not present anymore in the ctrldev folder. After an update I’m trying to repeat the steps made to load the driver for the APCKEY25, but it does not work. Thanks in advance

Yup, that changed a while ago:

Hello, I have a raspberry, I have installed zynthian (https://os.zynthian.org/zynthianos-last-stable.zip) it works well, but my akai apckey 25 works as a regular midi keyboard, the three modes descriped in the wiki doesn`t work. I see in the midi in menu APC Key 25, any suggestion?

1 Like

Hi @rgpzynthian !!

Welcome to zynthianland!

Have you loaded the driver, accessing the device options from the MIDI IN menu?

Regards

1 Like

As I see my APC key is not “mk2“, Òscar Aceña told me. So is not going to work :frowning:

The images of the appropriate device in the documentation are very important.

1 Like

Hi people in the Zynthisphere,

Here I present the ports of the two ctrldev drivers (without and with SooperLooper support) from mk2 back to the gen 1 version of the Akai APC KEY25.

It was quite some work to be frank, mainly because the gen 1 is just quite less capable then the mk2 version. If you don’t own one of the two yet, just get the mk2.

First: We have but three distinct colors, and just full brightness. So I had to redesign stuff, lie a little bit here and there, etcetera.

The PadMatrix looks really empty when there are no sequences defined yet (all leds off).

All blinking and pulsing levels is just blink (slow).

The, in my heart, quite mnemonic use of colors in SooperLooper modes went a bit down the drain. The pad in the same column as the action is now blinking when its (recording-type) action is being performed. I also added this to mk2, not that I like the looks of it, but it might help the colorblind too.

And on the Sync/Quant SooperLooper submode I added feedback on the chosen global Quant setting: when changing, it shows both sync and quant (-:None, C:Cycle, 8: Eighths, L:Loop) settings.
The soft key next to the global, top row (Clip Stop) can be used to inspect sync/quant, and the Soft Key ‘Solo’, below it, can be used to view and change eighths settings without having to press both the up and down pads for eighths simultaneously.

Then: the Gen 1 version has pots instead of endless encoders. And you (I) don’t want values to suddenly jump. Most of this is fixed, but in device mode there may be some screens where they do nothing, as not all screens implement the zynpot_abs() method.

I added two atomic commits adding absolute knobbing to the Tempo (picking up) and Note Range & Transpose (immediate) screens. This could be of benefit to others too. But I refrained from adding it to the Mixer view, being too complex to be easily done. Absolute knobbing with jumping would be easy (for Pots 1-3), but picking up not so. Especially with volume this is necessary.

Maybe someone more knowledgeable could pick this up, also keeping in ming there’s also the Zynbleton development which may render any work done here moot (have to admit I haven’t really checked that out yet).

SO: In Device Mode, Knob#1 to Knob#4 do nothing currently on the Mixer screen, and maybe other, more buried screens where Knob#1 through 4 ought to do something. Resolution most often lies with implementing zynpot_abs() in the appropriate views.

And then there are the in-menu values, such as global transpose. I haven’t found a good way to deal with those yet. It would be nice if the Zynthian system ‘simply’ let the up/down keys perform a single step up down until confirmed/escaped. They do when editing pattern values (cuia “ARROW_UP” and “ARROW_DOWN”), but then also the view is changed.

Where I could not use zynpot_abs() or where it was a SooperLooper value, I implemented picking up by proximity of 1% (as do parameter controls) and then a time window of 0.2 seconds to account for speed dialing.

What I did to to overcome the lack of relative encoders, is on the
Device Mode add a 4x4 matrix (unlit) at the left bottom. This also
helps with stepped/boolean values.

| Knob 1 | Knob 2 | Knob 3 | Knob 4 |
|--------+--------+--------+--------|
|    +10 |    +10 |    +10 |    +10 |
|--------+--------+--------+--------|
|     +1 |     +1 |     +1 |     +1 |
|--------+--------+--------+--------|
|     -1 |     -1 |     -1 |     -1 |
|--------+--------+--------+--------|
|    -10 |    -10 |    -10 |    -10 |
|--------+--------+--------+--------|

It takes up a lot of space, so if Oscar one day decides to use these pads, we’ll have to think of something else. Using Shift for the +/-10 values is one thing I thought of.

Last but not least: Akai APC key25 mk2 flipped the position (and MIDI number) for the soft_keys MUTE and_REC_ARM. To port back to the first generation order is a hassle to account for in code. With enough backlash I might do something about it, but I’d rather advise you to put two stickers in place or something. Plus, if you have both devices, such as I do right now, you do not have to retrain your muscle memory.

@oscaracena: I had to tweak your code quite a bit, both in order to subclass the various handlers, and also to abstract away the colors and such, so that the subclasses may assign other colors. And I found an issue in the base driver that not everything was unloaded on unload due to subclassing from two classes. This caused the old instance to keep sending feedback to the leds.

Please review my code carefully, and let further technical stuff be commented in the PR.

4 Likes

Thanks @niels for your hard work! I’ll review your PR ASAP but expect a bit delay, as I’m a little busy at work at the moment :sweat_smile:

Admit it @niels , you like that :face_with_hand_over_mouth:

I don’t have the device and still admire the work :sweat_smile: it was so hard for me to debug the driver I’ve made, copied at 80% from an other ! :exploding_head:

Thanks Oscar. Take your time, and deep breaths.

You mean hard work? Well, I just like getting things working. Do have to stop myself searching for perfection often though. There is music to be made!

3 Likes

Perfect is the enemy of good!

1 Like

For those not following the PR for the gen 1 port: this has now been merged into vangelis. Yeah!

3 Likes

As you may know, I am porting the APCKey25 drivers to zynbleton.

In the zynbleton UI, all references to scenes, tracks and patterns have gone.

There is just one scene, each launcher has a sequence with a single track and a single pattern.

I may have asked this before, but will multiple scenes, tracks and patterns ever return? The driver implements a lot of stuff regarding this functionality, such as:

  • switching scenes. It looks like even the API for this has gone, not just the UI.
  • adding multiple patterns to a sequence
  • copying patterns (also between scenes).

Removing this from the driver can really ease some migration, but also removes versatility.

I believe the removal of interfacing multiple tracks and patterns was mainly given in by the circumstance of the arranger view being, well, sub-optimal.

Note that I never understood the multiple tracks feature. Multiple patterns do still seem logical to me (three and a break in a lot of music, to name st.).

At least I think that we should not have something in the driver that creates constructions which cannot be undone/accessed from the UI. So I’ll try and disable those cases, maybe to be revisited if multi-pattern sequences and multiple scenes return.

2 Likes

Scenes are still supported but for this release we are only exposing one scene. In fact most sequencer operations require the scene to be specified.

Multiple tracks is a powerful feature that is currently unused but it’s likely to be exposed in a future release, e.g. when we revisit the (currently disabled) arranger view.

We are building on the zynseq library to create a stable system, bit-by-bit. To provide the launcher that we want within the timescale available we had to limit the scope and remove some functionality. Some of this is temporary and will be re-enable in the future.

3 Likes

Thanks for your answer.

I guess multiple patterns will resurface one day too?

And the tracks (will) have a midi channel that may differ from that by which a sequence is indexed (scene + phrase + midi_chan)?

I will try and keep as much of the functionality as possible yet not make it available until the UI does again.

The arranger in my view mainly suffered from the stuff presented being tiny. Probably a per-sequence ‘arranger’ would be better ux, combined with a clipboarding strategy, but that’s for later, and for another thread.

+1!

You are probably right that arranger may work well with a single, multi-channel sequence. It is in my head to plan something like that.

2 Likes

My apc key25 mk2 just died on me. No LED feedback at all anymore. Will try to get it repaired (it’s within guarantee. But driver porting now a bit on hold. Current status at GitHub - pft/zynthian-ui at fix-apckey25-in-zynbleton is quite far, but I did not deem it ready for a PR yet. Like last straws though. That broke the camels back…

Still got the gen 1 variant though, so who knows..