Forums > MaxMSP

CTLOUT problem anyone?

June 8, 2009 | 9:03 am

Hi all!

I’m quite new to max, yet i’ve been doing alot of good solid learning wit it. I’m trying to make a 3d colour tracking patch to follow the movements of a bike torch. i have x and y axes and for the z axis i am getting max to measure the amount of white on the screen.

The output from the y axis is set up exactly the same way as in the x axis, yet ableton seems to read the midi control signal from this as an absolute on/off type value. I’m really perplexed by this as it is set up in exactly the same way as the x axis…

I hope someone can help! here’s my patch!

– Pasted Max Patch, click to expand. –

thanks, if you get the time!


June 8, 2009 | 10:09 am

I don’t fully understand your problem. Are the controllers properly assigned if you look at the midi mapping in ableton?


June 8, 2009 | 1:12 pm

Thanks for your time.

they’re definitely assigned right in ableton. when i assign the ‘ctlout’ objects outputting cc’s 0 and 2, the controls they’re assigned to behave correctly. However, anything that i assign the cc1 message (coming from the ‘ctlout’ object in the middle) does not behave correctly. That control won’t move on a sliding scale, but instead switches between the two extremes. The threshold for this seems to be roughly around the ’63′ being sent from the ‘ctlout’, which is obviously half-way between 0 and 127.

is this a mystery or what??


June 8, 2009 | 1:47 pm

yep, that sounds mysterious, does that also happen with a separate ctlout (apart from your patch)?

I was surprised that the scale objects worked in your patch, I would have typed it [scale 0. 1. 0 127] since you convert float to int.

It still sounds like you have problem with floats and ints though.

btw, you might be interested in the cv.jit library


June 8, 2009 | 1:57 pm

well, i’ve experimented with ctlout a little with other patches and this doesn’t seem to happen. But like i said, my x-axis is set up in exactly the same way and that still works. I have changed the scale objects to work from floats, like you demonstrated, but still no joy.. I’m stumped!


June 8, 2009 | 1:58 pm

btw.. what is the cv.jit library?


June 8, 2009 | 2:10 pm

cv.jit is a great library for realtime image analysis: http://www.iamas.ac.jp/~jovan02/cv/

I don’t have the same image input as you, and I don’t recognize the behaviour you mention (I even mapped the ctlouts to sliders in ableton), but here’s my guess: I think your unexpected behaviour is due to the way jit.findbounds works (it can have a sudden jump in its output when there is no pixel matching the critera, than it will output -1, resulting +127).


June 9, 2009 | 8:05 am

strangely enough, the problem seems to have fixed itself. The wierd thing is that i didn’t change anything myself, it just works.. is this something i should contact Cycling about, you think?

Also, you were right about the cv.jit library! i am very interested! those tools look fantastic!


June 9, 2009 | 8:13 am

I don’t think you need to contact cycling for this, it’s too hard to reproduce.


June 9, 2009 | 1:44 pm

again, thanks, Timo for the precious advice, but…

great news!

it seems to be happening once more, and again, there’s just no reason for it!

surely if i can see that a continuos signal is being sent from max (i can tell this because the number box attached to the CTLOUT is reading out the as it should) then thats what Ableton should be mapping to the control i have mapped? It really shouldn’t behave in the way it is as there’s seemingly no reason to.

this i really can’t see any logical explanation unless i’ve missed something.. does it look like i’ve missed anything?

should i contact Cycling after all?


June 16, 2009 | 1:56 pm

I would monitor the outputs with a print and verify that it is in the expected range. If not you can place a split object in between to filter unwanted values…
The behaviour might change with lighting conditions…

Stefan


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