Max "key" object in M4L Device question
There must be something incredibly stupid I'm doing but...I have a strange bug (or is it a bug?):
I have "key" object inside my M4L device I'm using to trigger various Live.objects. It was working, (I'm not using the KEY MAP Assign in LIVE). Then it stopped working, only to be discovered by chance that I had to CLICK on the Device window (any device window of any track, M4L MIDI or Audio device) in order to get the Max "key" objects to function! If the mouse is clicked on any other region, it will not work.
I can remember to click on the device window before I start performing (interactively, I have to be hands off once the pieces start), but is there a way to avoid this from happening? If not I guess I would have to figure out using the mousestate object to go around it...?
Any pointer appreciated....here is a test sample to put in any track named simpletriggerMK.amxd - '1'= 1 's' = 0. It works as long as you click on this device window....
the key object, as far as I know, will only ever take input from the window in focus...
Thanks---do you know if there is a M4L command to put the state to put the "window in focus"?
hmm, I would intuit a window always being on top would keep it active, but I have yet to test floating windows or fullscreen in m4l. Maybe try some of these patches
https://cycling74.com/forums/floating-window-2/
https://cycling74.com/forums/pcontrol-pop-up-window/
Interesting - thanks!
I got so excited with using M4L id numbers with LIVE.object control but finding it quite painful... I can't build as I go along like I do in Max... When you edit/add/delete/ devices id numbers gets messed up. OK end of complaining :)
M4L IDs are persistent within a Live Set since almost ever (it only was different for a very short while in the very first release of M4L in Max 5). But you have to use leftmost outlet of [live.path] to obtain it. Once obtained this way it will aways refer to the same param, regardless where in your set the device is. The middle outlet follows the path (the location inside the DOM) and reacts to changes.
... or are you speaking about the three-dashes-unique-identifier "---"? These might change on reloading the set/device. But that should pose no problem as their purpose is a.o. to create device local scopes for [send/receive] or other globally communicating objects.
J
That's right!!!! OK thanks so much (get the left-most outlet of Live.path)!!! I wish there are more user friendly literature for dummies!!! :) Thanks! mari
ps. Is it still true that the mouse has to be 'clicked' on the Max Device window in order for the "key" object to take effect? That seems a bit unfriendly... :) I really don't want a "floating" window....
FYI: Very wise Tom Zicarelli helped me --- To use 'hi' object instead of 'key' in M4L :)
I found a simple way for key commands in live to effect Max without needing to click in the max window.
1. Use live's key map switch, assign a key to any unused parameter
2. Use the observe.live object box to view when the parameter change is triggered using the keyboard while the live window is active
What I did specifically:
1. I created an empty max4live audio effect as the first audio effect on track 1.
2. I assigned the key '1' to its device activator (on/off switch) by pressing the 'KEY' button in live, the selecting the on/off switch of the audio effect and pressing '1'
3. I copied the help file for max live.observer object into my patch and attached a message box containing the text "path live_set tracks 0 devices 0 parameters 0" to the live.path inlet
4. the slider should go up and down as you press the '1' key while using live
If you get a "setting the id cannot be triggered by notifications" just add a 1ms delay with a delay object
I found a simple way for key commands in live to effect Max without needing to click in the max window.
Haha! Smart workaround ;-)