[CM] cm->cmn issues: wierd clefs, accidentals

Bill Sack bsack23 at gmail.com
Wed Aug 9 13:17:07 PDT 2006


hi again,
i just noticed that when using some of the more exotic cmn clefs in cm, a
la:
(define my-staffs
  '((0 :name "hi osc" :clef :quad-treble :meter (4 4))
    (1 :name "lo osc" :clef :double-bass :meter (4 4))))
(io "/tmp/test.cmn" :staffing my-staffs :size 20
     :free-expansion-factor 1.5 :automatic-octave-signs nil)
(new seq :name 'whoops
     :subobjects
     (list
      (new cmn :time 0 :note 'c7 :staff 0 :duration 4)
      (new cmn :time 0 :note 'c0 :staff 1 :duration 4)))

(events #&whoops "test.cmn")

the actual output displays the music using tenor clefs ... some sort of
fallback, i guess. i looked in the cmn.scm code for a little while, but
didn't see where this could be happening - i'd like to be able to use these
clefs if possible ... i know it's strange but i have reasons ...

the accidental issue is another baffler (for me ...) - i'm trying to do some
microtonal output to cmn and have made a little function that looks up
non-integer keynums and assigns one of the built-in cmn microtonal symbols
and adds it to the :data slot of the cmn expression.

(defun accid (num)
  (let ((acc (cond ((< 0 num .5) 'sharp-down) <etc.>
...
and set accidl = (accid p1)
...
:data (list accidl 'stem-down)

when the events are output, the displayed file looks ok, but the notes in
the .cmn file look like this:
(g1 (sign #<write-protected-accidental>) ...

and if it's reloaded:
READER-ERROR at 462 (line 17, column 18) on #<SB-SYS:FD-STREAM for "file
/tmp/testit.cmn" {C277649}>:
illegal sharp macro character: #\<
   [Condition of type READER-ERROR]

i just tried this with a much more stripped-down example and the same thing
happens:

(new cmn :time 0 :note 'c5 :staff 0 :data (list 'sharp-up) :duration 4)

why doesn't my method work? what's the better way to do this?

thanks,
bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20060809/71344455/attachment.html>


More information about the Cmdist mailing list