[CM] Request
Taube, Heinrich K
taube at illinois.edu
Sun Apr 10 12:33:41 PDT 2016
CLM is also scheme/C now and is built into Grace. You can get access to 95% of CLM instruments by just selecting “Instrument Browser...” from the Audio menu -- you will have tons of instruements to explore, and you can sort them by type.
> On Apr 10, 2016, at 6:52 AM, Daniel Hensel <danielhensel at icloud.com> wrote:
>
> Hello to the community,
>
> my name is Daniel Hensel, I am a german composer. At first I have to apologize bothering you! I recently downloaded „Grace“ and tried to play around a little, which led me to the website of Common Lisp Music. So I tried to use the clm-examples in Grace, until I found out, that Grace uses Scheme instead of Lisp. Is this the reason why cml-examples are not working? I got the following Errors for the following example entered in the Grace-Editor:
>
> (definstrument examp2 (start-time duration frequency amplitude
> &optional (amp-env '(0 0 50 1 100 0)))
> (let* ((beg (floor (* start-time sampling-rate)))
> (end (+ beg (floor (* duration sampling-rate))))
> (sine-wave (make-oscil :frequency frequency))
> (amp (make-env :envelope amp-env :scaler amplitude
> :start-time start-time :duration duration)))
> (Run
> (loop for i from beg to end do
> (outa i (* (env amp) (oscil sine-wave)))))))
>
>
> Error: >>> Error: car argument, examp2, is a symbol but should be a pair
> (car args) ; args: examp2
> ((name (car args)) (targs (cdr args)) (utargs ...
> (examp2 (start-time duration frequency amplitu...
> (definstrument examp2 (start-time duration fre...
>
>>>> Error: beg: unbound variable
> ((beg (floor (* start-time sampling-rate))) (e...
> ((floor (* start-time sampling-rate)))
> ((end (+ beg (floor (* duration sampling-rate)...
> ((beg (floor (* start-time sampling-rate))) (e…
>
> Three years ago I worked with Csound, PD and SuperCollider. But then I discovered CLM and Common Music, so I wanted to give it a try, I admit, that I am a real Lisp-newbie.
>
> So I installed Clisp, Sbcl, Clozure-Cl via homebrew on my mac. But I cannot get Common Lisp Music working. I also cannot find a working „how-to“ for OS X 10.11.4. I put the folder clm-4 into my brew-cellar. I created a .swank-file, which should load clm for slime. It looks like this:
>
> (load "/usr/local/Cellar/clm-4/all.lisp")
> (in-package :clm)
> (compile-file "/usr/local/Cellar/clm-4/nrev.ins")
> (load "/usr/local/Cellar/clm-4/nrev.fasl")
>
>
> What would you recommend to do? To ignore CLM totally and just to work with Grace? I’d like to learn clm from scratch. When I try the CLM-Example in my Emacs, it looks like this:
>
> When I load CLM, it looks like this:
> CL-USER> (load "/usr/local/Cellar/clm-4/all.lisp")
> ; using existing configuration file mus-config.h
>
> ;loading /usr/local/Cellar/clm-4/clm-package.fasl
> ;loading /usr/local/Cellar/clm-4/initmus.fasl
> ;loading /usr/local/Cellar/clm-4/sndlib2clm.fasl
> ;loading /usr/local/Cellar/clm-4/defaults.fasl
> ;loading /usr/local/Cellar/clm-4/ffi.fasl
> ;loading /usr/local/Cellar/clm-4/mus.fasl
> ;loading /usr/local/Cellar/clm-4/run.fasl
> ;loading /usr/local/Cellar/clm-4/sound.fasl
> ;loading /usr/local/Cellar/clm-4/defins.fasl
> ;loading /usr/local/Cellar/clm-4/env.fasl
> ;loading /usr/local/Cellar/clm-4/export.fasl
> ;loading /usr/local/Cellar/clm-4/clm1.fasl
> T
>
> Later I tried:
>
> (definstrument auto (dur)
> (let ((os (make-oscil))
> (need-close (not *output*))
> (end (floor (* dur *srate*))))
> (if (not *output*)
> (setf *output* (open-output "/zap/test.snd")))
> (run
> (loop for i from 0 to end do (outa i (* .1 (oscil os)))))
> (when need-close
> (close-output *output*)
> (dac "/zap/test.snd"))))
>
>
> But I just got:
>
> ; Writing "/usr/local/Cellar/clm-4/clm_AUTO.c"
> Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded.
> Backtrace for: #<SB-THREAD:THREAD "repl-thread" RUNNING {1005400003}>
> 0: (SB-INT:SIMPLE-EVAL-IN-LEXENV CM #<NULL-LEXENV>)
> 1: (EVAL CM)
> 2: (SWANK::EVAL-REGION " cm
> ")
> 3: ((LAMBDA NIL :IN SWANK-REPL::REPL-EVAL))
> 4: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1004AC306B}>)
> 5: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1004AC2FCB}>)
> 6: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1004AC2FAB}>)
> 7: (SWANK-REPL::REPL-EVAL " cm
> ")
> 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL " cm
> ") #<NULL-LEXENV>)
> 9: (EVAL (SWANK-REPL:LISTENER-EVAL " cm
> "))
> 10: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL " cm
> ") "COMMON-LISP-USER" 16)
> 11: (SWANK::SLDB-LOOP 3)
> 12: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT :IN "/Users/danielhensel/quicklisp/dists/quicklisp/software/slime-2.14/swank/sbcl.lisp") #<FUNCTION (LAMBDA NIL :IN SWANK::DEBUG-IN-EMACS) {10042F4E6B}>)
> 13: (SWANK::DEBUG-IN-EMACS #<UNBOUND-VARIABLE CLM {100490FE73}>)
> 14: (SWANK:INVOKE-SLIME-DEBUGGER #<UNBOUND-VARIABLE CLM {100490FE73}>)
> 15: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK:SWANK-DEBUGGER-HOOK) {100490FEDB}>)
> 16: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/danielhensel/quicklisp/dists/quicklisp/software/slime-2.14/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK:SWANK-DEBUGGER-HOOK) {100490FEDB}>)
> 17: (SWANK:SWANK-DEBUGGER-HOOK #<UNBOUND-VARIABLE CLM {100490FE73}> #<unavailable argument>)
> 18: (SB-DEBUG::RUN-HOOK *DEBUGGER-HOOK* #<UNBOUND-VARIABLE CLM {100490FE73}>)
> 19: (INVOKE-DEBUGGER #<UNBOUND-VARIABLE CLM {100490FE73}>)
> 20: (ERROR UNBOUND-VARIABLE :NAME CLM)
> 21: ("UNBOUND-SYMBOL-ERROR" CLM)
> 22: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #X05892000) #<unavailable argument>)
> 23: ("foreign function: call_into_lisp")
> 24: ("foreign function: funcall2")
> 25: ("foreign function: interrupt_internal_error")
> 26: ("foreign function: signal_emulation_wrapper")
> 27: ("foreign function: stack_allocation_recover")
> 28: ("foreign function: stack_allocation_recover")
> 29: (SB-INT:SIMPLE-EVAL-IN-LEXENV CLM #<NULL-LEXENV>)
> 30: (EVAL CLM)
> 31: (SWANK::EVAL-REGION " clm
> ")
> 32: ((LAMBDA NIL :IN SWANK-REPL::REPL-EVAL))
> 33: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100490CA7B}>)
> 34: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100490C9DB}>)
> 35: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100490C9BB}>)
> 36: (SWANK-REPL::REPL-EVAL " clm
> ")
> 37: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL " clm
> ") #<NULL-LEXENV>)
> 38: (EVAL (SWANK-REPL:LISTENER-EVAL " clm
> "))
> 39: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL " clm
> ") "COMMON-LISP-USER" 14)
> 40: (SWANK::SLDB-LOOP 2)
> 41: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT :IN "/Users/danielhensel/quicklisp/dists/quicklisp/software/slime-2.14/swank/sbcl.lisp") #<FUNCTION (LAMBDA NIL :IN SWANK::DEBUG-IN-EMACS) {10042F4E6B}>)
> 42: (SWANK::DEBUG-IN-EMACS #<UNBOUND-VARIABLE CLM {10046892C3}>)
> 43: (SWANK:INVOKE-SLIME-DEBUGGER #<UNBOUND-VARIABLE CLM {10046892C3}>)
> 44: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK:SWANK-DEBUGGER-HOOK) {100468932B}>)
> 45: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/danielhensel/quicklisp/dists/quicklisp/software/slime-2.14/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK:SWANK-DEBUGGER-HOOK) {100468932B}>)
> 46: (SWANK:SWANK-DEBUGGER-HOOK #<UNBOUND-VARIABLE CLM {10046892C3}> #<unavailable argument>)
> 47: (SB-DEBUG::RUN-HOOK *DEBUGGER-HOOK* #<UNBOUND-VARIABLE CLM {10046892C3}>)
> 48: (INVOKE-DEBUGGER #<UNBOUND-VARIABLE CLM {10046892C3}>)
> 49: (ERROR UNBOUND-VARIABLE :NAME CLM)
> 50: ("UNBOUND-SYMBOL-ERROR" CLM)
> 51: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #X05890000) #<unavailable argument>)
> 52: ("foreign function: call_into_lisp")
> 53: ("foreign function: funcall2")
> 54: ("foreign function: interrupt_internal_error")
> 55: ("foreign function: signal_emulation_wrapper")
> 56: ("foreign function: stack_allocation_recover")
> 57: ("foreign function: stack_allocation_recover")
> 58: (SB-INT:SIMPLE-EVAL-IN-LEXENV CLM #<NULL-LEXENV>)
> 59: (EVAL CLM)
> 60: (SWANK::EVAL-REGION "clm
> ")
> 61: ((LAMBDA NIL :IN SWANK-REPL::REPL-EVAL))
> 62: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100462607B}>)
> 63: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1004625FDB}>)
> 64: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1004625FBB}>)
> 65: (SWANK-REPL::REPL-EVAL "clm
> ")
> 66: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL "clm
> ") #<NULL-LEXENV>)
> 67: (EVAL (SWANK-REPL:LISTENER-EVAL "clm
> "))
> 68: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "clm
> ") "COMMON-LISP-USER" 12)
> 69: (SWANK::SLDB-LOOP 1)
> 70: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT :IN "/Users/danielhensel/quicklisp/dists/quicklisp/software/slime-2.14/swank/sbcl.lisp") #<FUNCTION (LAMBDA NIL :IN SWANK::DEBUG-IN-EMACS) {10042F4E6B}>)
> 71: (SWANK::DEBUG-IN-EMACS #<UNBOUND-VARIABLE CM {100540FDE3}>)
> 72: (SWANK:INVOKE-SLIME-DEBUGGER #<UNBOUND-VARIABLE CM {100540FDE3}>)
> 73: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK:SWANK-DEBUGGER-HOOK) {100540FE4B}>)
> 74: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/danielhensel/quicklisp/dists/quicklisp/software/slime-2.14/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK:SWANK-DEBUGGER-HOOK) {100540FE4B}>)
> 75: (SWANK:SWANK-DEBUGGER-HOOK #<UNBOUND-VARIABLE CM {100540FDE3}> #<unavailable argument>)
> 76: (SB-DEBUG::RUN-HOOK *DEBUGGER-HOOK* #<UNBOUND-VARIABLE CM {100540FDE3}>)
> 77: (INVOKE-DEBUGGER #<UNBOUND-VARIABLE CM {100540FDE3}>)
> 78: (ERROR UNBOUND-VARIABLE :NAME CM)
> 79: ("UNBOUND-SYMBOL-ERROR" CM)
> 80: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #X0580E000) #<unavailable argument>)
> 81: ("foreign function: call_into_lisp")
> 82: ("foreign function: funcall2")
> 83: ("foreign function: interrupt_internal_error")
> 84: ("foreign function: signal_emulation_wrapper")
> 85: ("foreign function: stack_allocation_recover")
> 86: ("foreign function: stack_allocation_recover")
> 87: (SB-INT:SIMPLE-EVAL-IN-LEXENV CM #<NULL-LEXENV>)
> 88: (EVAL CM)
> 89: (SWANK::EVAL-REGION "cm
> ")
> 90: ((LAMBDA NIL :IN SWANK-REPL::REPL-EVAL))
> 91: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100540C88B}>)
> 92: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100540C7EB}>)
> 93: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100540C7CB}>)
> 94: (SWANK-REPL::REPL-EVAL "cm
> ")
> 95: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL "cm
> ") #<NULL-LEXENV>)
> 96: (EVAL (SWANK-REPL:LISTENER-EVAL "cm
> "))
> 97: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "cm
> ") "COMMON-LISP-USER" 5)
> 98: (SWANK::PROCESS-REQUESTS NIL)
> 99: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
> 100: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
> 101: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {100540800B}>)
> 102: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/danielhensel/quicklisp/dists/quicklisp/software/slime-2.14/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {100540800B}>)
> 103: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #1=#<SWANK/GRAY::SLIME-OUTPUT-STREAM {10053E6343}>) (*STANDARD-INPUT* . #2=#<SWANK/GRAY::SLIME-INPUT-STREAM {1005F381C3}>) (*TRACE-OUTPUT* . #1#) (*ERROR-OUTPUT* . #1#) (*DEBUG-IO* . #3=#<TWO-WAY-STREAM :INPUT-STREAM #2# :OUTPUT-STREAM #1#>) (*QUERY-IO* . #3#) (*TERMINAL-IO* . #3#)) #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {100540802B}>)
> 104: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {1004878733}> NIL)
> 105: ((FLET #:WITHOUT-INTERRUPTS-BODY-1174 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
> 106: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
> 107: ((FLET #:WITHOUT-INTERRUPTS-BODY-359 :IN SB-THREAD::CALL-WITH-MUTEX))
> 108: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {CA6DCFB}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "repl-thread" RUNNING {1005400003}>> NIL T NIL)
> 109: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "repl-thread" RUNNING {1005400003}> NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::SPAWN-REPL-THREAD) {10053FFF7B}> (#<SB-THREAD:THREAD "repl-thread" RUNNING {1005400003}> #<SB-THREAD:THREAD "auto-flush-thread" RUNNING {10053FFDA3}> #<SB-THREAD:THREAD "swank-indentation-cache-thread" #1=waiting on: #<WAITQUEUE {10048880A3}> {1004880143}> #<SB-THREAD:THREAD "reader-thread" RUNNING {1004880003}> #<SB-THREAD:THREAD "control-thread" RUNNING {1004878883}> #<SB-THREAD:THREAD "Swank Sentinel" #1# #<WAITQUEUE {10045E0023}> {10045DAAD3}> #<SB-THREAD:THREAD "main thread" RUNNING {1005F3CC53}>) NIL NIL NIL NIL)
> 110: ("foreign function: call_into_lisp")
> 111: ("foreign function: new_thread_trampoline")
> 112: ("foreign function: _pthread_body")
> 113: ("foreign function: _pthread_body")
> 114: ("foreign function: thread_sta
>
> Does anyone have an idea, how to get this working?
>
> Sincerely yours,
> Daniel Hensel
>
>
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
More information about the Cmdist
mailing list