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.
-
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). -
Downloaded ofOsc.zip: http://openframeworks.cc/files/ofOsc.zip
-
Unzipped ofOsc.zip, and placed the two example apps
(oscReceiveExample and oscSendExample) in the main openFrameworks apps
folder. -
In ofOsc/libs folder, copied the oscpack folder to the add-ons
folder in openFrameworks. -
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. -
Opened osc example project (in my case, tried oscSendExample).
-
Deleted oscpack, openFrameworks & fmod folders from ‘requiredLibs’
section in Xcode (in “Groups and files list” on the left). -
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).”
- 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