Forums > MaxMSP

Need some help with MaxMSP

Mar 24 2012 | 4:19 pm


I need a small tool on the background what would be very useful for me. I figured out I can create it with MaxMSP, because 3 years ago I had some basic lessons about MaxMSP on my school. But I’m no programmer and didn’t use it since that day, so I need some help.

What I need:

I need a patch that will do the following:

Everytime I press certain buttons on my computer in an specific order (for example: A, 1 and left mouse click), I want a timer to start counting. So this counter starts running when the last button of the sequence is pressed. But if I press a different button in between the order, it needs to reset again.

If possible I want an audio file to start when the timer starts and an audio file when the timer ends. In the end, when this process is done, everything needs to be reseted.

I have to press the following order of buttons to start a timer that counts to 10 seconds.
a (on the keyboard)
5 (on the keyboard
left click (the left click of a mouse)

So when I press "a", "5" and "left click" in THIS order, the counter starts.
When I press "a" and after it something else than "5", the system needs to reset. So I have to press "a" again first.

I hope this is clear. It sounded much easier in my head, but now I’m typing it I hope it is understandable for you guys…


Mar 24 2012 | 4:48 pm

Ah, I think with a lot of struggle I can figure something out. But my main problem now is that the patch only registers keys and mouse clicks when I’m INSIDE the patch. But I want it to work also when the patch is working on the background.

Any ideas how this is possible?

Mar 24 2012 | 6:16 pm

Okay… after an hour looking at MaxMSP I figured out I forgot almost everything about the program. I really need some help with this…

Mar 24 2012 | 8:14 pm

Should be straight forward enough, setup to play an audio file using sfplay~ ezdac~, etc… regarding the mouse I’d use the aka.mouse object because I think you can poll the absolute position of the mouse with the getloc message.

ummm… that’s it. Oh, and key or keyup for your key with select to choose which keys are pressed… if they need to be in a certain order look at bucket, and match.

Mar 24 2012 | 11:08 pm

Thanks for the info! But will the patch work if it is on the background. What I mean is that the patch is running on the background, but it’s not the primary program I’m using.

Will it still respond on my keys and mouse clicks?

Mar 25 2012 | 1:26 am

Mar 25 2012 | 11:38 am

Nice! Thanks for the info.

I managed to get the mouse functions on the "hi" object, but I can’t get any keyboard (not a musical keyboard, but a computer keyboard) data out of the object.

Mar 25 2012 | 11:57 am

Never mind my previous post. I already found the solution myself.

Mar 25 2012 | 1:49 pm

One more problem I’ve come across. Everything works with my MacBook’s trackpad. But when I plugin my USB mouse, it is no longer responding. So how can I receive data coming from my USB mouse?

Viewing 9 posts - 1 through 9 (of 9 total)

Forums > MaxMSP