Class
fomus-file
Implements Fomus
manuscript output
to Lilypond, MusicXML and Fomus data
files. This class is automatically chosen when you specify a file with
a .ly, .xml or .dat extension. To work with Fomus, load it and then
compute scores
using Fomus
objects. Use the package prefix fms to reference
Fomus symbols, for
example fms:part, fms:note,
etc.
fomus-file supports the following slot initializations:
:parts {part | list}
:global {object | list}
:view boolean
In addition to the initializations listed above,
all Fomus keyword settings are
also available as keyword initializations
to fomus-file. There are lots of these Fomus manuscript
settings to keep track of, the
function fms:list-fomus-settings will be particularly
helpful in this regard.
;; Working with Fomus. (load "/Lisp/fomus/load") ;; Common Music package detected ;; FOMUS v0.1.1 ;; Lisp music notation formatter ;; Copyright (c) 2005 David Psenicka, All Rights Reserved ;; See file "COPYING" for terms of use and distribution. ⇒ #P"/Lisp/fomus/load.lisp" ;;; use rational tempo and beat values to avoid rhythmic quantization ;;; errors. (defparameter *tempo* 60) (defparameter *beat* 1/4) (defparameter *ins* (new fms:part :instr ':piano :partid ':piano )) (defun ranpiano (len lb ub ) (process repeat len for r = (rhythm (pick 1/4 1/8 1/16)) output (new fms:note :off (now) :partid ':piano :note (between lb ub) :dur r) wait r)) (events (ranpiano 20 40 80) "test.ly" :parts *ins*) ⇒ "test.ly" ;;; quarter tones (events (ranpiano 20 40.0 80.0) "test.ly" :parts (list *ins*) :quartertones t :title "HiHo!" :view t :composer "Anon.") ⇒ "test.ly" ;; Manuscripting imported MIDI data. ;;; best to override tempo maps with tempo 60 so ;;; Fomus has a fighting chance of parsing the time line correctly. (defparameter prelude (import-events "/Users/hkt/Desktop/Prelude_Suite_no4_BWV1006a_Prelude.mid" :tempo 60 :tracks '(1 2))) ;;; Timesigs and such can be "global" data in Fomus (defparamater timesig (new fms:timesig :off 0 :time '(3 4)) (events prelude "test.ly" :global (list timesig) :view t) ⇒ "test.ly"
cmn-file [Class]