Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: Text Input File Examples , Previous: 6 Part Polyphony , Up: Examples , Home: Disclaimer

Fomus

Clamps Examples

Parts, Timesigs, Quartertones and Marks

(in-package :clamps)

;;; Staff System(s):

(defparameter *parts*
  (list
   (new fms:part
     :partid 0
     :instr :soprano)
   ;; (new fms:part
   ;;   :partid 1
   ;;   :instr :tenor-8dn)
   ;; (new fms:part
   ;;   :partid 2
   ;;   :instr :tenor-8dn)
   ;; (new fms:part
   ;;   :partid 3
   ;;   :instr :bass)
   ))

;;; Time signatures:

(defparameter *tsigs* '((3 8)(2 8)(3 8)(6 8)(4 4)))

(defun tsigs->ly (tsigs)
  "create fomus timesignatures from tsigs, list containing lists with
numerator and denominator of time sigsnatures."
  (loop
    for offs = 0 then (+ offs (* 4 (/ numerator denominator)))
    for (numerator denominator) in tsigs
    collect (fms::make-timesig
             :off offs
             :time (list numerator denominator))))

;;; A score with quartertones, time signatures and marks:

(sprout
 (append
  ;;; Noten
  (loop
    for x below 18
    for time = 0 then (+ time 1/2)
    collect
    (new fms:note
      :off time
      :note (between 60.0 81.0)
      :partid 0
      :voice 1
      :marks `((:textnote ,(pick "hi" "ho" "ha") :down))
      :dur 1/2))
  ;;; Taktbezeichnungen
  (loop
    for offs = 0 then (+ offs (* 4 (/ numerator denominator)))
    for (numerator denominator) in *tsigs*
    for barnum from 1
    collect (fms::make-mark
             :off offs
             :partid 0
             :marks `((:textnote ,(format nil "Bar ~2,'0d" barnum) :up)))))
 :to "/tmp/test.ly"
 :quartertones t
 :global (tsigs->ly *tsigs*)
 :parts *parts*
 :view t)

ex_clamps_parts-ts-qt-mk.jpg
Figure 21: Parts, Timesigs, Quartertones and Marks