Next: , Previous: Spanner Marks (Lisp), Up: Lisp Examples


7.6 Staves and Clefs Signatures

7.6.1 Selecting Staves

Use the staff setting to override FOMUS's choice of staves. Staff numbering begins with 1, representing the highest staff in the part.

(defun notes (n r)
  (loop
     repeat n
     for tim from 0 by r
     do (fms:note :time tim :dur r :pitch 60
                  :staff (if (< (random 1.0) 0.5) 1 2))))

(fms:with-score (:filename *filename*)
  (notes 16 1/2))

lsp022.png

Figure 7.31: Staves

7.6.2 Clefs Signatures

Use the clef setting to override FOMUS's clef signature choice.

(defun notes (n r)
  (loop
     repeat n
     for tim from 0 by r
     for stf = 1 then (- 3 stf)
     and clf in '#1=("treble" "treble" "treble" "treble" "bass" "bass" "bass" "bass" . #1#)
     do (fms:note :time tim :dur r :pitch 60 :staff stf :clef clf)))

(fms:with-score (:filename *filename*)
  (notes 16 1/2))

lsp061.png

Figure 7.32: Clefs