FMSynth v0.1: Making Mac OS X Applications Distributable

fmsynth0.1Off an on I’ve been working on an FM synthesizer.  Today I finally hooked up an ugly UI so I can at least pass it around.  Since I wanted to pass this app bundle around and I was using portaudio as a dynamic library I had to do some magic to make the application distributable.  If you run xcodebuild then just hand off the app bundle to someone the app will crash at launch when the dynamic libraries are loaded.  The built app has by default an absolute path to wherever your dynamic library is stored.  You can check this by running “otool -L <executable path>” to see what dynamic libraries your executable is referencing.

At any rate, here is the script I wrote to make my app bundles distributable:

After you do something similar if you run “otool -L” everything should look sane.

Here is a link to an early release to the fm synthesizer.  You can play it with your keyboard.  There are tons of things that don’t work yet, like saving patches and the decay and sustain elements of the envelopes, but have fun anyways.  Maybe I’ll get around to posting more about how it works: FMSynth 0.1