max4live.info tutorial: In Control (Launchpad Edition) - Observing Buttons through the Live API

 

This is the first part of the In Control: Launchpad Edition. This tutorial brings you through selecting the control surface through the Live API and then how to observe button presses and control through the Live API. This tutorial will apply to the APC40 and the Launchpad. The next part of the multipart series will be on selecting modes. Stay tuned...

Check out the Forums in the Tutorial section for the M4L Patch.

Press the, "Read More" button for the video...

 

max4live.info tutorial: In Control: Launchpad Edition - Observing buttons through the Live API from max4live on Vimeo.

Your rating: None Average: 5 (3 votes)
Those Damn Twins (not verified)
Thanks

Thanks for providing this helpful information!

Daniel Battaglia (not verified)
Very helpful, thanks!

Very helpful, thanks!

Tone Deft
Offline
Joined: 11/27/2009
extremely helpful!! it shows

extremely helpful!! it shows not only how to get to the Launch Pad but how to use the API patches inside a bpatcher.

btw the Live API .maxpat files are at
C:\Program Files\Cycling '74\Max 5.0\patches\m4l-patches\LiveAPI resources

mchenetz's picture
mchenetz
Offline
Joined: 09/17/2009
Thanks...

Thanks for the nice comments... Just wait for the next few parts of the series. Coming VERY soon...

- Selecting active modes
- Sending to the control surface

Mike

Anonymous (not verified)
great!

keep em coming!!!
thanks.

gio (not verified)
what about... and thanks

Just one thing, IMHO I think that the last number could be related to something different then the pressed/released state of the button.

In many controllers there are different button modes.
The launchpad in the video seems to show a toggle mode, the midi message tells you only if you've pressed a button and it toggles between states (in launchpad 1 and 0, in other controllers noteon/noteoff 127/0 values). In this mode the button holds it's state.

Normally there is also a momentary button mode where midi message tells you not only when you press a button but also when you release it. (in launchpad if there is such a mode I guess you'd get a 1 on press and a 0 on release or viceversa). In this mode the button doesn't hold it's state.

Some controllers offer also a radio button mode where buttons interact in groups but this can be managed in very different ways and, IMHO, it's better managed directly in software where you can choose the which buttons and how to group them.

Back to the first phrase, the 1 at the end,
could it be something related to the mode you're in?
or better...
the number of the launchpad if you connect more than one?

By the way. Nice tutorial and good ideas on the next topics.
Hope to see something about jsliveapi.
I'm trying to do something with it because I find js/python programming paradigms more straightforward in managing some controller stuff, but I keep getting errors and crashes because there is very little info/examples about it and, let's be honest here, M4L and Live8 are good but they still seem not totally stable yet.
Also, I've noticed that some of the LiveAPI patches are a bit 'heavy' and I guess that they may be 'lighter' and/or simpler to read if done in js, don't you agree.

bye and
thanks

mchenetz's picture
mchenetz
Offline
Joined: 09/17/2009
Launchpad, Js, and ...

@Gio

I will have to play with the modes and different parameters in order to see if the last value changes at all. I know for sure that the first value is button press/release (1/0) and then x and y. I am not sure what the last value is. It did not seem to change. But, I do not think i tried to switch modes and then press it. It would be great if it gave off a 1 for user1 and a 2 for user2. I will play with it and see.

In terms of the JS... I really like JS for a lot of things in Max. It is definitely easier to perform loops and iterate over various things within Max/M4L.

I really believe in designing things very modular in Max. I like to use a lot of patches and sub patches that are purpose built. I program in Max like I would in various other languages. I create subroutines and then build a master patch that contains the various subroutines. Sometimes I will encapsulate various functionality into a patch just so it is easier to see the flow in the main patch.

the great thing about Max is that you can program in many ways and use the ay that works for you.

Mike

Derek (not verified)
Observing Sliders

Nice post! Thanks! This has helped a bunch.

I'm using the APC40 and trying to observe the sliders and having difficulty. Using the buttons as per their name "Play_Button" with the M4L.ListenToControlValue works but not with the track sliders. Also, using the names of explicit buttons in the Button Grid doesn't seem to work. For example, when I try to listen to "0_Volume_Control" or "0_Clip_0_Button" (I think) doesn't give a response. But using the "Button_Matrix" does. Any thoughts there?

Thanks!

mchenetz's picture
mchenetz
Offline
Joined: 09/17/2009
APC40

I haven't tried much with the APC40. I will definitely tackle that in the next few days. I will post some info as soon as I have some.

Mike

Chad (not verified)
How do you build this patch?

Hi,

First of all thank you for sharing! I just installed today so I haven't had that much time to dig in yet. But can you explain how to build the basic patch that you are using in this video?

Thanks!
Chad

mchenetz's picture
mchenetz
Offline
Joined: 09/17/2009
The patches are available in

The patches are available in the forums under tutorials. If you still need further explanation then please feel free to ask any questions. FYI: You need to be an authenticated user to see the files.

Mike

Chad
Offline
Joined: 12/13/2009
Ok, thanks, registered and got it.

Thank you for sharing, Registered now... got the patch. Cool site, I'm liking Drupal these days. I just missed your tutorials in the NYC area this weekend, hopefully catch you next time.

I'll find some time to play around with this. Can't wait to get my APC40 rocking custom templates.

Cheers,
Chad

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • You may insert videos with [video:URL]

More information about formatting options