[CM] Problem with CLM on MacOSX with intel

Daniel Stahl daniel_stahl@mac.com
Fri, 25 Aug 2006 20:55:51 +0200


Hi
The first problem was finding a workable Lisp. I found sbcl and  
guile. As far as I can tell neither clisp or OpenMCL is working under  
MacOSX with Intel yet.

I first tried to run clm with sbcl 0.9.15. It loads fine but cant  
compile instruments. I tried to compile and load "v.ins" with no  
succes. Here is the output.

(compile-file "v.ins")
; Writing "/Users/daniel_stahl/Desktop/clm-3/clm_FM_VIOLIN.c"
;
; caught STYLE-WARNING:
;   using deprecated EVAL-WHEN situation names EVAL LOAD

;
; caught STYLE-WARNING:
;   using deprecated EVAL-WHEN situation names EVAL LOAD COMPILE
; Compiling "/Users/daniel_stahl/Desktop/clm-3/clm_FM_VIOLIN.c"
i686-apple-darwin8-gcc-4.0.1: -framework: linker input file unused  
because linking not done
i686-apple-darwin8-gcc-4.0.1: CoreAudio: linker input file unused  
because linking not done
; Creating shared object file "/Users/daniel_stahl/Desktop/clm-3/ 
clm_FM_VIOLIN.so"

;
; caught STYLE-WARNING:
;   using deprecated EVAL-WHEN situation names LOAD EVAL


; file: /Users/daniel_stahl/Desktop/clm-3/v.ins
; in: DEFINSTRUMENT FM-VIOLIN
;     (RUN
;    (LOOP FOR I FROM BEG TO END DO
;          (DECLARE
;           (TYPE :FLOAT NOISE-AMOUNT FUZZ IND-FUZZ AMP-FUZZ  
MODULATION FM1-RAT
;            FM2-RAT FM3-RAT VIB)
;           (TYPE :MUS-ANY IND-NOI AMP-NOI) (TYPE :DOUBLE* COEFFS)
;           (TYPE :BOOLEAN FROBBER EASY-CASE MODULATE))
;          (IF (/= 0.0 NOISE-AMOUNT)
;              (IF (NULL FROBBER) (SETF FUZZ #) (SETF FUZZ #)))
;          (SETF VIB (+ (ENV FRQF) (TRIANGLE-WAVE PERVIB) (RAND- 
INTERP RANVIB)))
;          (IF IND-NOI (SETF IND-FUZZ (+ 1.0 #))) ...))
; --> MACROEXPAND-1 CLM::RUN-1 PROGN CLM::<END-2> LET MULTIPLE-VALUE- 
BIND
; --> MULTIPLE-VALUE-CALL
; ==>
;   #'(LAMBDA
;         (&OPTIONAL (CLM::*CLM-DATAI-LEN*) (CLM::*CLM-DATAR-LEN*)  
&REST #:G193)
;       (DECLARE (IGNORE #:G193))
;       (LET ((CLM::*CLM-BEG* (FLOOR #))
;             (CLM::*CLM-END* (AND # #))
;             (CLM::*CLM-DATAI*
;              (MAKE-INTEGER-ARRAY CLM::*CLM-DATAI-LEN* :INITIAL- 
ELEMENT 0))
;             (CLM::*CLM-DATAR* (MAKE-DOUBLE-ARRAY CLM::*CLM-DATAR- 
LEN*)))
;         (CLM::LOAD-VARS 49 26
;                         '((MODULATE 47 0 :BOOLEAN) (EASY-CASE 45  
0 :BOOLEAN)
;                           (FROBBER 43 0 :BOOLEAN) (COEFFS 41  
0 :DOUBLE-ARRAY)
;                           (VIB 0 25 :REAL) (FM3-RAT 0 24 :REAL)
;                           (FM2-RAT 0 23 :REAL) (FM1-RAT 0 22 :REAL)
;                           (MODULATION 0 21 :REAL) (AMP-FUZZ 0  
20 :REAL)
;                           (IND-FUZZ 0 19 :REAL) (FUZZ 0 18 :REAL) ...)
;                         CLM::VARDATA CLM::*CLM-DATAI* CLM::*CLM- 
DATAR*)
;         (CLM::TO-BIGNUM CLM::*CLM-BEG* CLM::*CLM-DATAI* CLM::+CLM- 
BEG+)
;         (CLM::TO-BIGNUM (OR CLM::*CLM-END* 0) CLM::*CLM-DATAI* CLM:: 
+CLM-END+)
;         (IF (AND END (< CLM::*CLM-END* CLM::*CLM-BEG*))
;             (WARN "end time < begin time: ~A from ~A to ~A?" 'FM- 
VIOLIN
;                   CLM::*CLM-BEG* CLM::*CLM-END*))
;         (IF *CLM-DEBUG*
;             (PRINT
;              (FORMAT NIL "(~A ~A~%  ~A~%  ~A ~A ~A)" '|clm_fm_violin2|
;                      CLM::*CLM-BEG* CLM::*CLM-END* CLM::*CLM-DATAR*
;                      CLM::*CLM-DATAI* CLM::*CLM-DATAR-LEN*)))
;         (SETF (GET *CLM-INS* :DATAI) CLM::*CLM-DATAI*)
;         (SETF (GET *CLM-INS* :DATAR) CLM::*CLM-DATAR*)
;         (SETF CLM-LAST-BEGIN-TIME (MAX CLM-LAST-BEGIN-TIME  
CLM::*CLM-BEG*))
;         (PROGN (TAGBODY (RESTART-CASE # #) CLM::NOTE-ALL-DONE))
;         (IF (NOT (ZEROP #))
;             (FORMAT T "interrupted: ~A"
;                     (AREF CLM::*CLM-DATAI* CLM::+CLM-INTERRUPTED+)))))
;
; caught STYLE-WARNING:
;   using the lexical binding of the symbol CLM::*CLM-DATAI-LEN*, not  
the
;   dynamic binding, even though the symbol name follows the usual  
naming
;   convention (names like *FOO*) for special variables
;
; caught STYLE-WARNING:
;   using the lexical binding of the symbol CLM::*CLM-DATAR-LEN*, not  
the
;   dynamic binding, even though the symbol name follows the usual  
naming
;   convention (names like *FOO*) for special variables

; --> MACROEXPAND-1 CLM::RUN-1 PROGN CLM::<END-2> LET MULTIPLE-VALUE- 
BIND
; --> MULTIPLE-VALUE-CALL FUNCTION
; ==>
;   (LET ((CLM::*CLM-BEG* (FLOOR (+ BEG CLM::*OFFSET*)))
;         (CLM::*CLM-END* (AND (NUMBERP END) (FLOOR #)))
;         (CLM::*CLM-DATAI*
;          (MAKE-INTEGER-ARRAY CLM::*CLM-DATAI-LEN* :INITIAL-ELEMENT 0))
;         (CLM::*CLM-DATAR* (MAKE-DOUBLE-ARRAY CLM::*CLM-DATAR-LEN*)))
;     (CLM::LOAD-VARS 49 26
;                     '((MODULATE 47 0 :BOOLEAN) (EASY-CASE 45  
0 :BOOLEAN)
;                       (FROBBER 43 0 :BOOLEAN) (COEFFS 41 0 :DOUBLE- 
ARRAY)
;                       (VIB 0 25 :REAL) (FM3-RAT 0 24 :REAL)
;                       (FM2-RAT 0 23 :REAL) (FM1-RAT 0 22 :REAL)
;                       (MODULATION 0 21 :REAL) (AMP-FUZZ 0 20 :REAL)
;                       (IND-FUZZ 0 19 :REAL) (FUZZ 0 18 :REAL) ...)
;                     CLM::VARDATA CLM::*CLM-DATAI* CLM::*CLM-DATAR*)
;     (CLM::TO-BIGNUM CLM::*CLM-BEG* CLM::*CLM-DATAI* CLM::+CLM-BEG+)
;     (CLM::TO-BIGNUM (OR CLM::*CLM-END* 0) CLM::*CLM-DATAI* CLM:: 
+CLM-END+)
;     (IF (AND END (< CLM::*CLM-END* CLM::*CLM-BEG*))
;         (WARN "end time < begin time: ~A from ~A to ~A?" 'FM-VIOLIN
;               CLM::*CLM-BEG* CLM::*CLM-END*))
;     (IF *CLM-DEBUG*
;         (PRINT
;          (FORMAT NIL "(~A ~A~%  ~A~%  ~A ~A ~A)" '|clm_fm_violin2|
;                  CLM::*CLM-BEG* CLM::*CLM-END* CLM::*CLM-DATAR*
;                  CLM::*CLM-DATAI* CLM::*CLM-DATAR-LEN*)))
;     (SETF (GET *CLM-INS* :DATAI) CLM::*CLM-DATAI*)
;     (SETF (GET *CLM-INS* :DATAR) CLM::*CLM-DATAR*)
;     (SETF CLM-LAST-BEGIN-TIME (MAX CLM-LAST-BEGIN-TIME CLM::*CLM- 
BEG*))
;     (PROGN
;      (TAGBODY
;        (RESTART-CASE
;         (|clm_fm_violin2| CLM::*CLM-DATAR* CLM::*CLM-DATAR-LEN*
;          CLM::*CLM-DATAI* CLM::*CLM-DATAI-LEN*)
;         (NIL NIL :REPORT "try to exit current note cleanly and go  
on." #))
;       CLM::NOTE-ALL-DONE))
;     (IF (NOT (ZEROP (AREF CLM::*CLM-DATAI* CLM::+CLM-INTERRUPTED+)))
;         (FORMAT T "interrupted: ~A"
;                 (AREF CLM::*CLM-DATAI* CLM::+CLM-INTERRUPTED+))))
;
; caught STYLE-WARNING:
;   using the lexical binding of the symbol CLM::*CLM-BEG*, not the
;   dynamic binding, even though the symbol name follows the usual  
naming
;   convention (names like *FOO*) for special variables
;
; caught STYLE-WARNING:
;   using the lexical binding of the symbol CLM::*CLM-END*, not the
;   dynamic binding, even though the symbol name follows the usual  
naming
;   convention (names like *FOO*) for special variables
;
; caught STYLE-WARNING:
;   using the lexical binding of the symbol CLM::*CLM-DATAI*, not the
;   dynamic binding, even though the symbol name follows the usual  
naming
;   convention (names like *FOO*) for special variables
;
; caught STYLE-WARNING:
;   using the lexical binding of the symbol CLM::*CLM-DATAR*, not the
;   dynamic binding, even though the symbol name follows the usual  
naming
;   convention (names like *FOO*) for special variables

;
; caught STYLE-WARNING:
;   using deprecated EVAL-WHEN situation names LOAD EVAL


; file: /Users/daniel_stahl/Desktop/clm-3/v.ins
; in: DEFINSTRUMENT FM-VIOLIN
;     (RUN
;    (LOOP FOR I FROM BEG TO END DO
;          (DECLARE
;           (TYPE :FLOAT NOISE-AMOUNT FUZZ IND-FUZZ AMP-FUZZ  
MODULATION FM1-RAT
;            FM2-RAT FM3-RAT VIB)
;           (TYPE :MUS-ANY IND-NOI AMP-NOI) (TYPE :DOUBLE* COEFFS)
;           (TYPE :BOOLEAN FROBBER EASY-CASE MODULATE))
;          (IF (/= 0.0 NOISE-AMOUNT)
;              (IF (NULL FROBBER) (SETF FUZZ #) (SETF FUZZ #)))
;          (SETF VIB (+ (ENV FRQF) (TRIANGLE-WAVE PERVIB) (RAND- 
INTERP RANVIB)))
;          (IF IND-NOI (SETF IND-FUZZ (+ 1.0 #))) ...))
; --> MACROEXPAND-1 CLM::RUN-1 PROGN CLM::<END-2> LET MULTIPLE-VALUE- 
BIND
; --> MULTIPLE-VALUE-CALL FUNCTION LET PROGN TAGBODY RESTART-CASE  
BLOCK LET
; --> TAGBODY RESTART-BIND LET RETURN-FROM
; ==>
;   (|clm_fm_violin2| CLM::*CLM-DATAR* CLM::*CLM-DATAR-LEN* CLM::*CLM- 
DATAI*
;    CLM::*CLM-DATAI-LEN*)
;
; caught STYLE-WARNING:
;   undefined function: |clm_fm_violin2|

;
; caught STYLE-WARNING:
;   This function is undefined:
;     |clm_fm_violin2|
;
; compilation unit finished
;   caught 12 STYLE-WARNING conditions
#P"/Users/daniel_stahl/Desktop/clm-3/v.fasl"
T
NIL

(with-sound () (fm-violin 0 1 440 .1))

debugger invoked on a UNDEFINED-FUNCTION:
   The function |clm_fm_violin2| is undefined.


Then I tried to build soundlib and use it from Guile. The static  
library was built but not the dynamic library. The dynamic library  
command was ":  headers.o audio.o io.o sound.o xen.o vct.o clm.o ...".

Best regards
/Daniel Ståhl