Steps I took to get OSC working with v0.04

Hi folks,

This is an amalgamation of tips from these posts:

http://forum.openframeworks.cc/t/osc-for-of/198/0
http://forum.openframeworks.cc/t/how-to-add-osc-addon/291/0

…as well as my own tweaks that I used to get OSC working with
v0.04 on Mac OS X (10.5.2) with Xcode (3.0) (running on Intel MacBook
Pro). Perhaps it will help someone else who wants to get it working to
mess around currently. I was too impatient to wait for 0.05. :wink:

  1. Downloaded v0.04 and compiled test app in Xcode to confirm that was
    working (audioInputExample is a good one, as I’ll reference that later).

  2. Downloaded ofOsc.zip: http://openframeworks.cc/files/ofOsc.zip

  3. Unzipped ofOsc.zip, and placed the two example apps
    (oscReceiveExample and oscSendExample) in the main openFrameworks apps
    folder.

  4. In ofOsc/libs folder, copied the oscpack folder to the add-ons
    folder in openFrameworks.

  5. In ofOsc/libs/openFrameworks/communication folder, copied the osc
    folder to the main libs folder in the openFrameworks folder, under the same path: libs/openFrameworks/communication.

  6. Opened osc example project (in my case, tried oscSendExample).

  7. Deleted oscpack, openFrameworks & fmod folders from ‘requiredLibs’
    section in Xcode (in “Groups and files list” on the left).

  8. Selected main openFrameworks icon in left section, then in menu went to Project -> Add to Project (or key combo option-command-A), and found both the default fmodex lib folder in main openFrameworks libs, and oscpack in addons that I had copied over just before. I also added back the main openFrameworks folder from the openFrameworks libs folder. I organized them all by placing the imported libraries back under requiredLibs. If you wanted to, you could re-organize the folders to match more closely newer organizational schemes, with openFrameworks/addons/other libs folders…I was lazy and didn’t though.

Also, when importing, I did not select “Copy items into destination group’s folder (if needed).”

  1. At this point, the code compiled for me (with warnings, which I ignored with no problems), but would not run–I was getting the error in the debugger that “dyld: Library not loaded: ./libfmodex.dylib.” I had to poke around for a while, but I found this finally in the audioInputExample Xcode project: under Targets->openFrameworks, add a new build phase, “New Run Script Build Phase.” You can either put this in, or copy it from the Run Script build phase in audioInputExample (what I did):

cp -f …/…/libs/fmodex/lib/libfmodex.dylib “$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib”
install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib “$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME”

Voila (after tweaking the code to match port for SC3 and send a properly formatted new synth OSC message):
http://dubitable.com/supercollider-and-of.jpg

Let me add that this is probably not how Zach and Theo would do this, especially in terms of where I put the libraries…just one way to get it done. According to this thread, Zach and Theo are working on getting this tightened up now so it’ll be easier going forward:

http://forum.openframeworks.cc/t/osc-for-0.04/325/0
http://forum.openframeworks.cc/t/addons,-coming-with-0.05–hold-tight…/360/0

Anyways…perhaps this will help in the meantime. Zach and Theo, if you’d like some help on this aspect of openFrameworks at all let me know…

Best,
Dave

awesome !

if it’s at all helpful, you can take a peak at 0.05 (this is before few more days of bug fixing – we noticed a ton of bugs in the london workshop to attack) and see how do osc there:

http://openframeworks.cc/files/005-rc/

this is not the actual release, but close. we will release a normal one and a “fat” one with a few addons already in (like osc, opencv, etc) but other ones will have to be added, using the install.xml as a starting point. we’ll try to make it as clean as we can.

I’m sure alot of folks will find this helpful in the meantime for getting it up and running in 0.04

thanks again to damian frey for the great osc addon !!

take care,
zach

if it’s at all helpful, you can take a peak at 0.05 (this is before few more days of bug fixing – we noticed a ton of bugs in the london workshop to attack) and see how do osc there:

Nice…I was able to download the two zip files there, and, by copying the addons folder from 0.05_devcpp_RC over to the xcode folder (and copying ofTypes.h into the utils directory under libs/openFrameworks–it was missing for some reason) I compiled and ran the addon_oscSenderExample project with no further tweaking. Super easy!

The organization also seems really clear and smart. I’m digging it so far…I’ll keep messing around with it.

thanks again to damian frey for the great osc addon !!

Definitely, it’s great to be able to play with OSC and openFrameworks…thanks Damian and Zach!

Best,
Dave