APC40 mk2, Sysex messages, LEDrings, Midi fixture

2,368 views
Skip to first unread message

Robin Larsson

unread,
Nov 1, 2017, 8:51:04 AM11/1/17
to Lightjams
Hello everyone!

As I mentioned in an other topic, we just bought an Akai APC40 mk2, to give us more controls and RGB pads, a nice upgrade from the APCmini, BCF2000 and Launchpad that we used up until now. 

As you may be aware, the APC 40 mk2 has 3 modes, Mode 0: Generic, Mode 1: Ableton and Mode 2: Alternate Ableton. The controller defaults to Mode 0 on power up, and it cannot be changed from the hardware afaik. In Mode 0 there is local controll of the LEDs and the LEDrings around the encoders, and some buttons are toogles, some are momentary. Akais documentation doesnt really mention this, but it is kind of possible to controll the LEDs of the pads from the computer in this mode as well, but the controller will override it when you press a button and the buttons flash when pressed. The 8 Device knobs are banked within the APC and are controlled from the Track select buttons.
While this mode does have some advantages, like being able to use 9 banks of 8 knobs easily, it seems like its not really going to work very good to controll the LEDs (mainly the RGB pads, the other ones would probably work fine)
Also, I´m not sure I like not being able to use the track-select buttons if I dont use the banking of the Device Knobs. 

So I´m thinking we want to use Mode 1 or Mode 2, Mode 1 would probably be preferable, as the LED rings around the knobs are controlled by the APC, but all other LED are controlled by Lightjams and nothing is banked and all buttons/pads are momentary Notes. Mode 2 is the same except that the LEDrings are also only controlled by the computer, not by the APC itself.

If you start Ableton Live, the controller goes over to one of the Ableton modes, my guess is that it is actually Mode 2, since when you close down Ableton, the APC will remain in this mode, and will send and receive Midi according to Mode 2, the LEDrings are not controlled by the APC. There doesnt seem to be a way to change modes from withing Ableton, or atleast I cannot find it.
So it seems we can "easily" get the APC to be in Mode 2, but I have so far not been able to controll the LED rings, tried to send Midi CC on the correct CC number, but nothing happens, and they are not lit up at all by the APC itself. 

So I´m wondering a few things: 
1: Would it be possible to get Lightjams to send the Sysex messages that the APC needs to change in to a specific Mode? if so, how? 
2: How are those of you who have the APC 40 mk2 using it? Running it in Mode 0: generic and just living with the shortcomings or even overcoming them?
3: Have someone managed to run the LED rings from Lightjams with the APC in Mode 2? If so, how?

I´ve seen that some of you are using this controller, and I´m going to try the projects that has been posted here and see if that works for me, later tonight when I´m at a Lightjamscomputer. 

I spent a good deal of time yesterday making a fixture profile for the APC, perhaps in vain since you guys already have done that (stupid of me to not try that route first..) Since the APC 40 sends on and listens to more than one Midichannel, I´ve had to patch 8 instances of the fixture in the patch, one for each of the first 8 midi note channels. I did it by making 8 different modes of the fixture, one 104channel one with all the things that are on Channel 1, and 7 more modes that only contain enough (16 or so) channels to be able to drive the Track buttons ( Solo, Rec Arm, A/B and those), and named them for each track, and patched them with start adress 49 on Note Channel 2-8. Is there a better way to do this, so one doesnt have to pactch 8-9 fixtures on different "universes"? 

After having done all these modes, naming each channel as they are named on the APC and naming the ones that are not in use as such, and patching and testing them, I realized that I should not have used a Dimmable Effect attribute when creating them..(my bad, I just didnt think about it)
So now I have to redo the whole thing so that I dont change the LEDs on the APC when using masterdimmer or activation... Is there a way to change the type of attribute without having to do redo the whole thing? 
Would be nice if the fixture creator was a bit more userfriendly to be honest, only a problem for high channelcount units, but still, would it not be possible to be able to copy-paste whole channels, with Name Min-Max and all? Or specifiy that I want 100 Color attributes instead of clicking 200times? 

Thanks in advance :)

Best regards
Robin Larsson

Mathieu

unread,
Nov 1, 2017, 9:09:46 AM11/1/17
to ligh...@googlegroups.com
Hi,

Lots of info here... I'll need to come back to it.


I'm also attaching one sample project file to use each page of the APC40 to activate effects. As you'll see in the sample project, to override the default APC40 feedback, you need to constantly send MIDI to it. This means you have total control of what each button does in Lightjams (momentary, toggle, etc.).
APC40 - Page Selector.ljp

Robin Larsson

unread,
Nov 1, 2017, 10:08:08 AM11/1/17
to Lightjams
Hi Mat,

Thank you for your fast reply! That is something I really like with Lightjams, the level of support and direct answers and help you give us! :)

Sorry for always writing so damn long post :P 

Yeah, the technique for switching fixtures in the patch is very good, and very powerful, but its not really what I want to do, I meant in the fixture templates themselves, not in the patch. Now one clicks the type of attribute one wishes to use, and clicks again and again to get in this case 104 identical attributes for the LED on Midi Note channel 1. My mistake was of course that I should not have used Dimmable Effect, but rather Color or Gobo or Effect, some attribute that is not affected by Master dimmer. I fully understand that its not a common situation, with DMX lights you usually know what type of attribute you want to use before making your fixture template, but since there is no Attribute that is directly related to the behavior of LEDs on Midi controllers, one just picks a type and goes with it, and it feels like it makes more sense to use a type of Attribute like Effect when using Midi LEDs. Also, I prefer to use the same attribute for all channels on my APCs, since you then get the correct numbers as identifiers, for example the RGB Pad that sends Note 1:1 will listen to Note 1:1, even if the manual really states that it is sending/recieving on 1:0 (Lightjams adds 1 to the identifier of all things midi for some reason) So using just the same type of Attribute maintains the "link" on the numberside of things, makes it easier when building the effects :) Also, for example the RGB pads on the APC could of course logically use Color, but the LED that are singlecolor would "logically" use perhaps shutter, and therefore I just go with one type :) 
Perhaps a future version of Lightjams can have a couple of attributes that are more suited to Midi controller LEDs? And the Presets that I saw you mention in an other thread would come in handy here as well :)

But perhaps there is some way to change the type of attributes used in a fixture outside of Lightjams, editing a file in a texteditor or something? Thought I saw something along those lines the other day, but cant find the thread now..

I´ll try the Page selector sample you sent in a couple of hours, thank you!

Yeah, I tried sending data constantly quickly yesterday, I´ll have to try it some more :) I´m actually doing the same thing on our Cameo Smoke Wizard 2000 vertical smokemachines, to get them to not turn of the LEDs to soon (really bad programming on Cameos side there) But on the RGB pads of the APC, each color is only 1/127th of the channel, so I guess the change in data needs to be small, but not to small or it seems the APC doesnt pick up on it. 
Also, did you manage to override the pads turning green when pressed? 
Could well be so that I should just run the APC in Mode 0 and live with the downsides and make use of the Banking :)

Mathieu

unread,
Nov 1, 2017, 10:29:53 AM11/1/17
to Lightjams
You may be better off editing the fixture template file directly and doing a search and replace. The fixture files are usually in C:\ProgramData\Lightjams\Fixtures. Sort by date and the one you're looking for should be the most recent.

When pressing a button on the APC40, it will be green until you release it. Then it will take the MIDI feedback coming from Lightjams.

Robin Larsson

unread,
Nov 1, 2017, 10:49:40 AM11/1/17
to Lightjams
Thank you again!

Yeah, I was hoping something like that would be possible, I´ll try it later tonight, thank you very much!

Okey, as I assumed then, that would work actually, even if it would be annoying, depending on how we want them to show that something is active. 

I may try using Bomes SendSX later as well, see if I can get the controller into Mode 1, that feels like the preferable way, even if I´m not thrilled by having to start one more extra software to set the controller in the correct mode, so if Lightjams could send Sysex messages, that could probably be avoided, but it seems that Lightjams doesnt handle Midi that way? Starting and closeing Ableton feels a lot worse than using something like SendSX though :)

Mathieu

unread,
Nov 1, 2017, 10:52:13 AM11/1/17
to ligh...@googlegroups.com
Just to be clear, you have total control to send feedback to the APC40 to show what's active. It's just while a button is pressed, the APC40 highlights the button (which makes sense) and doesn't take into account the midi feedback coming from Lightjams. It's for this button only. The MIDI feedback is still working for all other buttons. But it's just for the time the button is pressed. When you unpress the button, then eveything is ok. So I'm not sure what's the problem you're mentionning...

Robin Larsson

unread,
Nov 1, 2017, 11:18:09 AM11/1/17
to Lightjams
Yeah, I know that it is just while pressing the button that it disregards the Midi from Lightjams, noticed that when I tried it yesterday evening. But what I noticed was that it seemed like it took a while for the controller to update back to what Lightjams was sending, so that the button blacked out for a short time before it turned on in the color that Lightjams told it, but now that I think about it, it may have been that I had a short delay on the source that was sending to the pads, so that may be it :) I´ll try your projectfile and do some more testing with mine later :) 

Is there a way in Lightjams to get a make a toggle in to a momentary? Not sure I would need it, just thinking :) Onbeat or some function like that? It is very easy to take a momentary note coming in and making that a toggle, do it all the time with our APC mini, but I havent tried it the other way around. 

And also, when using Mode 0 one "loses" the use of 9 buttons, the Select or whatever they are called, the ones that change the behavior of the Device Knobs, but since there are so many buttons on each "channel", that should not really matter, didnt have a specific use in mind for those so far anyway. 

There is no risk of creating extra "load" on the computer and the usb ports if one is constantly sending updates with a high frequency on atleast 45 RGB pads? We have a pretty powerful laptop (i7 2.6ghz, 16gb ram, quadro graphics) so should not be any issue there I guess :)

After all, I´d much rather spend as little time as possible creating the controllsurface and instead focusing on the lightshow, again, thank you Mat!

Mathieu

unread,
Nov 1, 2017, 11:38:14 AM11/1/17
to Lightjams
The notion of momentary and toggle is just the way you send MIDI feedback from Lightjams. 

Robin Larsson

unread,
Nov 1, 2017, 12:30:30 PM11/1/17
to Lightjams
Hmm, surely not if the button sending the Midi signal is a toggleswitch? 
If I map a button to a source and that button is a toggle in the hardware, then the source will stay until the next press of the button? 
In Mode 0 (default) some of the buttons on the APC 40mk2 are configured as toggles and will stay lit and sending the same midisignal until pressed again. The Launchgrid and buttons such as Tempo and Nudge are all momentary, but a for example Track Activator, Track Solo and Record Arm plus a few more are Toggle in the controller in this mode. 
I was thinking if it may be possible to use those as momentary controlls within Lightjams, and also then be able to for example turn of the LED when the APC internally still wants to have it turned on?

Not very important though, and depending on what one wants to use the buttons for, it may not be an issue at all. For a lot of things its just nice that they are toggle in the hardware, makes the mapping a bit faster :)

Robin Larsson

unread,
Nov 2, 2017, 7:53:47 AM11/2/17
to Lightjams
So, a bit of status update from yesterdays programmingsession.

I started out with testing the APC 40 pageselector project and the Gravitron project files, only to realize ( I hope correctly) that these were made for the APC 40 (mk1) and not the APC 40 mk2, and as such they only work partially since the 2 versions of the APC are different in some key ways. 
It seems like the Clip Launch grid and the Scene Launch pads are the main difference, the mk2 sends Notes from the Clip Launch Grid on Midi channel 1, Note 1,1-1,40, and the Scene Launch is also sent on channel 1, notes 1,83-1,87. 
I think that the mk1 sends its Lauch pads in a different way, the launching does not work at all when using the Gravitron project, and I couldnt really wrap my head around how to make that type of formula work for the controller at hand and the way we want to trigger things, so I made my own triggergrids, and will probably change them alot tonight, had some new ideas while driving home at midnight :P

And since these 45 pads are RGB they work very differently when it comes to feedback, they listen to Notes on all 16 channels, same color-range on each channel, but depending on what channel you send on, they behave differently.
For example sending on Channel 1 will make them just turn on in the chosen color, and sending on the other channels will make them pulse or blink in sync with some master tempo. We decided to simply send on Channel 1 for now, dont need them to blink or pulse from the hardware, easily done in LJ if needed.

And since they are RGB and not just 3 colors, they use the entire range of the Note you are sending on, 127 states that all give different colors/brightness levels (seems to be 3 levels for most color hues), so its kind of tricky to send a continuosly changing value and not flicker between colors and lighting up after a press of the pad, but it seems doable atleast. 
Sending a sinewave with a period of 0.1-0.2 seconds, amplitude of 0.3% and ofset of 99.7% seems to work, and then just setting the max value of each attribute to get the color we want. 
Sending a small amplitude gets ignored by the APC, bigger makes it switch between colors and a longer period makes the pads go dark for while until it updates again.

So not 100% optimal, but for now we are running in Default mode to made good use of the encoders, and the banking of the Device encorder and 4 of the device buttons. 
In Ableton mode one does not need to constantly change the value for a LED to make them stay on, since the APC has given all LED controll to the host (Lightjams), and there would be no flickering when pressed, but at the moment this seems like the best way to do it, since we dont have a way at the moment to get the APC into Ableton Mode 1 where the APC controls just the LEDrings, all other LEDs controlled by Lightjams. Also, that mode would not give us banking of the Device Knobs, so on the whole, the current solution may be the best.
I´ll try to film the flickering effect and show you guys why I think it is a bit irritating..

On the positive side we do not really need to send midi to the other buttons at the moment, since most of the buttons except for the Launch pads work in a useful way already.
For example we use the Clip Stop pads as a Pause for the group of effect that are triggered by the launchgrid above, and those are momentary in the controller and lights up when pressed, so all good there.
The Arm/Solo/Select buttons are toggle and can be used like that to good effect. 
The A/B button steps between 3 different modes, sending 0%(LED turned of), sending 0.8%(LED light-orange) and sending 1,6% (LED dark-orange), and I´m thinking of maybe using that to make 3 pages for each group in a similar but different way to how Mat have done it in the Pageselector APC40 project.
The other buttons are either momentary or toggle, and we can utilise that, so no need to fiddle with sending midi to them to get a momentary to act as a toggle, not at the moment atleast. 

This also means we really only need to send 45 channels worth of Midi Notes och a single channel, so could either be done with just the one fixture containing 87 channels, or 2 fixtures, one with 45 and one with 5 channels and the later being adresses to 83, we want with the 2 patched fixtures in different modes route. Going to try and see if we can get the LEDrings on the encoders to switch mode, but not very high priority on that one, now I´ll focus on perfecting what we have now, and porting over as much as possible from the project we had ready for the Tour but programmed with our APC Mini. 

Mat, thank you for the tip on how to change the type of attribute in a fixture, worked very good, and it was quick and easy to change all the EffectDimmable into Effect and now it works great!

So on the whole we are pretty happy with the current state of things, and I think we´ll get a good setup going, and after this tour I´ll spend more time to find possibly even better ways to use this controller :)
In someways I prefer to work with some hardware/software constraints and coming up with ways to utilise it rather then a completly blank sheet and making up how everything should work when I dont even know how I want it to work!

Thank you again for your support Mat!
I´ll post the project here when I have a more fully mapped and ready project to go, hopefully tonight, and you guys can see my ghetto-hacking way of programming :P

Mathieu

unread,
Nov 2, 2017, 8:21:50 AM11/2/17
to Lightjams
Oh! Sorry, I didn't see it was the mk2. And unfortunately, I don't have any mk2 at hand... I'm sure your project file will be very helpful to other mk2 users!

Robin Larsson

unread,
Nov 2, 2017, 8:29:01 AM11/2/17
to Lightjams
No problem Mat, it was still very helpful to get your project file! 
Hopefully yes, and no doubt you or someone else here can improve on the progamming, I still havent gotten the hang on using memory and how to trigger a whole bunch of attributes from a single source. I´m just using a bunch of sources, one for each note/pad, each with its range controlled by midi and its power being modulated on the LED trigger grid. 
Reply all
Reply to author
Forward
0 new messages