CTLOUT problem anyone?

Jun 8, 2009 at 9:03am

CTLOUT problem anyone?

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!

Jun 8, 2009 at 10:09am

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

Jun 8, 2009 at 1:12pm

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??

Jun 8, 2009 at 1:47pm

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

Jun 8, 2009 at 1:57pm

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!

Jun 8, 2009 at 1:58pm

btw.. what is the cv.jit library?

Jun 8, 2009 at 2:10pm

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).

Jun 9, 2009 at 8:05am

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!

Jun 9, 2009 at 8:13am

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

Jun 9, 2009 at 1:44pm

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?

Jun 16, 2009 at 1:56pm

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…



You must be logged in to reply to this topic.