Forums > MaxMSP

Limit number of sustain points in [function]

October 17, 2010 | 5:50 am

Is it possible to limit the number of sustain points in [function] (or ej.function) to just 1? I am trying to make an envelope and only want to allow one sustain point.


October 17, 2010 | 12:52 pm

Create one sustain point usint command/ctrl+click then in the object inspector uncheck the "allow changing sustain by clicking" box. You can now add and remove points with the mouse but not edit the sustain point. Just be sure not to delete it accidentally (you can always use the "getsustain" message triggered by the rightmost outlet to check it still exists).

lh


October 17, 2010 | 10:40 pm

Brilliant. I had already thought of creating the sustain point myself and then disallowing changing the sustain, but as you mentioned, that would be a problem if someone deleted the sustain point. I wasn’t aware of the getsustain message; it should be simple enough to allow changing the sustain when there are no sustain points, and disallow it when there are sustain points.

Thanks a lot Luke.


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