[CM] CLM->CMN problem
Rodrigo Segnini
rsegnini@ccrma.Stanford.EDU
19 Feb 2003 08:51:17 -0800
--=-ySMaE6eDhszofx30Y3oa
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi. In CMN the following code produces a shaded single <C4:1/5 duration>
note with onset <2> in staff <ins> from score <hi>, as in the picture
that I'm attaching.
(progn (setf hi (init-clm-input))
(setf ins (add-staff hi "ins" nil))
(add-note-to-staff hi ins 2.0d0 1/5 261 (GRAY-SCALE 0.458))
(finish-clm-input hi nil nil))
Most of the translation between CLM and CMN is handled by functions
inside cmn2.lisp. One of them, (display-notes args notes) takes a list
of arguments as score attributes and a list of notes in the same form as
the third line above (score name begin-time duration frequency &rest).
I have created a function that calls <display-notes> using note lists
similar to that same line. The output is correct, except that the
grayscale attribute is lost.
When peeking at hi.cmn, it is clear that it had no consequences on it.
;;; -*- syntax: common-lisp; package: cmn; base: 10; mode: lisp -*-
;;; cmn structure stored Tue 18-Feb-3 at 15:22
(in-package :cmn)
(cmn (title "speech2cmn test")
(size 12)
(title-separation 5)
(automatic-page-numbers T)
(automatic-measure-numbers T)
(all-output-in-one-file T)
(redundant-accidentals nil) (title "speech2cmn test")
(system
(staff (staff-name "75")
(treble)
(meter 2 4)
(ef6 (rq 1/5) (onset 0) stem-down begin-two-octaves-up)
(ef6 (rq 1/5) (onset 1/5) stem-down)
(...)
(ef6 (rq 1/5) (onset 11/5) stem-down end-two-octaves-up))
(staff (staff-name "71") ...
On the other hand, if one edits hi.cmn and adds the color attribute, and
(load "hi.cmn") as the current score, then color it goes.
I have traced what happens to the arguments after <display-notes> and
inserted print statements in reloaded sections of cmn2.lisp to observe
the state of the <&rest object> variable after every call.
<display-notes> calls <add-note>, which in turn calls
<add-note-to-staff>. At the end of it there is a conditional such that
if there are any extra arguments, <note> is applied to them (apply
#'note nt rest) before pushing the result to (staff-data staff),
otherwise (push nt (staff-data staff)).
Now, at this point it gets all too obscure for me as <note> just
encapsulates a call to <ur-note> which seems to be the place where
relevant information is added to the note object (self-acting-p,
rhythm-p, score-object-p, etc) and the rest is discarded.
Up to here I can trace that (GRAY-SCALE 0.458) is still alive as an
argument, but it has no consequence to the note object.
Any idea why that is happening?
Thanks,
Rodrigo
--=-ySMaE6eDhszofx30Y3oa
Content-Disposition: attachment; filename=aaa.jpg
Content-Type: image/jpeg; name=aaa.jpg
Content-Transfer-Encoding: base64
/9j/4AAQSkZJRgABAQEAZABkAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q/9sAQwAIBgYHBgUI
BwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy
/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy
MjIyMjIyMjIyMjIy/8AAEQgBSAE8AwEiAAIRAQMRAf/EABsAAQEBAQEBAQEAAAAAAAAAAAAGBQQH
CAID/8QARBAAAQMDAQUGAwUDCQkBAAAAAAECAwQFEQYSFCGV1AcTFjFVViJBkxVRVNLTJEJhFyMy
M1JicYGRCBg0NnSDprGz4f/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAA
AAAA/9oADAMBAAIRAxEAPwD38AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAGdc79a7NspX1kcLnYwzi5ypx47KZXHBePkfm16htV6lkjt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