Page 1 of 2

APC40 Footswitches

Posted: Wed Jun 16, 2010 1:51 pm
by natecraypo
Is there a way to observe footswitch activity using the Live API? Also, anyone have any good recommendations for a footswitch for the APC40?

Re: APC40 Footswitches

Posted: Fri Jun 18, 2010 4:07 am
by ark
natecraypo wrote:Also, anyone have any good recommendations for a footswitch for the APC40?
I like the Yamaha FC-4. Can be purchased in the USA for less than $30 including shipping, and built like a tank.

Re: APC40 Footswitches

Posted: Fri Jun 18, 2010 1:44 pm
by natecraypo
nice, but not exactly it. i just picked up a Boss FS-5U, which is pretty spot on for what i'm doing. I need something more compact like a momentary switch and less clunky like a sustain pedal. i made my own thing out of a box and a USB QWERTY keyboard circuit board (http://www.audionate.com/AudioNate/DIY_ ... witch.html), but it's proven a little too shaky to gig with. any ideas on how to observe the footswitches activity using the live API in M4L? Thanks.

Re: APC40 Footswitches

Posted: Sun Jun 20, 2010 5:18 pm
by natecraypo
Ok, folks. I figured it out. I'll give you the short answer. Then, if you want, you can keep reading and check out how i troubleshot this...

You have an APC and you want to observe the footswitch activity using the Live API. The control value for footswitch 1 is 61 and the control value for footswitch 2 is 60 (see image). Image

How I know this (you can stop reading now)...

Ok. So, from what I can tell, foot-switches have no name as they relate to the API. So, the "get control path by name" Live API object won't help you. However, my first step was in generating a list of controls available to me BY NAME like so (see image). Image

FYI: The umenu from which your control surface is selected is part of a bpatcher. Open the "M4L.api.SelectControlSurface.maxpat" in a bpatcher to select your control surface. This file is in your "Max 5" folder. The path is probably something like this: max 5 > patches > m4l-patches > LiveAPI resources > M4L.api.SelectControlSurface.maxpat. Also, make sure "click through" is enabled within the bpatcher's inspector, under the "behavior" tab.

That being done, your coll object should be filled. You can double-click it to see your list of controls. You will notice that items 60 and 61 are unrelated to footswitches. They're probably something like: 60, 0_Volume_Control; 61, 0_Arm_Button. This is because the numeric order in which these items have been placed in the coll do not reflect their control value as it relates to a live.path object. In fact, the control value for "0_Arm_Button" (Channel Strip 1's Record Arm Button) is 63. I am also unsure of how to observe any of the APC's faders. Any help on that would be great. Moving on.

In seeing how the numeric location of each CONTROL NAME within the coll did not match its respective CONTROL VALUE, I set up a tedious, trial and error patch to observe as many control values as I wanted (see image). Image

Luckily, I only had to count to 61 to get what I wanted. If this hasn't been completely revealing of how I spent my Saturday afternoon, I hope it's been helpful. Cheers guys.

Re: APC40 Footswitches

Posted: Sun Jun 20, 2010 6:22 pm
by S4racen
Top man!!

Cheers
D

Re: APC40 Footswitches

Posted: Mon Jun 21, 2010 8:59 pm
by natecraypo
i know right? someone with it should totally give me a job fer m'candy, if ya know what i mean.

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 1:13 am
by natecraypo
So, now that i can observe my APC40's footswitches, does anyone have any ideas on how to shut off their default functionality (I've seen the "In Control: APC40" video by Mike Chenetz and I'm not having any luck with any of those methods)? Thanks.

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 2:54 am
by amounra93
I think you can just [call disable] to the live object...thats how I'm doing it in js. If not, you may have to go to their parent object and [call set_footswitch_whatever id 0], but that makes it harder to get functionality back if you want. You can still do it, but you have to parse the control id and then feed its id back to the component you want to assign it to. I've done a bunch of this in js, hopefully I'll have it published by the end of the weekend.

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 3:27 am
by natecraypo
call disable does not work. max window reports "'ButtonElement' object has no attribute 'disable'"
as for the 'call set_footswitch...id 0' method, the footswitches are not named as such, or at least not named in that way as they might relate to live.object call functions. however, i'm told this stuff is still buggy. dunno what to think right now. i've had these things mysteriously start working for me for no apparent reason before. any tips on where to go to start getting into js (as it relates to M4L)? mind sharing your method with me?

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 4:08 am
by amounra93
Sorry, [call disconnect], not disable.

And the other bit you'll have to wait on. To disable one of them, it should be:

path control_surfaces 0 components 0: [call set_slot_launch_button id 0]

I'm not sure about the other one, you might actually have to disable it on every single clip slot in the same manner, or it might simply be:

path control_surfaces 0 components 0: [call set_launch_button id 0]

best guess, really, I don't have time to check it right now.

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 4:42 am
by natecraypo
i will report back tomorrow on how that works out. i think i'd tried [call disconnect] and it landed me some inconsistent results. anyway it's late and i've had enough for one night. thanks for the help. i really appreciate it.

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 5:00 am
by natecraypo
ok. i threw [call disconnect] in there and it's working like a charm. big-time digital gratitude coming at ya. now...onto phase 2: is there a way i can control more parameters in live's looper (using live.paths)? So far, all I think I have access to is: device on, state, feedback, reverse, monitor, speed, quantization, song control & tempo control. What I really want to control are the 4 small buttons above the "multipurpose transport button" (the record, overdub, play & stop buttons). any ideas? thanks.

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 6:22 am
by amounra93
Glad that worked. Either method should actually work.

re: Looper. Sorry, I'd be using it myself if they would make more features available via the API. I really need loop length and position.

I recommend Sooperlooper for looping purposes, it is much more robust. Its an AU plugin. All of its controls are available via OSC, and it has a lot more controls. And its free. Alas, some features that the built in Looper has are a lot more elegant than having to do it with Sooperlooper. I would switch if they added some stuff. There is no latency compensation that works for me in Looper, either.

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 7:03 am
by S4racen
natecraypo wrote:ok. i threw [call disconnect] in there and it's working like a charm. big-time digital gratitude coming at ya. now...onto phase 2: is there a way i can control more parameters in live's looper (using live.paths)? So far, all I think I have access to is: device on, state, feedback, reverse, monitor, speed, quantization, song control & tempo control. What I really want to control are the 4 small buttons above the "multipurpose transport button" (the record, overdub, play & stop buttons). any ideas? thanks.
hi mate if you send a live.tab with four options into a sig object and then inton the live.object that is connected to the state parameter you then have access to the big button....

Cheers
D

Re: APC40 Footswitches

Posted: Thu Jul 01, 2010 8:50 am
by amounra93
Nice :)))

I'll have to try that one out...