Addition operator question

Jul 13, 2008 at 10:14pm

Addition operator question

Hi,

I was wondering if there is a way to have an addition operation where the sum is outputted upon input into either inlet. I checked maxobjects.com but I did not see any externals that do this. Is there a way to do this in max?

#38869
Jul 13, 2008 at 11:09pm

The reason that there’s not an external object
that does this is that you can patch it yourself
using any object that sends a bang [a message box,
a button, etc.]. Remember that the leftmost [hot]
inlet triggers the calculation, so all you’d need
to do is to have any input to the right inlet
send a bang to that left inlet. I was thinking
that one of the very early tutorials actually
did this explicitly, but I guess not. Anyway,
I’ll let you meditate on how you might do this
simple thing.

This is an example of something that happens in
Max programming all the time – there is usually
no one arbitrary object that does *anything* because
there are simple techniques that beginning users
can add to include this functionality, obviating
the need for a completely new external. One reason
to spend time learning the basics is that you’ll be
adding things of this nature again and again if you
continue with the Way that is Max.

#135978
Jul 13, 2008 at 11:58pm

Your right I was being an idiot. I blanked on the trigger object.

#135979
Jul 14, 2008 at 12:34am

No, you weren’t being an idiot at all. The
kinds of thing you’re thinking about involve
developing habits of thought, which it’d be
silly to assume you automatically have. Getting
a sense of how to manipulate things at what
seems to be a “simple” level, combined with
learning to generalize and re-use your own
solutions, are what separate the beginner
from someone who’s not. You’re on your way.

#135980
Jul 14, 2008 at 5:42am

I second Gregory’s nurturance. And to encourage more, for some specific needs you could check out the object(and if you ever need something for lists, the

object).

#135981
Jul 15, 2008 at 12:12pm

lp.sigma does exactly this.

(Sorry, Gregory, but I got sufficiently tired of [t b i]s that I went through the effort to write sigma.)

…Litter Starter Pack, URL below. Yes, I need to update the listing at maxobjects.com but there have been higher priorities.

Googling the list ought to turn it up. There’s a long discussion at, for instance, < http://www.cycling74.com/forums/index.php?t=msg&goto=40928>

#135982
Jul 15, 2008 at 5:15pm

Thanks for the kind words Gregory. I’m definately starting to get more into the habit of reusing general code via prototypes, abstractions, and bpatchers. Its all a learning experience and sometimes I forget obvious things.

#135983

You must be logged in to reply to this topic.