[CM] clm, slime

andersvi at notam02.no andersvi at notam02.no
Tue Jun 25 01:34:48 PDT 2013


    J> I would just like to interact with clm from slime for instrument
    J> building, testing etc.

    J> Is there some info on this, or have I misunderstood and am
    J> totally going the wrong way with this?

Youre definitely not on a wrong path.  Slime provides extremely powerful
interaction for everyting common-lispy, also sbcl/clm.

First make sure slime is set up and running.  If 'M-x slime' gets sbcl
running and gives you a *slime-repl* buffer you should be fine.

For clm, you'll need to have your .ins files in lisp-mode when editing.
Putting:

  (add-to-list 'auto-mode-alist '("\\.ins$" . lisp-mode))

inside .emacs will make emacs do this for you.

In clm, the standard mode is working on a separate instrument file -

  (definstrument ...
        (run ...))

compiling and loading it, fex. by hitting "C-c C-k" inside the
.ins-buffer in slime, or following the example about v.ins in
README.clm.

Then calling it from a score:

(with-sound (various-file-options)
  (instrument-call 1)
  (instrument-call 2)
  ...)

But here the repl isnt very useful.  Usually you dont spend much time
coding in the 'slime-repl* buffer when working on larger bits of code,
eg. instruments or score-files.

Instead you typically set up files in lisp-mode (.cl, .clm or somesuch)
to hold variations and sketches, projects etc., moving around in these,
evaluating regions or expressions.  Here slime comes in with all its
powers, giving you auto-completion, cross-referencing,
documentation-lookup, editing expressions, evaluation of regions,
looking up arglists etc.

You could read the basic slime-docs from a info-file or similar.  Or
have a look in the various menus.

Good luck finding your ways around.

-anders



More information about the Cmdist mailing list