BBOSC now as a framework

Hey All,

Pawel Solyga has done a great thing, and converted the BBOSC project from the half-assed state that I had committed it, into a nice framework. So now it is easy to integrate into all your Cocoa-based OSC apps.

Just grab the code from the repository and compile with the framework project. Works great!

obligatory code link:
http://code.google.com/p/bbosc/

thanks again Pawel!

This entry was posted in code, multitouch, openSoundControl. Bookmark the permalink.

16 Responses to BBOSC now as a framework

  1. thescreamingdrills says:

    When I try to compile BBOSC as an app, I get the following error:

    http://www.flickr.com/photos/27013844@N08/2711465568/sizes/o/

    It compiles fine as a framework. Unfortunately I don’t know how to add it to the BBTouch project file to compile, I tried dragging the bbosc/r6/trunk/src/build/Release/BBOSC.framework folder into xcode and dropping it underneath Frameworks, but I get Command/Developer/usr/bin/gcc-4.0 failed with exit code 1

    So I’m guessing I’m missing a step? Or maybe I should stop trying to do things I don’t understand (I doubt that will happen).

  2. Ben says:

    currently the BBTouch project has all the BBOSC code ‘built in’ which isn’t the right way to do it, but it is how i did it to get it out the door quickly.

    so if all you want to do is compile BBTouch, you dont need to do anything at all with the BBOSC framework. (the most recent code should be ready to compile with all the OSC goodness built right in)

    Also, just fyi, the best way to add a framework is to right click in your resources and go to ‘add existing frameworks…’ and go from there. (also i think there is a menu item in the project menu ‘add…’ or something. in any case, for the framework to do anything it needs to be ‘added’ by xcode to the project (just like any other resources or extra files) dragging them in usually does the same thing, but frameworks get a bit finicky i think, so i always do them the other way.

    hope this helps! let me know how you go!
    Cheers!
    -b

    As far as your error, that one is a doozy, and i havent seen it before. i will have to scratch my head a bit on that one. What system are you running? (OS/processor?)
    Also, which version of XCode? (you may have to be on 3.0 or even 3.1 since the BBOSC stuff was designed to be used on the iPhone as well, we had to use 3.1 to build it, so it might be chafing on an older version of the dev tools?) I would think that just 3.0 would work fine, but I am curious as to which version you are using.

  3. thescreamingdrills says:

    Thanks, I’m on an Intel MacPro with Leopard 10.5.4 with Xcode 3.0

    I see now I don’t need BBOSC, I’m getting the tuio signals fine- I used OSCListener (http://share.dj/downloads/OSC_Utilities.zip) to verify that BBtouch was sending something.

    Now if I can just figure out how to get the TUIO patch working in quartz composer I’d have something. Any tips? Here’s my step by step process.

    I download the latest tuio source from the reactivision project at sourceforge (http://sourceforge.net/cvs/?group_id=153998) and build the tuio.plugin from the TUIO_Quartz folder. I copy that to 3 places, just to be sure: /Library/Graphics/Patches, /Library/Graphics/Quartz Composer Plug-Ins, and /Library/Graphics/Quartz Composer Patches

    Then I launch bbtouch from the latest build (r89). I open up the xcode project and hit build and go, then verify I’m getting something with OSCListener. It outputs lines like ” [ 6a3ea1df79748189 /tuio/2dcur “source” “BBTouch” /tuio/2Dcur “alive” /tuio/2Dcur “fseq” 3753… etc. For some reason, if I launch the app that I already built from build/release folder OSCListener doesn’t detect any signals, but if build a new one it does.

    Then I launch the sample quartz comp (TUIODemo.qtz) that’s included with the code for the quartz patch. QC sees the patch and loads the comp normally, but I can’t get the comp to respond to touches.

    I don’t really expect you to troubleshoot this for me (I suppose that’s half the fun), but if you see something really obvious/idiotic I could sure use a hint.

    Thanks for all your work so far, it’s much appreciated.

  4. Ben says:

    Hey Drills,

    hmm.. I havent played with the QC Patch. tho i had heard a rumor that it was fiducial only (that might be totally false, but i recall it for some reason) if that is the case, then BBTouch and the qc patch wont play nice (BBTouch generated TUIO Cursor events, fiducials are TUIO object events)

    I know there was a big discussion on NUIgroup somewhere about it, and i thought that the reactivision dude had said that the new one was all cursor friendly, but i dont remember it too clearly :-)

    anyhow, i would start there, check to make sure that the QCPatch does indeed do something with cursor events.

    Good luck!
    -b

  5. thescreamingdrills says:

    ben,

    thanks for the help, the new one does in fact do cursor events (though curiously it seems to have dropped fiducial support). In any case, I’ll keep trying, I’m sure I’m just missing something obvious. And yeah, the info I got was from that thread on nuigroup.

  6. Ben says:

    oh! excellent then (the cursor stuff) I was wanting to play with it at some point anyhow, maybe this is just the motivation i need :-)

  7. Ben says:

    hey drills,

    i cant get it to work either, in fact, i cant even get the ‘working composer sample’ to load properly. i get this error:

    > (null)
    : Patch with name “QCPlugInPatch:TuioPlugIn” is missing

    > Macro Patch
    Cannot create node of class “QCPlugInPatch” and identifier “TuioPlugIn”

    > Macro Patch
    Cannot create connection from ["outputObjects" @ "PlugInPatch_TuioPlugIn_1"] to ["inputStructure" @ "StructureMember_index_1"]

    > Macro Patch
    Cannot create connection from ["outputObjects" @ "PlugInPatch_TuioPlugIn_1"] to ["inputStructure" @ "StructureCount_1"]

    > (null)
    State restoration failed on

    so, there you go… I guess there is only one solution to this problem: write my own BBTouch QC Patch.. .. sigh… all this code is SERIOUSLY cutting down my world of warcraft playtime :-)

  8. thescreamingdrills says:

    Ben – I wouldn’t stress about QC. I think the error you are getting is because you are using an old plugin. You have to compile the new one yourself (from the cvs here: http://sourceforge.net/cvs/?group_id=153998 – the mudulename is TUIO) and it will get the patch loaded with no errors. I just can’t figure how to get the patch to respond. Anyway, I’m going to keep playing with it and I’ll let you know if it does work.

  9. Ben says:

    huh, that is where i got the code i used, and i compiled a brand new one.. prolly did something wrong… i will try again tomorrow :-)

    also, while i was kind half-joking about writing my own QC patch, i do have one kinda half-finished, and it really just needs a few hours of love and care and it will be all finished. Tho i will warn anyone out there who might be getting all excited about the prospect of a new QC patch: it is not TUIO compliant. (if i ever finish it, and if it works well, i might add the tuio stuff into it, but at the moment it is all about remote messaging (ala distributed objects) which is about a billion times simpler to code (upside :-), and a billion times less compatible with anything else (downside :-( but as it would only really need to be used with BBTouch then thats OK. Anyway, it is still vaporware so why am i even writing about it? i dont know.

    cheers!
    -b

  10. sandor says:

    Hey Boys,

    the QC patch works fine for me. Also it supports fiducials as well as cursor (including velocity etc.)… The patch is a bit instable (it crashes sometimes) but works otherwise well. Just put it in the appropiate folder (/Library/Graphics/Patches) – @screaming: don’t put that on THREE locations mate! ;-) Fire up your OSC server, start TUIOsimulator (on that way you can test the fiducials also) and go ahead. I will try to post today evening something with cursor support. Till than here are the compiled version of the plugin and a working example:

    http://workflow.cd-cologne.de/download/tuio.zip

    Cheers!

    Sandor

  11. sandor says:

    >>edit: sorry it should be /Library/Graphics/Quartz Composer Plug-Ins and not Patches….

  12. sandor says:

    >>Edit2: Hey Ben, why don’t you write a “BBTouch make object rotatable/scalable” Patch with input for text, image and QC-composition? I’m not sure but playing with THAT would make more fun thna Worldcraft i suppose ;-) ;-)

    Groovy, baby!

    Sandor

  13. Ben says:

    Aha! thanks Sandor, i think i know what i did wrong (i was in a big ole’ hurry this morning when i was playing with it, and having just written a few image units for my abortive attempt to get the CIImage/CIFilter thing working i was so used to putting things in the image units folder, i bet i put it in the wrong place! easy fix, i will try that when next me and the work machine meet (it is ALL the way upstairs and i am too lazy to go and deal with it right now. right now there is wine to drink, and curry to stir :-)

    as for an object rotate/scale in QC, i think it may be possible, (i was thinking about something similar all day while i was running about) I will need to do some more research into the QC thing.

  14. sandor says:

    Hey Gents,

    here is a little application stripped together from some stuff i found on the web (http://lists.apple.com/archives/quartzcomposer-dev/2008/Feb/msg00079.html) and my things…

    You can assign the TUIO stuff instead of the mouse for X and Y. Rotate i quess will work for now only with fiducials (since you have to use 2 fingers for rotate and scale in MT). Simply assign a key value to the structure Key Member (xpos or ypos for example) and connect that wherever you want (can). Pleas note that you have to pass through TUIO infos from a tracker or from the TOIUsimulator to the QC TUIOclient before you can see some values inside of QC…

    http://workflow.cd-cologne.de/download/QC_surface.zip

    I am upping this mainly to demonstrate that even it is possible to deal wit MT stuff inside QC, a REAL MT-Patch with the ability to:
    - scale/rotate/move the connected content automaticaly

    With the possibilities for connecting (as input node):

    - single images
    - single movies
    - folders (with alowed data like movie and images)
    - text input (static and dynamic via onscreen keyboard)
    - QC compositions (maybe assign specific compositions to specific fiducials?)

    etc. etc. would be a LOT of fun and realy very usefull for building some user-level applications…

    Also for your amusement a nifty little MT fake here:

    http://tlrobinson.net/iphone/lighttable/

    Bon appetit, cheers! Groovy! ;-)

    Sandor

  15. thescreamingdrills says:

    yeah thanks sandor, I redid the whole process and now I can get BBtouch to interact with QC! Something is still off on the QC end, however, but at least I can make a teapot appear and disappear.

  16. Ben says:

    hey fellas,

    just woke up (still have that sleepy gunk in my eyes) but i had a read of the links sandor supplied and that looks great! I havent actually looked at the composition yet, but it sounds like just the thing i was wanting to look into as a reference for my half-baked BBTouchQC thing.

    the more i play with QC the more i think that it is really the place to build MT apps.. I am actually doing some cutting and drilling and assembling today on my new table (i am retrofitting an old wooden lab table from the university, i’ll post images when it looks like something :-)

    anyway, i will find time today sometime to have a look! i am excited!

    cheers!
    -b

Leave a Reply