Old School APC40 questions...

Learn about building and using Max for Live devices.
Post Reply
jonbenderr
Posts: 133
Joined: Sat Feb 27, 2010 11:20 pm

Old School APC40 questions...

Post by jonbenderr » Fri Feb 26, 2016 10:37 am

Currently getting into modding the old school APC40. Just trying to make some cool sequencers to spice up my own work flow a bit.

Since I would of course like to share whatever I come up with, I know that the control_surfaces number is going to be a variable on other peoples systems and I need to accommodate this. Will component and control numbers be the same across systems?

I'm also assuming that anything I do for the old school apc40 will not be forwards compatible with the MkII, correct?

I can't believe after all these years there isn't more info out there.

I've read synthfan's tutorials. I've watched max4live.info's video on vimeo quite a few times now. I've read pretty much every forum topic here and on Cycling74. I'm terrible at deciphering other people's patches, but I've picked up a little bit of info through those.

Are there any other treasure troves of info out there?

Is the stuff that was contained on the now defunct max4live.info wiki still floating around somewhere?

I'm actually making pretty good progress, but I feel like I'm poking around in the dark a lot. I guess that's what everyone else had to do though, so I suppose it's only fair. It's fun to a point. Usually up until the lady is in the other room requesting your presence and you're "this" close to making something happen.

I'm sure most have moved on from even caring about the old APC40. I haven't because I own one and I can't afford the new stuff. :)

19oclock
Posts: 68
Joined: Thu Aug 21, 2014 5:40 pm

Re: Old School APC40 questions...

Post by 19oclock » Wed Mar 02, 2016 6:57 am

I ported all of my MKI stuff to the MKII in a few hours. They are both massively similar, so try not to worry too much assuming you establish control/component numbers in a sane fashion.

You can scope out the code for my MKII template. I don't think I have my MKI stuff online anymore. http://drewreges.com/?page_id=12

The code in it should show some techniques to use in M4L. Hit me up with any questions, too, and I can help ya out.

jonbenderr
Posts: 133
Joined: Sat Feb 27, 2010 11:20 pm

Re: Old School APC40 questions...

Post by jonbenderr » Thu Mar 03, 2016 11:18 am

Ooooo...see some javascript in there. I'll be taking a look. Think that's the next step I want to take in my education with this stuff.

As it is, I'm definitely making some progress. (Apologies for the hardcore/acid techno)

https://www.youtube.com/watch?v=pe8IhNqQik8

I don't know if I will actually be sharing this or not. The patching is horrendous as I've just been kind of learning as I go along and wrenching things in as I find bugs and inconsistencies.

I have the device control knobs mapped just using the automap attribute and then I'm just gating scaling and setting the live.dials to control the different parameters.

Would really like to figure out if there is a way to access the 8 banks of device controls through the LOM. I've poked around with the lom navigator but can't seem to find anything.

S4racen
Posts: 5822
Joined: Fri Aug 24, 2007 4:08 pm
Location: Dunstable
Contact:

Re: Old School APC40 questions...

Post by S4racen » Thu Mar 03, 2016 11:54 am

With the old school, you need to find the enable call on the component....

You can then disable the control individually and observe the signal from it...

Cheers
D

jonbenderr
Posts: 133
Joined: Sat Feb 27, 2010 11:20 pm

Re: Old School APC40 questions...

Post by jonbenderr » Thu Mar 03, 2016 2:16 pm

Thanks Darren.

I guess I'm confused as to which components and controls I should be looking at.

Probably be easier if I describe what exactly I'm trying to do.

I have 16 live.dials which have automapping attributes of 1-16.

So to access live.dials 1-8 you press shift+clip/track buttons. To access 9-16 you press shift+device on/off buttons.

I would like to consolidate the shift+button press to a single button press.

So I was hoping there was a way to just change the bank select for the device control knobs via single button presses. I don't want to break the functionality of the knobs themselves.

Hopefully that makes sense.

S4racen
Posts: 5822
Joined: Fri Aug 24, 2007 4:08 pm
Location: Dunstable
Contact:

Re: Old School APC40 questions...

Post by S4racen » Thu Mar 03, 2016 3:13 pm

To change the native functionality of the APC40 you're going to need to get into the Python script to change the behaviour of the shift button....

Cheers
D

jonbenderr
Posts: 133
Joined: Sat Feb 27, 2010 11:20 pm

Re: Old School APC40 questions...

Post by jonbenderr » Thu Mar 03, 2016 4:34 pm

Ok.

Think I'm just going to start from scratch at this point.

S4racen
Posts: 5822
Joined: Fri Aug 24, 2007 4:08 pm
Location: Dunstable
Contact:

Re: Old School APC40 questions...

Post by S4racen » Thu Mar 03, 2016 4:47 pm

Pm me your email address... I should have an old device somewhere that handles the disabling....

Cheers
D

19oclock
Posts: 68
Joined: Thu Aug 21, 2014 5:40 pm

Re: Old School APC40 questions...

Post by 19oclock » Thu Mar 03, 2016 10:39 pm

jonbenderr wrote: Would really like to figure out if there is a way to access the 8 banks of device controls through the LOM. I've poked around with the lom navigator but can't seem to find anything.
So you want to control device parameters/knobs/settings through the LOM, is that correct? If so that's totally doable.
jonbenderr wrote:Thanks Darren.
I would like to consolidate the shift+button press to a single button press.
Similarly doable. No need to break anything. All of this listening is available in the LOM via controls.

eMPac
Posts: 5
Joined: Wed Aug 22, 2012 5:02 pm

Re: Old School APC40 questions...

Post by eMPac » Sun Mar 06, 2016 11:12 pm

Hey Jon, this is probably a bit involved for your purposes, but recently I tried to do same thing (I think): use M4L to control the bank selection in the 'Device Control' section of the APC. So maybe it can be useful if I describe what I came up with, the device is on maxforlive.com, http://www.maxforlive.com/library/devic ... navigation.

There were a few obstacles: First, the APC40 Mk.II includes an interface for easily 'grabbing' 'controls' via m4l, but the Mk.1 (which is the model I have) doesn't. You can easily create this interface by modifying the python script, but I doubt this will ever be included in the official script. With this m4l interface in place, you can interact with the APC similarly to how they do in this tutorial: https://cycling74.com/wiki/index.php?ti ... g_Oct13_01. My version of the APC script that includes the m4l interface is here: https://github.com/martinpechmann/APC40-grab-release.

Second, for some reason the functions that would allow you to interface with the parameter banks of the 'device control' section aren't available through the LOM. Again, this is fixed very easily through modifying the python script. So you could use the script from my github above, which adds three functions to the 'Device' component: number_of_parameter_banks, get_bank_index and select_bank_index (this takes as parameter the bank number to select).

Third, you mentioned having your creations be compatible with different APC models. I also tried to make my 'APC Device Navigation' utility compatible with both the APC Mk.1 and Mk.II and possibly other scripts. First I tried to hard-code the component paths, i.e. use 'path foobar components 80' and '... components 99' conditionally but a better way is to use some abstractions that are included with Max: M4L.api.SelectControlSurface, M4L.api.GetComponentPathByName and M4L.api.GetControlPathByName. However, even the component and control NAMES differ between the Mk.1 and Mk.II models, some components aren't given a name but they should have one, etc. This, again, you can easily fix in the python scripts and I have done this for my device (but it would be much simpler if you could have consistent naming for all the APCs' components and controls).

So I would really recommend checking out the tutorial on the Cycling'74 wiki. One tool that I found very useful that you probably also know already is the LOM navigator (http://www.maxforlive.com/library/device.php?id=423, there is also the 'Live api explorer': http://www.maxforlive.com/library/device.php?id=331.)
Maybe if you look at my device this can also clear some things up for how to interact with the APC40, I like to think I have found a nice and clean way to do this, but I haven't documented the code. One problem with this 'custom script approach' is of course that you might have to update your version of these scripts from time to time and any users you might want to share them with would have to install and reinstall them whenever they update their Live installation.

Hope this helps a bit,

Martin

jonbenderr
Posts: 133
Joined: Sat Feb 27, 2010 11:20 pm

Re: Old School APC40 questions...

Post by jonbenderr » Mon Mar 07, 2016 4:34 pm

Interesting. Was hoping to avoid messing around on the script level.

Are the session control component and individual button controls of the button matrix different between mk1 and mk2? How about the metronome button?

These are pretty much the only things I'm taking control of currently.

I came up with a way to sort of create banks for the apc40's device controls using regular old max objects.

I actually have 8 live dials which are automapped 1-8 right now. I then have each running through a gate. Upon switching the output channel of the gate, it updates that last known value that was sent out that channel of the gate and sets the live dial. Seems to be working really well and also updates the LEDS of the device control encoders.

I know I can easily make conventions for the control_surfaces number variable.

At this point I think I'm just going to worry about compatibility just between MK1s.

eMPac
Posts: 5
Joined: Wed Aug 22, 2012 5:02 pm

Re: Old School APC40 questions...

Post by eMPac » Tue Mar 08, 2016 3:55 pm

The component and control paths will be the same for all Mk.1 controllers. For compatibility with Mk.IIs you can go by component/control name, i.e. calling M4L.api.GetControlByName with 'Metronome_Button' will return 'path ... controls 127' for Mk.1s and '...controls 157' for Mk.IIs. The names for Clip launch buttons, the metronome button and the session control component are the same between Mk.1 and Mk.IIs. You can also check all this by using the LOM navigator device, just select the APC MkII as your control surface, even if you don't physically have one connected.

Cool that you found a solution for the parameter banks. One thing to try might be connecting the live.dials to 16 hidden dials that store the respective values, so that all values can be stored with the live set, perhaps even automated, if you need that.

Post Reply