Forums > MaxMSP

stupid question …

October 5, 2011 | 12:35 pm

Hi,

I am just trying to use the int object to increase or decrease a value. However see below patch where I have the following problem:

the problem is that the first time I decrease after having increased, the number first goes up before it goes down …

– Pasted Max Patch, click to expand. –

October 5, 2011 | 12:38 pm

Can you upload a screen shot of the patch please

1st Creative Labs Support Team
support@1stcreativesolutions.co.uk

http://www.1stcreativesolutions.co.uk


October 5, 2011 | 12:47 pm

yes, here it is

[attachment=172067,2693]

Attachments:
  1. Billede1.png

October 5, 2011 | 12:56 pm

This is maybe easier:

– Pasted Max Patch, click to expand. –

October 5, 2011 | 1:10 pm

To be honest my Max license has literally just expired so am waiting for the new one, then I’ll be able to give you an exact answer, but from memory, I think it’s your gates causing the problem, i believe the left inlet on the gate object is for gate select only, then there should be two inlets to the right, gate 1 and 2. Have a look at the gate help files.

1st Creative Labs Support Team
support@1stcreativesolutions.co.uk

http://www.1stcreativesolutions.co.uk


October 5, 2011 | 1:23 pm

Kaspar’s gates are OK.
Kaspar, if you really want to use gates, then you should watch the outputs of +20 and -20 instead of int’s output. In your patch int’s output alway returns the value before increasing or decreasing.

p


October 5, 2011 | 3:05 pm

…and a classic case for either the [trigger] object, or [incdec] maybe?


October 5, 2011 | 3:24 pm

Of course there are many ways to skin a cat, but I’d probably avoid gate entirely and just do something like this.

– Pasted Max Patch, click to expand. –

October 5, 2011 | 3:26 pm

Or simply use incdec, as n00b_meister suggested.

– Pasted Max Patch, click to expand. –

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