Forums > MaxMSP

feature requests for function object

July 31, 2007 | 7:22 am

1. The ability to disable toggling sustain points (command/control clicking). In other words, support a "clicksustain 0/1" message. Right now this seems to be coupled to the option to disable dragging breakpoints. I have a UI where I want the user to be able to drag the breakpoints around, but not delete or add points or change the sustain point.

2. Output information about the current sustain points. I discovered I can access this information using the pattr system, but the format is not ideal because I have to parse the pattr value. I’d prefer to send a message that causes function to output a list of the point indices that have sustain enabled, or perhaps a list of 0′s and 1′s for each point (1=sustain, 0=not).

As usual with Max, there is a workaround. See my patch below. But I believe implementing the above features directly in the function object would make the Max user’s life easier.

Adam

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 369 359 100 196617 output on mouseup;
#P user textedit 452 197 662 247 32896 3 9 1000. 0. 1. 0. 0. 0 202.127655 0.613333 0 617.02124 0.84 2 840.425476 0.653333 0 973.404236 0. 0;
#P newex 288 106 79 196617 pvar function 4;
#P newex 436 335 62 196617 print points;
#P newex 316 333 109 196617 print domainAndRange;
#P newex 395 305 51 196617 zl slice 3;
#P message 357 234 40 196617 getenv;
#P newex 395 281 53 196617 route env;
#P newex 357 255 48 196617 pattrhub;
#P newex 452 172 129 196617 pattr env @bindto function;
#X prestore 18 0 1000. 0. 1. 0. 0. 0 202.127655 0.613333 0 617.02124 0.84 2 840.425476 0.653333 0 973.404236 0. 0;
#P objectname env;
#P newex 357 129 30 196617 t b b;
#P message 288 85 288 196617 sustain 0 0 , sustain 1 0 , sustain 2 1 , sustain 3 0 , sustain 4 0;
#P user function 58 163 258 263 0 1 0 1;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 202.127655 0.613333 0;
#X add 617.02124 0.84 2;
#X add 840.425476 0.653333 0;
#X add 973.404236 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P objectname function;
#P comment 501 251 100 196617 continuous output;
#P comment 384 104 174 196617 prevent sustain points from changing;
#P comment 68 142 167 196617 Only dragging of points is enabled:;
#P window linecount 2;
#P comment 505 331 150 196617 point format is (x , y , flags) whith flags: 1=fixed , 2=sustain;
#P connect 11 0 12 0;
#P connect 6 0 10 0;
#P fasten 6 1 5 0 382 152 587 152 587 72 293 72;
#P connect 14 3 6 0;
#P connect 7 0 15 0;
#P connect 5 0 14 0;
#P connect 10 0 8 0;
#P connect 8 1 9 0;
#P connect 9 0 11 0;
#P connect 11 1 13 0;
#P window clipboard copycount 17;


July 31, 2007 | 2:29 pm

On 31 juil. 07, at 09:22, Adam Murray wrote:

> 1. The ability to disable toggling sustain points (command/control
> clicking). In other words, support a "clicksustain 0/1" message.
> Right now this seems to be coupled to the option to disable
> dragging breakpoints. I have a UI where I want the user to be able
> to drag the breakpoints around, but not delete or add points or
> change the sustain point.

Request registered.

> 2. Output information about the current sustain points. I
> discovered I can access this information using the pattr system,
> but the format is not ideal because I have to parse the pattr
> value. I’d prefer to send a message that causes function to output
> a list of the point indices that have sustain enabled, or perhaps a
> list of 0′s and 1′s for each point (1=sustain, 0=not).

In the meantime, you may have a look to ej.function which implement
something equivalent.

> As usual with Max, there is a workaround. See my patch below. But I
> believe implementing the above features directly in the function
> object would make the Max user’s life easier.

Nice workaround.

ej


July 31, 2007 | 5:02 pm

Quote: Emmanuel Jourdan wrote on Tue, 31 July 2007 07:29
—————————————————-
> In the meantime, you may have a look to ej.function which implement
> something equivalent.
—————————————————-

I definitely like the features you put in ej.function and hope many of them get implemented in the standard function object.

I have a minor problem. Every time I move the mouse over the ej.function object, I see this error in the Max window:

error: js: ej.function.js: Javascript ReferenceError: setcursor is not defined, line 530
error: js: error calling function onidleout

This is ejies 1.57 & Max 4.6.3 running on Intel Mac OS X 10.4.10. I used your install.command and selected ‘Y’ for everything. It appears setcursor() is not defined so I commented it out, then the error went away and the object appears to work properly.

Also I have a usability suggestion. It is useful that you have a shortcut to switch between functions (command + double click), but if I want to toggle a sustain point I have to command+click. If I try to toggle the same point back and forth it often registers as a double click and switches functions when I am trying to toggle sustain, unless I click very slowly. It would probably be better to make the key for switching functions different to avoid interference like this.

BTW this is a very nice set of objects. 3D ej.linterp is great!

Adam


July 31, 2007 | 5:17 pm

On 31 juil. 07, at 19:02, Adam Murray wrote:

> I definitely like the features you put in ej.function and hope many
> of them get implemented in the standard function object.
>
> I have a minor problem. Every time I move the mouse over the
> ej.function object, I see this error in the Max window:
>
> error: js: ej.function.js: Javascript ReferenceError: setcursor is
> not defined, line 530
> error: js: error calling function onidleout
>
> This is ejies 1.57 & Max 4.6.3 running on Intel Mac OS X 10.4.10. I
> used your install.command and selected ‘Y’ for everything. It
> appears setcursor() is not defined so I commented it out, then the
> error went away and the object appears to work properly.

Yep, this is a problem with maxtoolbox installed. You need to move
the toolbox-start file (or whatever it’s called) in the init folder
to max-startup folder, and the error messages should disappear.
setcursor is part of the Max JS predefined functions.

> Also I have a usability suggestion. It is useful that you have a
> shortcut to switch between functions (command + double click), but
> if I want to toggle a sustain point I have to command+click. If I
> try to toggle the same point back and forth it often registers as a
> double click and switches functions when I am trying to toggle
> sustain, unless I click very slowly. It would probably be better to
> make the key for switching functions different to avoid
> interference like this.

It was a tough choice because shift is also used, and option is
generally used for open the help file.

> BTW this is a very nice set of objects. 3D ej.linterp is great!

Thanks,
ej


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