[CM] various questions

Dave Phillips dlphilp@bright.net
Wed, 27 Nov 2002 09:19:14 -0500


Bill Schottstaedt wrote:
 
> > But maybe CMN changes to a new clef if it thinks it should.
> 
> I think it uses the user-specified clef, and only adds its own if
> none was specified, but it's been years since I looked at this code.

Here's the code that's giving me the problem. A couple of interesting
things happen with it. Most noticeable is the clef change: I specify
treble for the flute but get an alto clef instead. But I also notice
that the instrument assignments don't line up, i.e., my flute line
should be on top but sometimes gets placed in the middle of the three
staves. Let me know if there's anything obviously misconfigured :


(set-cmn-staff! 0 :name "Cello" :clef :bass :meter '(4 4))
(set-cmn-staff! 1 :name "Oboe" :clef :treble :meter '(4 4))
(set-cmn-staff! 2 :name "Flute" :clef :treble :meter '(4 4))


(defun testit (stf len nts)
  (let ((nts (new heap :notes nts))
        ;; choose quarter or two eighths
        (rhy (new random
               :of
               `(2, 1, 1, 1, (new cycle :of '(1/2 1/2)), (new cycle :of
'(1/4 1/4)) ))))
    (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)))

(events (list (testit 0 69 '(c2 e g d b3 a))
              (testit 1 69 '(d3 f e a b4 g))
              (testit 2 69 '(e4 g f a d5 b)))
        "cmn-test.cmn"
        :size 20
        :title "Trio for Cello, Oboe, & Flute")


[re: fm.ins]
 
> > Warning: This function is undefined:
> >  LOAD-FOREIGN
> 
> Odd -- surely cmucl hasn't changed the name of this function?

Ja, this weirds me out too. I thought we'd already gone over this error,
but even trying to load the .cmucl file results in the error. That's why
I wondered about the code example itself (fm.ins in CM's examples).

Best regards,

== Dave Phillips

	The Book Of Linux Music & Sound at http://www.nostarch.com/lms.htm
	The Linux Soundapps Site at http://linux-sound.org