|
resources
Coding
Electronics
PmWiki
SuperCollider3
|
SuperCollider3, OSC & Gem on OSX: Getting Started
This page was last updated 3-Sept-04.
I am currently trying to connect SuperCollider3 to the realtime image-processing library, Gem. So far I have been successful, but have not yet found out what sort of ram, latency, or other conflicts between the image and sound that I might run into. In order to run Gem you have to install and run Miller Puckette's open-source endeavour PD (Pure-Data).
What you need to download
1. Either the PD source or a precompiled version of PD...
[I'm not sure if the precompiled versions of PD are as reliable yet as just getting the source and compiling it yourself, so i recommend getting the PD source and the additional libraries listed below. The comments and suggestions following this section will apply mostly to trouble-shooting this procedure...]
-The Gem library for OSX
-The OSC (OpenSoundControl) library for PD
Actually, for the OSCx library, you're much better off downloading it through cvs in Terminal, or else you'll have to download every file by hand AND change the executable bit on some of the files - trust me, that is time consuming and un-fun. Here's the easy way:
In Terminal go to the directory where you want the folder to be downloaded (if you don't know the 'cd' command, see my ). Then type (or copy and paste):
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pure-data login
Hit enter. When it asks for a password, don't type anything, just hit enter again. Then type:
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pure-data co externals/OSCx
Wait a bit for it to all download, and then you're done with this part... I can't remember if I then had to compile it or not. Read the 'ReadMe' file to see what you have to do next...
What Next?
I apologize but I can't remember everything that I had to do to get things to work right. It wasn't as easy as I would've liked it to be, but hopefully by the point you read this the PD developers will have improved the various distributions. I've found that unfortunately the PD distribution has much less reliable compilation instructions and make-files than the SC3 sources do, so you might have to do some tinkering to get things to compile correctly. It seems like everything is geared more towards Linux users and people who deal with this sort of tinkering all the time. Keep an eye on the precompiled package I mentioned above. Someday that will be the easy way out.
TipsCommand Line ShortcutsTo run PD, you have to type:
/Applications/pd-0.37-2/bin/pd
There are two different shortcuts though. When you installed pd (remember './configure', 'make', then 'make install'??), a copy of pd was installed in
mv /usr/local/bin/pd /usr/bin/
Now you can simply type 'pd' and pd will start up.
The second and even more useful shortcut is to create a file called '.profile', '.pdrc' or something else like that in your home directory (you have to do this using Terminal and a command-line program like 'vim' -- or maybe you can also use TextEdit - i don't know?) that simply has a line in it that says the following:
alias pd="/Applications/pd-0.37-2/bin/pd"
By using this method you can add various flags that you always intend to use, for instance automatically loading the Gem and OSC libraries without having to say so (beware this one also turns OFF pd's audio and midi - which is more efficient if you're using SC3 for sound):
alias pd_gem="/Applications/Apps.Audio/pd-0.37-2/bin/pd -lib Gem -lib OSC -noaudio -nomidi"
**Note that you will have to quit Terminal and then restart it for any new alias to take effect**
And you can obviously create other alias names for different things, so that maybe you have one for just using Gem, one for just using audio, etc...
Enabling Gem Help FilesIt took me awhile to be able to open Gem-related help files in PD. I was going through the Gem tutorial and whenever I tried to open the help file for a Gem-specific object, the Terminal window would say
The trick to get this working correctly is to create a 'symbolic link' named 'Gem/' in the 'pd-0.37-2/extras' folder , that then points to the 'gem/gem_help' folder. A symbolic link is like a regular alias that you'd create in the Finder except that the system understands it in a different way. I don't know exactly why, but I do know that if you just make a regular alias in the Finder, PD still won't be able to find the folder. You have to go into Terminal and do the following:
ln -s /Applications/pd-0.37-2/gem/gem_help/ /Applications/pd-0.37-2/extra/Gem
**Note: I found out the hard way that you can't use relative paths (i.e. gem/gem_help/ extra/Gem); you have to use paths starting all the way from root (/) (absolute paths) for it to work correctly.**
In your Finder you'll now see what looks and acts like a regular Alias, but this one is slightly different under the hood. And now you should be able to open Gem help files...
GEM QUIRKS & WORKAROUNDSHere are some things that I had to find out by either asking folks on the pd-list or just fussing around because I couldn't find documentation:
|