how to install slippery chicken 'by hand'

Introduction

The following describes how to install slippery chicken and related packages for use with Emacs and the SLIME Emacs↔Lisp interface.

Lisp

Any lisp implementation should work but these days most of us use SBCL: http://www.sbcl.org/

On Macs this should be very simple to install. Just open your terminal app and issue the following command:

brew install sbcl

Linux has its own application managers similar to brew, e.g. yum or apt.

C Compiler

If you intend to use CLM (for sound file generation) you'll need a C compiler. On most UNIX systems (including Apple's OSX) you'll already have the GNU C compiler. You can check whether yours is ready to go by typing the following command in your terminal:

gcc -v

You should get some version details starting with something like this:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

If you don't have gcc, on OSX 10.9 and above you can install command line tools without the full installation of XCode. Type the following in the terminal application:

xcode-select --install

Emacs

Grab your preferred version of the text editor Emacs: Aquamacs on OSX or Emacs for all systems:

http://aquamacs.org
https://www.gnu.org/software/emacs/

SLIME

This is the interface between Emacs and Lisp running as a subprocess within Emacs. Grab the latest source from https://github.com/slime/slime/releases and unpack it wherever you like. Read all about it at https://common-lisp.net/project/slime/

Lilypond

If you want to generate beautiful scores from within slippery chicken, install Lilypond from http://lilypond.org/

Lisp software

CLM

If you intend to write sound files using slippery chicken you'll need to install Common Lisp Music (CLM).

Grab the latest CLM source code from https://ccrma.stanford.edu/software/clm/

CMN

If you want to write scores quickly using Common Music Notation, grab the latest CMN from https://ccrma.stanford.edu/software/cmn/

slippery chicken

Get the latest source code from http://michael-edwards.org/sc/source.html or https://github.com/mdedwards/slippery-chicken

If downloading from github.com create an empty 'bin' directory at the same level as the directory containing all the slippery chicken .lsp files. For more details on git see using github

Initialisation files

In order for all the software to work together we'll need two initialisation ('dot') files in your home directory (abbreviated to ~/ on UNIX systems). You can write these with your favourite text editor (Emacs, no doubt) but beware that some operating systems don't like you writing 'dot' files so you'll have to persuade them somehow.

~/.emacs

;;; replace with correct path of slime  
(add-to-list 'load-path "~/slime-2.20/") 
(require 'slime)
(setq slime-lisp-implementations
      '((sbcl ("/usr/local/bin/sbcl" "--core"
               ;; replace with correct path of sbcl
               "/usr/local/Cellar/sbcl/1.4.0/lib/sbcl/sbcl.core"
               "--dynamic-space-size" "2147"))))
(slime-setup '(slime-fancy))

~/.swank.lisp

;;; replace these paths with the correct locations of clm, cmn, and slippery 
;;; chicken.
(load "~/lisp/clm-5/all.lisp") ; <-- if you're going to use it
(load "~/lisp/cmn/cmn-all.lisp") ; <-- if you're going to use it
(load "~/sc/src/all.lsp")

Starting Lisp in Emacs

Once you've fired up emacs you need to start Lisp by issuing the command 'slime'. You do this by typing Alt x (or Escape x) then slime. The 'alt' key is 'option' on Macs. (Alt x creates the prompt in the mini-buffer at the bottom of the Emacs window; you then type your command there and hit return.)

Once Lisp has started you should see a prompt. To get into the slippery chicken package type either (sc) or (in-package :sc)

In order to quit Lisp you do Alt x slime-quit-lisp