< hello

 

resources

 

 

 

 
 

 

 
 

 

 
 

 

SuperCollider3, OSC & Gem on OSX: Getting Started

 

This page was last updated 3-Sept-04.
While writing this I am using pd-0.37-2 on OSX with the Gem G3 library...

 

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...
2. Tcl/Tk (if your system doesn't already have it)

 

[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...]

 

 

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.

 

Tips

Command Line Shortcuts

To 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 /usr/local/bin. Go there to double-check by typing ls /usr/local/bin . Instead, you want to move that executable to the folder /usr/bin. Any executable you put into that folder allows you to call the program simply by name without that huge path in front of it. So do this:

 

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 Files

It 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 sorry, couldn't find help patch for "Gem/gemwin.pd".

 

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 & WORKAROUNDS

Here 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:

 

- When you create a 'gemwin', it seems like you can't move it with your mouse when you're on OSX. I found out that if the window has a border ('border 1'), then you can drag it around if you hold down the Command key first. Very useful...

 

- I wanted to be able to get an unobstructed fullscreen display of the 'gemwin' on my screen, but found that I couldn't get the various PD windows to go behind it, or to bring the fullscreen gemwin to the front. Also, if you close the patcher window to get a better view of your gemwin, the whole patch turns off. The manual suggests using separate monitors, one for the output, and one for your patch and other programs. That will work fine for most cases where people don't need to see your screen, but for me I'm interested in being able to display my screen to others AND use it for lighting effecs when i perform. After some fiddling around I finally figured out that if you hit Command-h to hide the PD application (while in fullscreen mode), all of the windows will disappear while leaving behind the happy image that you created in Gem. Problem solved. Almost - the menu bar for Finder is still there.

 

- I've found that when doing fullscreen mode with Gem and communicating with OSC from SC3, you have to hide all windows in PD, SC, and on the Desktop, or else the OSC messages will be delayed and your computer will slow down almost to a debilitating halt. This becomes a HUGE problem if you're sending many OSC messages per second, and the result seems like a freeze of your computer while the Gem stuff will be going way way slow. I suggest building into your SC or PD patch something that makes the Gem stuff not kick in for say 10-60 seconds after starting your patch, so that you have time to hide your applications and get ready.

 

UNDER CONSTRUCTION

There should be more basic info soon as I delve further into this... Stay tuned.
.  .  .

 

 

PLEASE NOTE: For a number of personal reasons I am currently unable to support this page and am unable to respond to any further questions, requests, demands, etc posted here. I sincerely apologize for this. The material above is simply presented as archival material (some of it incomplete) of a project that I am not actively involved with anymore, and it will probably not be updated any further. You are free to use it in whatever non-commercial ways you wish (see the CreativeCommons license below). In addition, feel free to use the comments-section below to post ideas, solutions, or to ask questions, but with the understanding that any queries will have to be answered by the community at large - not by me. Thanks for understanding.

 

POST A COMMENT

   
  To post, please enter the following code:      
    Author:    

 

 

this page has been viewed 373 timeshttp://plus1plus1plus.org/Resources/SCplusGem
last updated 21 January 2010, at 04:28 PM PST

Creative Commons License

built with PmWiki
. Edit