/ divide object odd initial behavior, object not dividing correctly under specific conditions.

Mello Cello's icon

Hello Max community! This might be my first time posting here?:)

I am having an unusual issue where a single /divide object is giving some strange behavior.

This behavior is observed only when numbers are typed in and entered into their corresponding number boxed, not dragged and incremented.

For example, if you were to populate the following number boxes by typing and entering and amount, 300 [enter] then 150 [enter], in the number boxes next to the "Cell Amount" as illustrated below,


this div object (in top right hand corner)...


...will receive the expected numerical values in its respective inlets, but output the value of 1 (I'm assuming it hadn't updated from it's previous output?).

(By incrementing the values up on the "Total Income" Number box towards the top of the patch, you will see that in case 150% of the value will be observed in the "total amount" number box towards the lower left hand side.)

My questions are of course is there a way to fix this behavior, but equally important, why does this behavior occurs?

Also is there a more efficient way to do what I'm trying to do?😅 I know there must be, (I fear that I'm doing something incredibly wrong by forcing cold inlets to behave like hot inlets with a bang object)

Also by any chance is there a way to add/remove break points to patch cables after making them??

Thank you for your incredible patience if you've made it this far. I apologize for such a long post for what is assuredly simple questions!

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

your construct is too complicated, order of calculations is questionable.

Look into pak, join, vexpr etc objects.

That could reduce number of objects used and maybe then

you can better time calculations.

Mello Cello's icon

Thank you kindly for the suggestions! I'll definitely look into these objects! So the behavior is due to the timing of calculations and these objects will mitigate that? is the timing or order of operations due to the position of the objections?

Source Audio's icon

Yes exactly, you depend on some calculation results to make further ones, which again

take part in initial calculations, and so it does not work.

Here is your patch, modified to allways update calculations,

no matter which part of input changes.

Max Patch
Copy patch and select New From Clipboard in Max.

I don't know if that clips are needed, also removed limit of zero at output,

to see the real result.

Sorry if I connected something wrong, was a fast mod,

but will give you idea why this or other object was used