2 Quick Start
2.1 Setting up SND and Emacs
This is how I work. Perhaps you'll find this setup comfortable.
Download and unpack the latest version of snd-ls from http://www.notam02.no/arkiv/src/snd/
Compile and install it like this:
./build
./installLink a ``scheme'' executable so that it points to the snd-ls binary
ln -s `which snd-ls` ~/bin/scheme
Start the jack server
Start emacs
Maximize Emacs so that it fills the whole screen
Load the file called ``rt-examples.scm'' into Emacs.
Split your window in two parts: C-x 2
Move the cursor to lower part window: C-x o
Run snd-ls: M-x run-scheme
Hide the SND window behind the Emacs window. We don't need to look at SND.
Move the cursor to the upper part window: C-x o
Evaluate blocks of code by placing the cursor inside a block and press Ctrl+Alt+x
2.2 Two short examples
1.
(let ((osc (make-oscil))) (<rt-play> 0 3 (lambda () (out (* 0.8 (oscil osc))))))
A sinus is/should be heard for three seconds.
2.
(define-rt2 (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (fib 30) -> 832040.0
(There are more examples in the file rt-examples.scm)