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

Bill Sack bsack23@gmail.com
Wed, 9 Aug 2006 16:17:07 -0400


------=_Part_30069_24514072.1155154627403
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

------=_Part_30069_24514072.1155154627403
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

hi again,<br>
i just noticed that when using some of the more exotic cmn clefs in cm, a la:<br>
<span>(define my-staffs<br>&nbsp; '((0 :name &quot;hi osc&quot; :clef :quad-treble :meter (4 4))<br>&nbsp;&nbsp;&nbsp; (1 :name &quot;lo osc&quot; :clef :double-bass :meter (4 4))))<br>(io &quot;/tmp/test.cmn&quot; :staffing my-staffs :size 20
<br>&nbsp;&nbsp;&nbsp;&nbsp; :free-expansion-factor 1.5 :automatic-octave-signs nil)<br>(new seq :name 'whoops<br>&nbsp;&nbsp;&nbsp;&nbsp; :subobjects<br>&nbsp;&nbsp;&nbsp;&nbsp; (list<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new cmn :time 0 :note 'c7 :staff 0 :duration 4)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new cmn :time 0 :note 'c0 :staff 1 :duration 4)))
<br><br>(events #&amp;whoops &quot;test.cmn&quot;)</span><br>
<br>
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 ...<br>
<br>
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.
<br>
<br>
(defun accid (num)<br>
&nbsp; (let ((acc (cond ((&lt; 0 num .5) 'sharp-down) &lt;etc.&gt;<br>
...<br>
and set accidl = (accid p1)<br>
...<br>
:data (list accidl 'stem-down)<br>
<br>
when the events are output, the displayed file looks ok, but the notes in the .cmn file look like this:<br>
<span>(g1 (sign #&lt;write-protected-accidental&gt;) ...<br>
<br>
and if it's reloaded:<br>
</span><span>READER-ERROR at 462 (line 17, column 18) on #&lt;SB-SYS:FD-STREAM for &quot;file /tmp/testit.cmn&quot; {C277649}&gt;:<br>illegal sharp macro character: #\&lt;<br>&nbsp;&nbsp; [Condition of type READER-ERROR]<br></span>
<span><br>
i just tried this with a much more stripped-down example and the same thing happens:<br>
<br>
</span><span>(new cmn :time 0 :note 'c5 :staff 0 :data (list 'sharp-up) :duration 4)</span><span><br>
<br>
why doesn't my method work? what's the better way to do this?<br>
<br>
thanks,<br>
bill<br>
</span>

------=_Part_30069_24514072.1155154627403--