[plt-scheme] Re: plt-scheme Digest, Vol 17, Issue 15

From: geb a (geb_a at yahoo.com)
Date: Mon Jan 8 10:59:16 EST 2007

Hi Noel,

Here is what we found out while trying to install rsc
over supercollider.

Hope it helps,

Dan Anderson

The following instructions were developed by Domink
Lehner for my lab with the help and guidance of Rohan
Drape and were invaluable in getting Scheme to work
with SuperCollider.  

SuperCollider Installation:
The whole process of setting up rsc, supercollider and
jack is somewhat complicated.

Installing Jack:
Jack can be installed with yum:
yum install jack-audio-connection-kit
yum install jack-audio-connection-kit-devel


SuperCollider is not available via yum, so you will
have to use wget and rpm to install it.


Super Collider also requires a proper direcotry tree. 
On my computer I made a directory called
in my home directory.  Within that directory, make two
directories called 'sounds' and 'synthdefs'.  The
command should take care of this: 

mkdir -p ~/supercollider/{sounds,synthdefs}


Certain environment variables have to be set so that
you will hear output on your speakers.  Add the
following lines 
to the end of your ~/.bash_profile file:

export SC_PLUGIN_PATH=/usr/lib/SuperCollider/plugins

In order for these changes to take effect, you will
need to log out and back in.


1) Setup a directory structure for rsc.  In my case I
made a directory called 'rsc' in my home directory,
and a directory called 'darcs'
within the rsc directory, so it now looks like this:

If you don't have darcs installed:   yum install darcs

Download all the resc files using darcs.  The
following commands should do it:

cd /home dlehner/rsc/darcs
darcs get http://www.slavepianos.org/rd/sw/sw-01
darcs get http://www.slavepianos.org/rd/sw/sw-57
darcs get http://www.slavepianos.org/rd/sw/sw-43
darcs get http://www.slavepianos.org/rd/sw/sw-54
darcs get http://www.slavepianos.org/rd/sw/sw-50
darcs get http://www.slavepianos.org/rd/sw/sw-73
darcs get http://www.slavepianos.org/rd/sw/sw-62

Create symlinks from PLT's collects cirectory to the
newly downloaded directories (replace the scheme
version number with what you have).  If the collects
directory doesn't exist you can create it.

These files/programs are from Rohan Drape 

++ ~/.emacs

(push "/home/rohan/sw/sw-01/emacs" load-path)
(setq rsc-interpreter "mzscheme3m")
(require 'rsc)))

++ ~/.rsc.scm

(require (lib "rsc.ss" "rsc")
         (lib "rscG.ss" "rscG")
         (only (lib "process.ss") system))

(define s (open-udp* "" 57110))

(define Q (make-schedule*))

(define (boot*)
  (putenv "SC_PLUGIN_PATH"
  (putenv "SC_SYNTHDEF_PATH"
  (system "scsynth -u 57110 &")
  (sleep 0.5)
  (reset s))

(define (draw* g)
  (draw g "/tmp" "dotty"))

;here is a sample progam

 (define analog-bubbles
   (let* ((a (MulAdd (LFSaw kr (Mce 8 7.23) 0) 3 80))
          (b (MulAdd (LFSaw kr 0.4 0) 24 a)))
     (CombN (Mul (SinOsc ar (MIDICPS b) 0) 0.1) 0.2
0.2 4)))

 (play s analog-bubbles)

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.