## Calculating Difference

Mar 3, 2008 at 10:37am

# Calculating Difference

Hi I’m new to max msp. However, I’ve gone through all the tutorials, and searched on maxobjects.com, but I’m still unsure if there is a max object that allows you to calculate the difference between the current value and the previous value. I looked at “delta” but this seems to only work for signals, rather than Ints or floats!

A

#36156
Mar 3, 2008 at 10:57am

A combination of [float ], [trigger ] and [- ] will see you right,
although it’s left to you to work out how (this is foundational stuff).

There are objects out there that will do this, but this is the way to
learn (having every third-party object in existence won’t do you any
good if you don’t understand how to put them together).

Owen

> Hi I’m new to max msp. However, I’ve gone through all the tutorials,
> and searched on maxobjects.com, but I’m still unsure if there is a
> max object that allows you to calculate the difference between the
> current value and the previous value. I looked at “delta” but this
> seems to only work for signals, rather than Ints or floats!

#123864
Mar 3, 2008 at 11:02am

On 3 Mar 2008, at 10:37, Adam wrote:

> However, I’ve gone through all the tutorials, and searched on
> maxobjects.com, but I’m still unsure if there is a max object that
> allows you to calculate the difference between the current value and
> the previous value.

Current value and previous value of … what? If you’re talking about
messages containing ints or floats (rather than signals) coming into
on the same patch cord, then it’ll require a bit of DIY, but it can be
done with a pretty simple combination of [int] and [-]. There’s stuff
like this in the tutorials.

– N.

#123865
Mar 3, 2008 at 12:12pm

You should really try to figure stuff like this out by yourself. It will teach you the ways you can use all the (basic) objects and make you a better Maxer allround.

But if you’re short on time:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 188 41 37 196617 11.11;
#P message 172 41 14 196617 9;
#P flonum 122 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 138 41 31 196617 6.14;
#P message 122 41 14 196617 2;
#P newex 122 77 27 196617 t f f;
#P newex 122 117 27 196617 – 0.;
#P connect 0 0 4 0;
#P connect 1 0 0 1;
#P connect 1 1 0 0;
#P connect 2 0 1 0;
#P connect 3 0 1 0;
#P connect 5 0 1 0;
#P connect 6 0 1 0;
#P window clipboard copycount 7;

#123866
Mar 3, 2008 at 8:54pm

Quote: spondoo@hotmail.com wrote on Mon, 03 March 2008 02:37
—————————————————-
> Hi I’m new to max msp. However, I’ve gone through all the tutorials, and searched on maxobjects.com, but I’m still unsure if there is a max object that allows you to calculate the difference between the current value and the previous value. I looked at “delta” but this seems to only work for signals, rather than Ints or floats!

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

Non-signal delta:

http://cnmat.berkeley.edu/patch/2512

Worth looking inside the patch to see how it ticks.

mz

#123867

You must be logged in to reply to this topic.