Issues with colour/motion tracking instrument patch
I am currently working on a patch that tracks the motion and colour of live video using jit.findbounds. I am having difficulty troubleshooting a couple things:
1. The contrast I have applied to jit.brcosa does not appear to be affecting the pwindow at all. I wonder if it is just a case of a missing patch chord, but I can’t seem to figure it out.
2. The green and blue "trackers" are not working, only the red. This could be because jit.brcosa is not connected properly, or because of something else I am not currently aware of.
3. I am using fluidsynth~ (in subpatchers) for each "tracker" and they should be producing sounds (using soundfonts in the patch file) — but nothing is happening there either. This could be tied in with the first issue, but it might be something else altogether.
I am continuing to investigate each problem, but I would be grateful if anyone has some tips or suggestions for me. I have attached the patch here.
Thank you in advance for your help!
It’s interesting… we just discussed issues related to [jit.findbounds] in this topic: http://cycling74.com/forums/topic/colour-tracking-with-a-webcam-in-jitter/
I’m just downloading your patch. Luckly it’s realted to things I’m just doing, so I can spend some time with this… ;-)
I’m just study your patch. Some details to fix, but nothing special, I think I know, what you want to create. First we should made better tracking – wait 30 minutes, I send a patch.
ps. funny, I’m using fluidsynth~ too…
"You fixed it! Thank you! What was the problem?" – some chaotic connections between trigger and other objects. Nothing magical ;-)
Is it all, you need, or can I help you more (my computer is just rendering some video… I have time…)
It may not be magical to you, but it helps me out a lot! I just discovered fluidsynth~ on one of the threads here. It’s really fun to use. Currently mine are finicky — it works fine at times and then not at all. I found that I was limited with the amount of soundfonts I could use because it appears that there aren’t any sfArk to sf2 conversion software for Mac OS X… which is really too bad.
That is all I need help with for now — but I really appreciate it!
Ok Sasha – I’m glad it was so simple. But feel free to ask more if you need.
I experienced actually the same issues as your related to fluidsynth~ – it’s a great, but a bit limited tools.
Now I think, it’s better to use any VST or AU sampler instead of fluidsynth~, but it’s not as handy solution, as this external.
Yeah, I was thinking of looking into VST, but I will stick with fluidsynth~ at the moment.
Do you have any advice for me in terms of making the blue and green trackers work? There must be a simple answer that I am missing.
@yaniki Hmm, in my Max window I’ve noticed that I keep getting this error:
ascript, 262): Symbol not found: _JS_DefineFunctions
Expected in: /Applications/Max6/Max.app/Contents/MacOS/../Frameworks/MaxJSRef.framework/Versions/A/MaxJSRef
What is that about? Could that be a clue as to why the soundfonts aren’t functioning?
And about colour tracking: I see the problem… in my opinion this is something related to jit.findbounds object, not your patch (the same issue was discussed in the topic I mentioned).
But we can create several workarounds. Simplest trick is to split image into 3 components (RGB) and process them independently (see attached patch). It’s not very robust solution, I have something better in mind (based on solution from mentioned topic) and I send you patch based on this better architecture today later.
Try this patch. It’s just a color-tracking , but you can simple integrate it with you own portion of objects (just insert [r colorBounds1], [r colorBounds2] and [r colorBounds3] to the patch to receive data from color-trackers).
This patch can track 3 colors (red, green, blue on beginning – but you can change it, if you want) in the same time. Play a bit with tolerance parameter for every tracker and with brcosa (especially saturation).
If you want to change one of the colors to track choose tracker from menu in "displays and color selector" area, and click on pwindow (color of the pixel will be sent to the tracker).
This should be a bit more flexible solution, compared to the previous one, even if is a bit more complex (btw: I’m sure this is something that can be simplified).
Have fun with the patch and tell mi, if something is wrong or unclear.