Launchpad Objects

Miller's icon

Hello,

I've created a set of Max objects for working with the Launchpad (manipulating LEDs and getting button presses). They basically just implement the functionalities described in the Launchpad Programmer's Manual. Max help files are included for the objects.

These are built for straight up Max - I don't have Live or M4L so I don't know how this would work in that environment.

Although there are probably lots of similar things out there, I haven't seen any well-documented Max objects for the Launchpad. I'm working on a "smarter" Launchpad renderer soon, which will set LEDs more efficiently, handle brightness better, and prevent the Launchpad from freezing up when you send it too many messages.

Comments and bug reports are welcome!

coffeencigs's icon

thanks man, thanks a lot

Lilli Wessling Hart's icon

Please add to our new Toolbox to reach the most Max users!

Thanks,
Lilli

Miller's icon

I will add this to the toolbox soon.

Dutton017's icon

Hi Miller,

This patch is great, just what i was looking for!

one thing: just wondering if there is a system to turn off selected LEDS, say i wanted to toggle a pad on the grid on off using a toggle object?

any help would be appreciated.

Thanks

James

11OLSEN's icon

why do you call it objects? this is not more then simple abtractions which
are not doing more then everybody can do with [midiin,midiout] to/from launchpad and the "launchpad programmers reference" pdf.

in m4l you normally can't send/receive to/from midiports outside of live.
(mac users can do it with leigh hunt objects)

Miller's icon

@11olsen Maybe I'm using the wrong terms - they are just abstractions you're right. The aim of the abstractions is, as I said in the original post, to provide a well-documented interface for the Launchpad in Max that would save people the work of implementing the MIDI protocol described in the Launchpad Programmer's reference. I realize that many people could do this themselves, but the point is I haven't seen an easy-to-use set of abstractions like this.

Miller's icon

@Dutton017

Max Patch
Copy patch and select New From Clipboard in Max.

You can turn LEDs off by setting the color of a LED to 0 0 - for example sending a 'setGrid 2 3 0 0' turns off the LED at row 2, column 3 (in the main grid). So to toggle on and off a LED, set a non-zero color at the appropriate LED when the toggle's value is 1, and set 0 0 as the color at the appropriate LED when the toggle's value is 0. Here's an example:

11OLSEN's icon

yes, it can be usefull. i took another look into the programmers reference and noticed they for example don't tell you that b0h is simply a control change. that can be confusing for people not knowing the midi protocol.

have you also implemented a way to use the rapid led update?
are you mac user?

Miller's icon

@11olsen

Exactly - the programmer's manual is straightforward and clear (props to Novation for making it available), but still probably a little too technical for people who aren't familiar with the details of the MIDI protocol or binary / hex numbers.

Yes, the rapid led update is implemented in the abstractions via the 'rapidUpdate' message - see the Max help file for phi.lpad.out - there is a sub-patcher showing how to do rapid led updates. Everything in the programmer's manual is implemented, with the exception of the messages that turn on all the LEDs (this seems to cause strange behavior with double-buffering, so I took it out).

It would be great if this stuff worked with M4L, but as I said I don't own either program so I have no way of testing. What is involved in talking to the Launchpad in M4L? Is it just that there's no midiout object available, or is it a totally different protocol?

I am a mac user - I haven't tested any of this stuff on PC, but it's all standard Max objects so I assumed it would work fine.

11OLSEN's icon

why has this forum no pm fuction?
can you send a mail to contactolsen at gmail.com ?
i would like to talk with you about some things.

Florent Ghys's icon

Why private ?
This is interesting.

11OLSEN's icon

private because of xchanging mail adr. I was communicating with miller about my virtual launchpad which doesn't support rapid led update messages and double buffering yet, if you wanna know.

jko's icon

Hello

Max Patch
Copy patch and select New From Clipboard in Max.

Miller, thanks for this work! However, using in a m4l device does not work straight away as Live modifies the midiout data. So here is a way how to wrap it that the abstractions can work in a m4l midi effect device. Note that the rapidupdate works not so good as I did a hackish workaround to switch midi Chanels here (this function sends on a different Channel then the other commands do). You'll either have to use this with user 1 preset on the launchpad or completly disable the Launchpad control surface in order to build it completly on your own.

jazzisfaction's icon

Hey Miller,
thanx so much. Great patcher.
I have another question, cause I have no experience with that:
is it easy to use 2 Launchpads simultaniously (NOT with Ableton - just as Midi-Controllers outside LIVE) ? Can I route both Launchpads differently? I mean, how does Max recognize from which of the 2 Launchpads it gets the information?
Of course I could add for example 64 to every incoming number of the the second Launchpad but first of all Max has to know which is which.
Or does anybody have some experience with that?
Thanx so much
Peer

geddonn's icon

I can't seem to get them to work. The problem seems to be that I get nothing from [midiin] - I've double clicked on it and selected launchpad and done the same on a [midiout].

I can only seem to get data from the launchpad through [notein] and [ctlin]

Anyone else have this problem?

11OLSEN's icon

tryed midiformat, midiparse with midiin/out?

jazzisfaction's icon
Max Patch
Copy patch and select New From Clipboard in Max.

hey,
i'm sorry, i don't have so much time, but that's a little patch how u should get the midiinfo....maybe you have to change the setsymbol name - i'm not sure what max shows for the launchpad.
hope that helps.
cheers

Miller's icon

Dead Files In The Lampshade: What OS and version of Max are you using? Haven't tested this stuff on 6 yet, or really much on PC.

Miller's icon

There is a version (1.02) newer than the last version I posted on this thread - has some bug fixes.

jonmoore's icon

Many thanks for this. I'm just beginning a Launchpad project so this will save me a lot time and effort attempting to build to build input and output modules from scratch.

jazzisfaction's icon

hey jon,
just a little advice: i've been in the same situation than u 2 months ago. i used the miller launchpad abstraction and based my patcher on it, but after a couple of days i couldn't use it anymore. it's too static and u can't change it for your needs.
try to be busy with midi-messages and write your own launchpad abstraction. like this u'll have much more possibilities.

cheers

jonmoore's icon

Thanks for letting me know Peer. Miller's abstractions are a good start point for me as I've never built a hardware interface patcher with Max before. I'm hoping by learning how to do it with his abstractions I can than better workout how to streamline the process specifically to my needs.

Walking before running and all that jazz! :)

jazzisfaction's icon

i understand, but all he did in the abstraction, you can do with 3 or 4 objects...there are much easier solutions...just try to understand midi....
anyway...just to tell u that i think that his abstraction is a bit complicated....
cheers
Peer

Miller's icon

@jazzisfaction - I'd really like to make the abstractions easy for everyone to use, and save people the trouble of learning the Launchpad MIDI protocol.
I don't really see why it matters what's going on inside the patcher; the whole point is you shouldn't be worrying about that. What's the advantage of re-inventing the wheel - anybody could read the documentation and do the little bit of math needed to create the appropriate MIDI messages, but why waste your time with that?

As for the patch being complicated, the quickest solution is not always the easiest to maintain. I structured it the way I did so that when I go back and look at it 6 months later it still makes sense to me.

jazzisfaction's icon

hey there,
don't misunderstand me...it's a great patcher, really. i admire your work and i used your abstraction,too.
anyway...i had a fight with 'midi' for a couple of days and i'm happy that i learned it now and that was also thanx to your patcher which gave me some ideas in which direction i have to search.

love & peace

geddonn's icon

Miller. I'm running the latest version of Max 5 (not splashed out on the upgrade yet). and OSX 10.6.8.

chapelier fou's icon

Hi,
It can handle only 1 LP, or am i missing something ?
Thank you !

jazzisfaction's icon

it's long ago, but i think i used it for 2 launchpads. can't u use different channels?

jazzisfaction's icon
Max Patch
Copy patch and select New From Clipboard in Max.

it's been quite a while...but that's a little patcher which i used when working with 2 launchpads....maybe it helps

jazzisfaction's icon

the patcher is for receiving messages from the LP...and of course u can use the same principle if u want to send messages to the LP

stefano's icon

i got i big patch in wich i'm using phi.lpad and since it seems to not work for me with max 608! max complain: $ variable out of range... perhaps coming from the phi.regexgate patcher...

stefano's icon

nothing coming out from any output of the [regexp "^([0-7]) ([0-3]) ([0-3])\w*?(update|flash|copy)?$"] in the phi.regexgate patcher

jazzisfaction's icon
Max Patch
Copy patch and select New From Clipboard in Max.

hey stefano...i'm still using phi.Ipad in Max 6.08 and it works...but i only use it to recognize the launchpad messages. for the rest i do some midi-message stuff....i'm using 2 launchpads so don't be confused..but before i talk too much i just send u my patcher which works perfectly...i hope it helps.
good luck
cheers
Peer

stefano's icon

the problem i have is with the phi.lpad.out, your patch has phi.lpad.in.
my fault, i forgot to mention that the phi.lpad.out doesn't work...
it's not a problem of my patches... the phi.lpad.out helpfile alone doesn't work either... for me
thanks anyway jazzisfaction!

Miller's icon

Hey all phi.lpad broke with a recent Max update. stefano you are correct that it's a problem with the regex validation. I posted a new version (1.03) - get it here: https://cycling74.com/tools/launchpad-abstractions/

stefano's icon

Thankssss a lot!!!!
can i ask u just for curiosity what was the problem? just to know what happened with the last max!
thanks

Miller's icon

FYI I just finished a new version of this project: https://cycling74.com/tools/launchpad-abstractions/

The most significant addition is the phi.lpad.smartout object, which makes it really easy to use double-buffering and rapid updates. Rendering smooth animations is very simple with this object.

There is also a movie player example included that lets you render video clips on the Launchpad, showing how you can work with jitter and the Launchpad.