Forums > MaxMSP

New object position

December 29, 2008 | 8:51 pm

If this is already possible I need a hint about how to do it :)

I like the key commands for new objects, but I don’t get the positioning of new objects. What I want to get when pushing a key for a new object is a new object below, above or next to (left or right) the previous object.

Currently it is the mouse cursor that decides these things and therefore (as far as I can see) it should be a fairly easy thing to add or subtract from the mouse x and y to position new objects in a more keyboard patcher friendly.

Anyone agree?

cheers
Arve


December 29, 2008 | 9:53 pm

You might already know this but if you add objects roughly where you want with the keyboard shortcuts and mouse position you can nudge them into horizontal or vertical alignment by selecting them and pressing command-y. If you download the max toolbox javascript patching aide you can even link them with patchcords and adjust the spacing between the aligned objects using keyboard shortcuts. The toolbox does a multitude of other things to get you patching faster too. Here’s the link:

http://code.google.com/p/maxtoolbox/

I hope this helps.

lh


December 29, 2008 | 10:53 pm

Thanks for your reply.

I used the toolbox on 4.6 but i skipped it due to some problems when 5 came out. Do not remember why, but something became frustrating.

I really like the toolbox, but it still involves mousing for initial positioning of new objects (right?).

A "line shift" function when adding new objects would make (in my opinion, at least) patching life easier. And if the previously initialized object could auto-connect to the new object, it would be almost to easy :)


December 31, 2008 | 2:17 am

Quote: Arve wrote on Mon, 29 December 2008 16:53
—————————————————-
> Thanks for your reply.
>
> I used the toolbox on 4.6 but i skipped it due to some problems when 5 came out. Do not remember why, but something became frustrating.
>
> I really like the toolbox, but it still involves mousing for initial positioning of new objects (right?).

—————————————————-

Maybe try the toolbox again, it seems to work fine for me in 5 (XP). As far as your other question, do you use duplicate? That would get you a nice row or column right away. Of course, it only duplicates, not creates new objects.

I pretty much always create new objects by alt-dragging, it seems faster for most things (though I take care to avoid doing this with the obvious, like subpatchers or pattrstorage etc.) which wouldn’t be good to duplicate…

Plus if you hold Shift when you alt-drag, the new object will stay in line with the old.


December 31, 2008 | 10:29 am

Thanks for your reply. I will try the toolbox again, no problems with that at all.

My suggestion for a "auto-align and connect new objects created by keyboard shortcuts" feature, is not a suggestion for replacement of other patching techniques.

I have patched for years using mouse and keyboard (alt-drag and such). But with max5 and keyboard shortcuts for new objects as a built in option, I find it somewhat strange that creating new objects by using only the keyboard (like hitting "n" for a new object) requires a mouse move to change position for the next object creation (by hitting "n" again).

Most often I know what I am going to patch before patching, and just hitting "n" for a new object, then writing the objects name, hit enter to init the object, and then n for a new object aligned below the previous one (or to the right or left by holding down a left/right option key + n) and then see them connected without having to use the mouse at all, now that would be good in my world.

I don’t know anybody who patches by putting all new objects on top of each other as a stack of cards. Therefore it would be nice with an automatic offset for objects created by using the keyboard. When the "new creation by using keyboard" chain is broken by moving the mouse, then hitting n would start a new chain of auto-align and connect.

This offset and connect-feature could even be included in the toolbox, but built in would be just amazing.

cheers
arve


January 6, 2009 | 4:48 pm


January 6, 2009 | 5:16 pm

I’ve been playing with a rather lovely new vsti called Synplant from
Sonic Charge. It all works ok, except that when I try to use many of
the plug in menus nothing happens except this message in the max window:

max_newtable: needs to be implemented

Is this something missing in Max, or something that Sonic Charge need
to sort out?

This is on Mac OSX and Max 5

thanks

David



jko
January 6, 2009 | 11:39 pm

A quick and dirty workaround idea as you can’t move the cursor by script: move the patcher (Place your cursor where you want to start, hit n for your new object or whatever you need, hit space after your done creating the new object and create the next one) After that use toolbox to connect everything cascade or whatever you might need….

– Pasted Max Patch, click to expand. –

January 7, 2009 | 12:00 am

Quote: jko wrote on Tue, 06 January 2009 17:39
—————————————————-
> A quick and dirty workaround idea as you can’t move the cursor by script:

Actually you can, use this:

;max pupdate $1 $2 (pretty sure that’s it, for "pointer update", not sure it’s exactly this but I’ve done it in the past)

where $1 $2 is the screen position of the cursor. Could do all sorts of interesting (or annoying) things to the end user this way. One nice thing would be to create patch tutorials where the cursor moves around to the different UI elements, etc.: use mousestate and mtr to record your motions, then playback the positions to the ;max pupdate command. Combined with aka.keyboard etc. you could auto-create all sorts of objects.


January 7, 2009 | 12:23 am

Quote: seejayjames wrote on Wed, 07 January 2009 01:00

> Actually you can, use this:
>
> ;max pupdate $1 $2 (pretty sure that’s it, for "pointer update", not sure it’s exactly this but I’ve done it in the past)

—————————————————-

I did not know about this one! Thanks. It works. Can use this to make a workaround. It is not necessary to change cursor position to change position for new object if the new object is created by patcher arguments in javascript. However, I think that moving the cursor is more intuitive than not moving it. Then cascade-connect with the max toolbox could be satisfying to some extent, but I can’t get the toolbox to behave in max5. Vertical and horizontal distribution suddenly turns the patch into a mess that takes forever to clean up, and as toolbox-actions is not part of the undo system, I find it somewhat annoying.

cheers
arve


January 7, 2009 | 12:27 am

Quote: stefantiedje wrote on Tue, 06 January 2009 17:48
—————————————————-

> That explanation was missing in the first post (or at least haven’t been
> clear enough)
>

Sorry for being unclear on this…

> I think it would be a good idea, the connect might (should) be done with
> an extra stroke, to connect the two previously created objects.

Agree!

—————————————————-


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