Introduction to ccrma and clm
Here's a more detailed look at the lisp world as usually used here at ccrma... Three different packages are compiled as part of the Common Lisp executable, CLM (sound synthesis and processing), CMN (common music notation) and CM (algorithmic composition).
Several ways to run lisp at ccrma... During 220a we will be using Linux or Irix and we'll be running the common lisp executable image as a subprocess of the xemacs editor.
The source files are usually ".lisp" or ".ins" (instrument) files. The compilation process generates a fast load compiled file, ".fasl"/".fisl" or ".fusl" depending on the platform you are running and a object file ".o" or ".so" depending on the platform.
A very simple instrument, just one sine wave with an envelope. You'll see the basic components of an instrument repeated over and over. The basic components are always the same...
Let's split it into three parts so that we can analyse it easily. The first part declares the instrument (defines and names the instrument and its parameters), the second part defines the "unit generators" or black boxes that will be connected together in the third part. The third part is the "run" loop that generates the samples that are merged into the output soundfile. It "connects" together the unit generators and creates a sample (number) for each iteration of the loop.
"make-oscil" creates the oscillator, "oscil" uses it; "make-env" creates the envelope, "env" uses it.
and here's the text:
(definstrument simp (start-time duration frequency amplitude &key (amp-env '(0 0 50 1 100 0))) (multiple-value-bind (beg end) (get-beg-end start-time duration) (let ((s (make-oscil :frequency frequency)) (amp (make-env :envelope amp-env :scaler amplitude))) (run (loop for i from beg to end do (outa i (* (env amp) (oscil s))))))))Some ways to use our sinewave oscillator through the "with-sound" macro:
This is what you do to interact with clm, first create a file with the instrument code in it, compile and load it in the lisp interpreter, test it. If not happy then edit it and go back to the beginning of the loop. Sometimes testing involves just changing parameters to the instrument call and that does not require a recompilation...
The NEXTSTEP world (both "black hardware" and PC's...). PC's are no good under NEXTSTEP because of the lack of a good lisp...
The Linux world, Pentium and Pentium Pro PC's running acl 4.3.
The Irix world, an Indy and an O2, both running acl 4.3.
A map of available CCRMA machines...
|©1996 Fernando Lopez-Lezcano. All Rights Reserved.|