Next: , Previous: Voices Chords and Polyphony (Lisp), Up: Lisp Examples


7.4 Articulation Markings

7.4.1 Single Note Marks

Marks are entered as strings. They are attached to a note event via the marks parameter.

(fms:with-score
    (:filename *filename*
     :parts '((:id "apart" :inst "piano")))
  (loop
     with marks = '(() (".") (">") ("^") ("!") ("/."))
     repeat 21
     for tim from 0 by 1/2
     do (fms:note :time tim
                  :dur (if (< tim 10) 1/2 1)
                  :pitch (+ 48 (random 25))
                  :marks (nth (random (length marks)) marks))))

lsp002.png

Figure 7.21: Articulation

Custom text marks are entered by enclosing an x, x^, x_ or x! mark in a list with the text to appear in the score. x places the text at the notehead, x^ and x_ force the text to appear above or below the note in italics, and x! places the text in bold face above the staff.

(fms:with-score
    (:filename *filename*
     :parts '((:id ce :inst cello)))
  (loop
     with marks = '(()
                    (("x" "text")) () () ()
                    (("x^" "text above")) () () ()
                    (("x_" "text below")) () () ()
                    (("x!" "staff text")) () () ()
                    () () () ())
     repeat 21
     for m in marks
     for tim from 0 by 1/2
     do (fms:note :time tim
                  :dur (if (< tim 10) 1/2 1)
                  :pitch (+ 36 (random 3))
                  :marks m)))

lsp039.png

Figure 7.22: Text Marks

FOMUS has many built in text marks that can be customized using the default-mark-texts and mark-texts settings. The following example uses mark-texts to change the appearance of the vib and moltovib text marks (by default, FOMUS uses the texts “vib.” and “molto vib.”).

(fms:with-score
    (:filename *filename*
     :sets '(:mark-texts ("vib" "vibrato" "moltovib" "molto vibrato"))
     :parts '((:id ce :inst cello)))
  (loop
     with marks = '(("vib") ("moltovib") nil nil)
     repeat 21
     for tim from 0 by 1/2
     do (fms:note :time tim
                  :dur (if (< tim 10) 1/2 1)
                  :pitch (+ 48 (random 3))
                  :marks (nth (floor tim 3) marks))))

lsp040.png

Figure 7.23: More Text Marks

If you wanted to make this the default appearance for these two marks, you could insert the following line in your .fomus file located in your home directory (make sure you use ‘+=’ instead of ‘=’ to append the values to FOMUS's default list):

     default-mark-texts += (vib "vibrato", moltovib "molto vibrato")