Forums > MaxMSP

Enable [key] only in locked patchers?


EMV
September 28, 2010 | 11:52 am

This is probably very simple, but I can’t seem to find the answer even after searching the forum.

How can I disable the [key] object when a patcher is in edit mode?

I am mapping the m key to an action and I don’t want this action to happen every time I add a message box when tweaking the patch.

I could remap to shift-m, or an unused character, but I want to use single keys that related to the action.


September 28, 2010 | 2:50 pm

Hello EMV,

if you have a Macintosh and are not afraid by beta testing my [Quebec] external i tweaked quickly for fun few minutes ago ;-)

Attachments:
  1. Q.zip

September 28, 2010 | 5:34 pm

here’s some javascript that allows bangs to be passed through only when the patcher is locked:

function bang() {
    if (this.patcher.locked) {
        outlet(0, "bang");
    }
}


EMV
September 29, 2010 | 7:33 am

Thanks pizza olives and Brian Gruber for the suggestions!

I develop my patches on a Mac, but they need to run on windows too so I’ll go with the javascript solution.

I imagine an external would be the nicest solution because it would be more efficient and faster, but then again this action doesn’t happen so often and doesn’t deal with lots of data.


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