Newbie or Max doing something strange?

Oct 4, 2010 at 5:46am

Newbie or Max doing something strange?

If you’ve got some time check this out, and tell me what I’m doing wrong it would be much appreciated. Its super simple but I cant figure out why this simple patch is behaving this way.

http://www.youtube.com/watch?v=C2wPet8wPLA

Not only does the if object seem to be spitting out some values inverted but the numbers coming out of the outlets of the if object are rounded off as well. Not to concerned with the cc getting all the way from 0-127 but why the hell are cc numbers 18+ inverted?

Thanks.

#52571
Oct 4, 2010 at 9:02am

By 18+ do you mean from 18 seconds in in the video?
I think its a left-to-right calculation order problem. Try putting a [swap] between your [ctlin] outputs that go into your [if] object and see what happens.
Also a good opportunity to learn how to use the debugger– it would illustrate the problem better than I can explain it :)

#189100
Oct 4, 2010 at 5:34pm

The issue is that the outlets of the ctlin are fired in right to left order, so when the cc number (middle) fires the cc value (left) is not yet set to it’s proper value. With rotaries you would not get right to 127, with a toggle the values are inverted.

This version has a little timing trick, it waits for the cc value before sending the cc number.

[attachment=142936,1211]

– Pasted Max Patch, click to expand. –
Attachments:
  1. screengrab.jpg
#189101
Oct 4, 2010 at 5:57pm

Terry – I actually meant from cc number 18. Your absolutely right, I think i’ll dive into learning about the debugger soon. Seems helpful. ;)

Xandu – Awesome! Thanks. This is super helpful. Bein new to max, not completely understanding the right to left timing issues. I guess i gotta learn that next before I make any more patches. Ur the bomb, thanks again!

#189102

You must be logged in to reply to this topic.