[CM] CM output to CMN

Marcus Pearce Marcus Pearce <m.t.pearce@city.ac.uk>
Sat, 16 Aug 2003 17:36:13 +0100 (BST)


Hello all, 

I'm having a problem with output to CMN with the most recent CM and CMN
releases. From the file "intro.cm": 

CM> cmn::*cmn-version*
"Common Music Notation 23-Jul-03"
CM> 
(define (testit stf len nts)
  (let ((nts (new heap :notes nts))
        ;; choose quater or two eighths
        (rhy (new random
               :of (list 1 
                         (new cycle :of '(1/2 1/2))))))
    (process while (< (now) len)
             for n = (next nts)
             for r = (next rhy)
             output (new midi :time (now)
                         :duration r
                         :keynum n
                         :channel stf)
             wait r)))
CM> 
(define staffs
  '((0 :name "Viola" :clef :alto :meter (4 4))
    (2 :name "Flute" :clef :treble :meter (4 4))))
CM> (events (list (testit 0 12 '(c3 d ef f g))
              (testit 1 12 '(c5 d ef f g)))
        "testit.eps" 
        :staffing staffs
        :size 24
        :title "Hiho!")
Manuscripting testit.eps...

Type-error in KERNEL::OBJECT-NOT-LIST-ERROR-HANDLER:  0 is not of type
LIST

Restarts:
  0: [ABORT] Return to Top-Level.

Debug  (type H for help)

(FINISH-CLM-INPUT #<SCORE {48DCB53D}> NIL NIL 0 ...)
Source: 
; File: /usr/share/common-lisp/source/cmn/cmn2.lisp
(FIRST DESC)
0] backtrace
0: (FINISH-CLM-INPUT #<SCORE {48DCB53D}> NIL NIL 0 ...)
1: (#:G0)[:CLEANUP]
2: (EVENTS
    (#<Interpreted Function "LAMBDA (STF LEN NTS)" {48A4D809}>
     #<Interpreted Function "LAMBDA (STF LEN NTS)" {48A50D11}>)
    "testit.eps"
    :STAFFING
    ((0 :NAME "Viola" :CLEF :ALTO ...) (2 :NAME "Flute" :CLEF :TREBLE
...))
    ...)
3: (EXTENSIONS:INTERACTIVE-EVAL
    (EVENTS (LIST # #) "testit.eps" :STAFFING STAFFS ...))
4: (COMMON-LISP::%TOP-LEVEL)
5: (COMMON-LISP::RESTART-LISP)

0] 

The same happens when I try to output a CMN source file. The problem seems
to occur in the CMN function 'finish-clm-input' in cmn2.lisp where we have
a comment:

;; until we get a better idea, descriptors is a list of lists,
;; each list being (function-name staff-name &rest other args)
;; we will run through that list, matching the staff-name to the appropriate staff,
;; then applying the first name to the resultant arg list.

but the CM function 'deinitialize-io' in the file cmn.lisp seems to be
passing the list '(0 1) to the &rest 'descriptors' parameter in
'finish-clm-input'. 

Any thoughts? 

Cheers, 
Marcus 
--