Forums > MaxMSP

Calculating Difference

March 3, 2008 | 10:37 am

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


March 3, 2008 | 10:57 am

Adam,

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

Adam wrote:
> 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!


March 3, 2008 | 11:02 am

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.

Nick Rothwell / Cassiel.com Limited
http://www.cassiel.com
http://www.myspace.com/cassieldotcom
http://www.last.fm/music/cassiel
http://www.reverbnation.com/cassiel
http://www.linkedin.com/in/cassiel
http://www.loadbang.net


March 3, 2008 | 12:12 pm

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;


March 3, 2008 | 8:54 pm

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


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