]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.5.33 release/1.5.33
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 25 Feb 2002 00:48:27 +0000 (01:48 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 25 Feb 2002 00:48:27 +0000 (01:48 +0100)
55 files changed:
ChangeLog
Documentation/user/refman.itely
Documentation/windows/installing.texi
VERSION
buildscripts/lilypond-login.sh
buildscripts/lilypond-profile.sh
buildscripts/lys-to-tely.py
buildscripts/mf-to-table.py
debian/rules
input/bugs/1st-note-spacing.ly [deleted file]
input/bugs/tie-different-notes.ly [deleted file]
input/regression/grace-bar-number.ly [new file with mode: 0644]
input/test/ancient-font.ly
input/test/beam-quanting.ly [deleted file]
input/test/figured-bass.ly
input/test/voicify-chords.ly [new file with mode: 0644]
lily/bar-number-engraver.cc
lily/custos.cc
lily/figured-bass-engraver.cc
lily/global-translator.cc
lily/include/translator-group.hh
lily/lexer.ll
lily/lily-guile.cc
lily/line-of-score.cc
lily/music-constructor.cc
lily/music-sequence.cc
lily/music.cc
lily/parser.yy
lily/stem.cc
lily/third-try.cc
lily/time-signature.cc
lily/translator-group.cc
ly/property-init.ly
make/out/lilypond.lsm
make/out/lilypond.mandrake.spec
make/out/lilypond.redhat.spec
make/out/lilypond.suse.spec
mf/GNUmakefile
mf/feta-generic.mf
mf/feta-klef.mf
mf/feta-macros.mf
mf/feta-nummer-code.mf
mf/feta-nummer10.mf
mf/lilypond.map [new file with mode: 0644]
mf/parmesan-custodes.mf
mf/parmesan-flags.mf
mf/parmesan-heads.mf
scm/c++.scm
scm/drums.scm
scm/grob-description.scm
scm/grob-property-description.scm
scm/music-functions.scm
scm/music-property-description.scm
scm/ps.scm
stepmake/stepmake/metafont-rules.make

index 634ebc7ef239c1b8f3da74764745dccf3372763b..0d0686bc4f7521ecee376dc0f74c2a717282bceb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,70 @@
+2002-02-25  Han-Wen  <hanwen@cs.uu.nl>
+
+       * VERSION: 1.5.33 released.
+
+       * mf/feta-macros.mf (flare_path): removed draw_flare, replace by
+       flare_path everywhere (c-clef, numbers).        
+
+       * lily/bar-number-engraver.cc (process_music): also print bar
+       number if measure starts with grace note.       
+
+       * input/regression/grace-bar-number.ly: new test.
+
+2002-02-24  Han-Wen  <hanwen@cs.uu.nl>
+
+       * lily/figured-bass-engraver.cc (stop_translation_timestep): reset
+       rest as well.
+
+       * scm/music-functions.scm (voicify-music):  split chords into
+       different voices automatically.
+
+       * lily/music.cc (ly_music_list_p): new function
+
+       * lily/music-sequence.cc (do_relative_octave): robustification
+
+       * scm/music-functions.scm: many utility functions 
+
+       * lily/music.cc (ly_set_mus_property): add type checks to the
+       Scheme property assignment.
+
+       * buildscripts/lilypond-profile,lilypond-login.sh (TEXCONFIG):
+       dvips fixes
+
+       * mf/lilypond.map: .map file from Mats' page. 
+
+2002-02-21  Juergen Reuter <reuter@ipd.uka.de>
+
+       * Some more parmesan related fixes;
+
+       * Custos: varying shape (in particular, stem length), depending on the
+         vertical position of the custos (on staffline / between stafflines);
+
+       * Custos: added grob property "neutral-direction" (same semantics as
+         with stem); introduced new grob property "neutral-position";
+
+       * Time-signature: print a warning when resorting to default layout.
+
+2002-02-22  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/translator-group.cc (add_fresh_simple_translator): remove
+       function; initialize() is called through
+       Translator_group::initialize().
+
+       * lily/third-try.cc (prune_loose_colunms): add constraints (rods)
+       for the neighbors of a loose column.
+
+       * lily/line-of-score.cc (set_loose_columns): be more intelligent:
+       position loose columns so that they don't collide.
+
 2002-02-21  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * VERSION: 1.5.32 released.
+
        * scm/font.scm: remove font-name symbol.
 
        * mf/GNUmakefile: use pktrace for making PFAs
 
-       * make/lilypond.redhat.spec.in: use pktrace when making specs
+       * make/lilypond.redhat.spec.in: use pktrace when making RPMs
 
        * lily/rest-collision.cc (do_shift): read direction field from
        rest-column in case of note-rest collision. This should fix some
index 90c34f36a3b9d7b84b14a08475bca4c0a65c3b00..cad14bd54a8f5a39797d2c9ff92ae296291715b6 100644 (file)
@@ -68,6 +68,7 @@ syntactical details are described at the end of the manual.
 * Chords::                      
 * Writing parts::               
 * Custodes::                    
+* Figured bass::                
 * Tuning output::               
 * Page layout::                 
 * Output formats::              
@@ -847,8 +848,27 @@ a measure it is set to @code{defaultBarType}. The contents of
 @cindex polyphony
 
 Polyphonic parts, i.e. parts with more than one voice on a staff can be
-typeset with LilyPond.   To use this, instantiate a separate Voice
-context for each part, and assign a stem direction to each part. 
+typeset with LilyPond.
+
+The easiest way to enter such fragments, is the Scheme function
+@code{voicify-music}. It will split chords using the separator
+@code{\\}, to make multiple voices.  You can use it for small,
+short-lived voices (make a chord of voices) or for single chords:
+
+@lilypond
+\score {
+\notes \context Voice = VA \apply #voicify-music \relative c'' {
+ c4 < { f d e  } \\ { b c2 } > c4 < g' \\ c, \\  f \\ d >
+}
+}
+@end lilypond
+
+The function @code{voicify-music} instantiates @internalsref{Voice}
+contexts, bearing the names @code{"1"}, @code{"2"}, etc.
+
+To explicity typeset polyphonic music, instantiate a separate Voice
+context for each part, and assign a stem direction to each part.
+@c
 @lilypond[fragment,verbatim]
 \context Staff
 < \context Voice = VA { \stemUp b'4 a' g' f' e' }
@@ -913,8 +933,10 @@ LilyPond also vertically shifts rests that are opposite of a stem.
 @end lilypond
 
 Note head collisions (horizontal shifting of note heads) are handled by
-the @internalsref{NoteCollision} grob. @internalsref{RestCollision} handles vertical
-shifting of rests.
+the @internalsref{NoteCollision} grob. @internalsref{RestCollision}
+handles vertical shifting of rests.
+
+
 
 
 
@@ -2838,6 +2860,36 @@ block:
 @}
 @end example
 
+
+@c . {Figured bass}
+@node Figured bass
+@section Figured bass
+
+@cindex Basso continuo
+
+Figured bass is printed by @internalsref{FiguredBass} context.  This
+context will print notes (relative to the central C) as figures.  To
+ease entering these notes, the special @code{\figures} mode, is
+available which allows you to type numbers, like @code{<4 6+>}.
+
+@lilypond
+\score { \notes  <
+ \context FiguredBass \transpose c'' {
+   <e! g >
+   <f8 ais >
+   \figures {
+     r8
+     <1 3 5>4 <3- 5+ 6!> <5>
+   } 
+ }
+ \context Voice {
+   c g8 g f4 d c
+  }
+>
+ }
+@end lilypond
+
 @c . {Tuning output}
 @node Tuning output
 @section Tuning output
index 1f103600d5d175638ee2a2fe3b753f34ba1cf2f1..eecd8ca20f7264cf4373c7a4f76b7113ebea1069 100644 (file)
@@ -20,15 +20,14 @@ bugreport, following the guidelines in the section on bugreports below.
 @section Windows binary setup 
 
 If you run Windows NT, 2000 or XP, please become administrator first
-(currently, installing as an ordinary user will not work).  All the
-software you need is installed by downloading and running
-@uref{http://www.lilypond.org/gnu-windows/setup.exe, setup.exe}.  You
-will be asked some questions. If you are unsure just click "Next".  Do
-not change the default install directory @file{c:/cygwin}.
+(currently, installing as an ordinary user will not work).  Download and
+run @uref{http://www.lilypond.org/gnu-windows/setup.exe, setup.exe}.
+You will be asked some questions. If you are unsure just click "Next".
+Do not change the default install directory @file{c:/cygwin}.
 
-This installs LilyPond, and Cygwin, GUILE, Python, teTeX and GSView.  If
-you already have some of that software under @file{c:/cygwin}, then
-don't worry: nothing will be installed twice.
+This installs LilyPond, and Cygwin, GUILE, Python, teTeX (MikTeX is not
+supported) and GSView.  If you already have some of that software under
+@file{c:/cygwin}, then don't worry: nothing will be installed twice.
 
 If you want to install any of this software by hand, do this
 @strong{before} you run @file{setup.exe}, otherwise your LilyPond setup
@@ -140,6 +139,7 @@ want to see the output of the  following commands:
 You can also check out
 @uref{http://lilypond.org/wiki/?TroubleshootingWindows} for more
 instructions on how to make a bug report.
+
 @ignore
 @subsection Additional software
 
@@ -163,7 +163,6 @@ part of Cygwin and much more robust for use with LilyPond than MiKTeX.
 See @file{/usr/doc/Cygwin/tetex-beta-20001218.README} and
 @file{/usr/doc/Cygwin/texmf-20000804-2.README} for details.
 
-
 @item Ghostview.
 
 You can use GSView-2.6.  This old package has two advantages.  It has
diff --git a/VERSION b/VERSION
index 96a12a2f842e8b2ac38e6578305ecb297e141b8f..f0962d6456061a5808e072d9f4637c7d001802c9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=32
+PATCH_LEVEL=33
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
index e809b66224adbbe5b98984311f8600e80fbe41e5..3bd0e431955094eedfae60c0f544db7c96f8356d 100755 (executable)
@@ -41,5 +41,16 @@ else
         setenv TFMFONTS "$datadir/tfm:"
 endif
 
+if ($?TEXPSHEADERS) then
+        setenv TFMFONTS "$datadir/pfa:$TEXPSHEADERS"
+else
+        setenv TFMFONTS "$datadir/pfa:"
+endif
+if ($?TEXCONFIG) then
+        setenv TEXCONFIG "$datadir/pfa:$TEXPSHEADERS"
+else
+        setenv TEXCONFIG "$datadir/pfa:"
+endif
+
 
 
index cae362c8ae6acfd5b4c88787c8e5056868c867fe..95cd90bd84c8fe4ab74c13225502ef99b913e9a9 100755 (executable)
@@ -27,11 +27,16 @@ GS_LIB="$datadir/ps:"${GS_LIB:=""}
 MFINPUTS="$datadir/mf:"${MFINPUTS:=":"}
 TEXINPUTS="$datadir/tex:$datadir/ps:"${TEXINPUTS:=":"}
 TFMFONTS="$datadir/tfm:"${TFMFONTS:=":"}
+TEXPSHEADERS="$datadir/pfa/:"${TEXPSHEADERS:=":"}
+TEXCONFIG="$datadir/pfa/:"${TEXCONFIG:=":"}
+
+
 
 # LILYPONDPREFIX="$datadir"
 # export LILYPONDPREFIX
 
-export MFINPUTS TEXINPUTS TFMFONTS GS_LIB GS_FONTPATH 
+export MFINPUTS TEXINPUTS TFMFONTS GS_LIB GS_FONTPATH
+export TEXPSHEADERS TEXCONFIG
 
        
 
index 22343a77a7f3a413d652f91c774ac0fb48640694..57b0f907961542adce11785ba4daf093489b7d23 100644 (file)
@@ -63,7 +63,7 @@ if files:
        def name2line (n):
                # UGR
                if string.find (n, '+') >= 0:
-                       s = "@lilypondfile{%s}" % n
+                       s = "@lilypondfile[printfilename]{%s}" % n
                else:
                        s = "@lilypondfile[printfilename,verbatim]{%s}" % n
                return s
index 113c9020701bfb7de224483e0a7b78d89e4dec7c..c0ef406baa957baf4afb9c5ef31400805e36e31e 100755 (executable)
@@ -152,7 +152,7 @@ Options:
     ['afm=', 'outdir=', 'dep=',  'tex=', 'debug', 'help', 'package='])
 
 
-texfile_nm = '';
+texfile_nm = ''
 depfile_nm = ''
 afmfile_nm = ''
 outdir_prefix = '.'
@@ -178,6 +178,8 @@ for opt in options:
                print o
                raise getopt.error
 
+base = re.sub ('.tex$', '', texfile_nm)
+
 for filenm in files:
        (g,m, deps) =  parse_logfile (filenm)
        cs = tfm_checksum (re.sub ('.log$', '.tfm', filenm))
@@ -187,6 +189,6 @@ for filenm in files:
        
        write_afm_metric (afm, g,m)
        write_tex_defs (open (texfile_nm, 'w'), g, m)
-       write_deps (open (depfile_nm, 'wb'), deps, [texfile_nm, afmfile_nm])
+       write_deps (open (depfile_nm, 'wb'), deps, [base + '.dvi', texfile_nm, afmfile_nm])
 
 
index d854c688eb293703d36509f065ca9db21d17b69d..d8dfa0a75558fb59090f4306d04553309c8ba940 100755 (executable)
@@ -42,7 +42,7 @@ build-stamp:
                --prefix=/usr --enable-optimise \
                --infodir='$${prefix}/share/info' \
                --mandir='$${prefix}/share/man'
-       $(MAKE)
+       $(MAKE) MAKE_PFA_FILES=1
 
        touch build-stamp
 
@@ -75,7 +75,7 @@ install: build
 
        # Add here commands to install the package into debian/tmp.
        dh_installdirs
-       $(MAKE) prefix=$(PWD)/$(r)/usr install
+       $(MAKE) prefix=$(PWD)/$(r)/usr  MAKE_PFA_FILES=1 install
 
        # Change from an absolute symlink to a relative symlink (Lintian)
        if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
diff --git a/input/bugs/1st-note-spacing.ly b/input/bugs/1st-note-spacing.ly
deleted file mode 100644 (file)
index 56803b1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-\header {
-texidoc="apparently added in 1.5.2 -- what about it?"
-}
-\version "1.3.148"
-
-\score {\notes \relative c'' <
-\context Staff = SA { \times 6/7 { [c8 c c c c c c] }  }
-\context Staff = SB { \times 6/6 { [c c c c c c] }  }
->
-
-\paper { linewidth = -1. }
-} 
diff --git a/input/bugs/tie-different-notes.ly b/input/bugs/tie-different-notes.ly
deleted file mode 100644 (file)
index 52e071a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-\header {
-
-texidoc="
-
-  c ~ cis gets tied
-"
-}
-
-     \score {
-       \context Staff \context Voice = i { 
-          \notes\relative c'' { <c4 g' es'>~<cis4 gis' e'> } 
-       }
-     }
diff --git a/input/regression/grace-bar-number.ly b/input/regression/grace-bar-number.ly
new file mode 100644 (file)
index 0000000..7368e1e
--- /dev/null
@@ -0,0 +1,13 @@
+\header {
+
+texidoc = "Grace notes do tricky things with timing. If a measure
+starts with a grace note, the measure does not start at 0, but
+earlier. Nevertheless, lily should not get confused. For example, line
+breaks should be possible at grace notes, and the bar number should be
+printed correctly.
+"
+}
+
+\score { \notes\relative c''' { c1 \break
+\grace c8
+c1  }}
index 70870dd86cb911101c226380c966600cfbfad370..c7d6a70a5b65bc52db63ca7b32eef7b66601fa71 100644 (file)
@@ -25,10 +25,15 @@ upperVoice =  \context Staff = upperVoice <
 
     \notes \transpose c' {
        \property Staff.Clef \set #'font-family = #'ancient
+       \property Staff.KeySignature \set #'font-family = #'ancient
        \property Staff.KeySignature \override #'style = #'vaticana
+       \property Staff.Accidentals \set #'font-family = #'ancient
        \property Staff.Accidentals \override #'style = #'vaticana
        \property Staff.Custos \set #'font-family = #'ancient
        \property Staff.Custos \override #'style = #'vaticana
+       \property Staff.Custos \override #'neutral-position = #4
+       \property Staff.Custos \override #'neutral-direction = #-1
+       \property Staff.Custos \override #'adjust-if-on-staffline = ##t
        \property Voice.NoteHead \set #'font-family = #'ancient
        \property Voice.NoteHead \override #'style = #'vaticana_punctum
        \property Voice.Porrectus \override #'style = #'vaticana
@@ -125,10 +130,15 @@ lowerVoice =  \context Staff = lowerNotes <
     \notes \transpose c' {
        \property Voice.noAutoBeaming = ##t
        \property Staff.Clef \set #'font-family = #'ancient
+       \property Staff.KeySignature \set #'font-family = #'ancient
        \property Staff.KeySignature \override #'style = #'mensural
+       \property Staff.Accidentals \set #'font-family = #'ancient
        \property Staff.Accidentals \override #'style = #'mensural
        \property Staff.Custos \set #'font-family = #'ancient
        \property Staff.Custos \override #'style = #'mensural
+       \property Staff.Custos \override #'neutral-position = #3
+       \property Staff.Custos \override #'neutral-direction = #-1
+       \property Staff.Custos \override #'adjust-if-on-staffline = ##t
        \property Voice.NoteHead \set #'font-family = #'ancient
        \property Voice.NoteHead \override #'style = #'neo_mensural
        \property Voice.Stem \set #'font-family = #'ancient % ancient flags
diff --git a/input/test/beam-quanting.ly b/input/test/beam-quanting.ly
deleted file mode 100644 (file)
index 977ed5b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\version "1.3.146"
-
-%{
-Have some fun beam quanting
-%}
-
-% no y quantising
-#(define (beam-vertical-position-quants m dy) '())
-
-% rediculous dy quanting
-#(define beam-height-quants '(0 4))
-
-\score {
-    \notes\relative c'{
-        c8 c c c
-        c8 e g a
-        c,8 f b e
-    }
-}
index 9c6b0300be89eb0249300f6b702d08bf978fb5dc..daaf2ea6d5bcb67aa5b379d45bf401f55536ca64 100644 (file)
@@ -13,7 +13,7 @@ mode, which allows you to type numbers, like @code{<4 6+>}.
    <e! g >
    <f8 ais >
    \figures {
-     r 
+     r8
      <1 3 5>4 <3- 5+ 6!> <5>
    } 
  }
diff --git a/input/test/voicify-chords.ly b/input/test/voicify-chords.ly
new file mode 100644 (file)
index 0000000..f059254
--- /dev/null
@@ -0,0 +1,64 @@
+  
+#(define (voicify-list lst number)
+   "Make a list of Musics.
+
+   voicify-list :: [ [Music ] ] -> number -> [Music]
+   LST is a list music-lists.
+"
+
+   (if (null? lst) '()
+       (cons (context-spec-music
+             (make-sequential-music
+              (list
+               (make-voice-props-set number)
+               (make-simultaneous-music (car lst))))
+
+             "Voice"  (number->string number))
+             (voicify-list (cdr lst) (+ number 1))
+       ))
+   )
+
+#(define (voicify-chord ch)
+  "Split the parts of a chord into different Voices using separator"
+   (let* ((es (ly-get-mus-property ch 'elements)))
+
+
+     (ly-set-mus-property  ch 'elements
+       (voicify-list (split-list es music-separator?) 0))
+     ch
+   ))
+
+#(define (voicify-music m)
+   "Recursively split chords that are separated with \\ "
+   
+   (if (not (music? m))
+       (begin (display m)
+       (error "not music!"))
+       )
+   (let*
+       ((es (ly-get-mus-property m 'elements))
+       (e (ly-get-mus-property m 'element))
+       )
+       
+     (if
+      (and (equal? (ly-music-name m) "Simultaneous_music")
+          (reduce (lambda (x y ) (or x y))     (map music-separator? es)))
+      (voicify-chord m)
+      (begin
+       (if (pair? es)
+           (ly-set-mus-property m 'elements (map voicify-music es)))
+       (if (music? e)
+           (ly-set-mus-property m 'element  (voicify-music e)))
+           
+       m)
+      
+      )
+     ))
+
+\score { \notes \context Staff \relative c'' 
+\apply #voicify-music {
+   c4   <g' \\ c, \\ f \\ d > f g < c \\ d> a 
+}
+}
+
+
index 2c6d4d6c26e6357a25fd7b652607c9f54cb9c56e..614b750e61d13c4fff5357f4a364ebcad323514b 100644 (file)
@@ -21,11 +21,10 @@ class Bar_number_engraver : public Engraver
 {
 protected:
   Item* text_p_;
-
 protected:
   virtual void stop_translation_timestep ();
   virtual void acknowledge_grob (Grob_info);
-  virtual void create_grobs ();
+  virtual void process_music ();
   void create_items ();
   TRANSLATOR_DECLARATIONS(  Bar_number_engraver );
 };
@@ -36,22 +35,30 @@ protected:
   every 5 measures?  */
 
 void
-Bar_number_engraver::create_grobs ()
+Bar_number_engraver::process_music ()
 {
   // todo include (&&!time->cadenza_b_)
-  SCM bn = get_property ("currentBarNumber");
-  SCM smp = get_property ("measurePosition");
-  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+
+  SCM wb = get_property ("whichBar");
   
-  if (gh_number_p (bn) &&
-      !mp.to_bool () && now_mom () > Moment (0))
+  if (gh_string_p (wb))
     {
-      create_items ();
-
-      // guh.
-      text_p_->set_grob_property ("text",
-                                ly_str02scm (to_str (gh_scm2int (bn)).ch_C ()));
+      SCM bn = get_property ("currentBarNumber");
+      SCM smp = get_property ("measurePosition");
+      int ibn = gh_number_p (bn) ? gh_scm2int(bn) : 1;
+      
+      Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+      if (mp.main_part_ == Rational (0)
+         && ibn != 1)
+       {
+         create_items ();
+         
+         // guh.
+         text_p_->set_grob_property ("text",
+                                     ly_str02scm (to_str (gh_scm2int (bn)).ch_C ()));
+       }
     }
+
 }
 
 
index 79ff6b33f6108c208060ae8ceb549611177c3022..29c32f699684ab4859f5e93c692b3beb5c3e0ce1 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
- (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
+ (C) 2000, 2002 Juergen Reuter <reuter@ipd.uka.de>
 */
 
 /* TODO:
 
  - do not show if a clef change immediately follows in the next line
 
- - make custos direction control configurable
-
  - decide: do or do not print custos if the next line starts with a rest
 
 */
 
 
 #include <stdio.h>
+#include "direction.hh"
 #include "staff-symbol-referencer.hh"
 #include "custos.hh"
 #include "molecule.hh"
@@ -30,6 +29,7 @@
 #include "note-head.hh"
 #include "item.hh"
 #include "font-interface.hh"
+#include "math.h" // rint
 
 /*
    This function is a patched and hopefully much more understandable
@@ -146,26 +146,55 @@ Custos::brew_molecule (SCM smob)
   if (gh_symbol_p (scm_style))
     {
       String style = ly_scm2string (scm_symbol_to_string (scm_style));
+      bool adjust =
+       to_boolean (me->get_grob_property ("adjust-if-on-staffline"));
+
+      String idx = "custodes-" + style + "-";
 
-      String idx = "custodes-";
-      int interspaces = Staff_symbol_referencer::line_count (me)-1;
+      int neutral_pos;
+      SCM ntr_pos = me->get_grob_property ("neutral-position");
+      if (gh_number_p (ntr_pos))
+       neutral_pos = gh_scm2int (ntr_pos);
+      else
+       neutral_pos = 0;
+
+      Direction neutral_direction =
+       to_dir (me->get_grob_property ("neutral-direction"));
+
+      int pos = (int)rint (Staff_symbol_referencer::position_f (me));
+      int sz = Staff_symbol_referencer::line_count (me)-1;
+
+      if (pos < neutral_pos)
+       idx += "u";
+      else if (pos > neutral_pos)
+       idx += "d";
+      else if (neutral_direction == UP)
+       idx += "u";
+      else if (neutral_direction == DOWN)
+       idx += "d";
+      else // auto direction; not yet supported -> use "d"
+       idx += "d";
+
+      if (adjust)
+        {
+         idx += (((pos ^ sz) & 0x1) == 0) ? "1" : "0";
+       }
+      else
+        {
+         idx += "2";
+       }
 
-      Real pos = Staff_symbol_referencer::position_f (me);
-      
-      if (pos > (interspaces/2 + 1)) // TODO: make this rule configurable
-       idx += "r";
-      idx += style;
       Molecule molecule
        = Font_interface::get_default_font (me)->find_by_name (idx);
       if (molecule.empty_b ())
         {
-         String message = "unknown custos style: `" + style + "'";
+         String message = "no such custos: `" + idx + "'";
          warning (_ (message.ch_C ()));
          return SCM_EOL;
        }
       else
         {
-         add_streepjes (me, (int)pos, interspaces, &molecule);
+         add_streepjes (me, (int)pos, sz, &molecule);
          return  molecule.smobbed_copy ();
        }
     }
index 624490ac57be1dcc08f63f3d2491264b942d28c2..97039753587162a4ee5818227b4c69d3b1fa036b 100644 (file)
@@ -35,6 +35,7 @@ Figured_bass_engraver::stop_translation_timestep ()
     }
 
   figures_.clear ();
+  rest_req_ = 0;
 }
 
 bool
index a7fb3e0c3c0f5f946e1e8f19a3ddb9bf600c7e17..45a8f1050cbe33e7b9127f7a2e89e601722a6fda 100644 (file)
@@ -98,7 +98,7 @@ Global_translator::run_iterator_on_me (Music_iterator * iter)
 
       w = sneaky_insert_extra_moment (w);
 
-      //      cout << "Proccing " << w << endl;
+            //cout << "Proccing " << w << endl;
 
       
       if (first)
index 6621344a95d78aa81bfb803cf9e9da0f8d184173..74a3490d3cf4840ac0e780f13da219094d2d5ac1 100644 (file)
@@ -51,7 +51,6 @@ public:
   Translator_group (Translator_group const &);
   Translator_group ();
   void add_fresh_group_translator (Translator *trans_p);
-  void add_fresh_simple_translator (Translator *trans_p);  
   void add_used_group_translator (Translator *trans_p);
   
   /// Score_register = 0, Staff_registers = 1, etc)
index e07648fc32acefee31c836a4823fc618abf50b66..fa5a4dad89743a89d2d74bbf4b7f8194282a4726 100644 (file)
@@ -459,6 +459,8 @@ HYPHEN              --
        return E_CLOSE;
     case '~':
        return E_TILDE;
+    case '\\':
+       return E_BACKSLASH;
     default:
        return E_CHAR;
     }
index 3e1abf676547e905dbd259c7906cf275c5f3e2fa..c70f40e482f1a57663ea426e9360dde64fd6894c 100644 (file)
@@ -606,3 +606,45 @@ SCM my_gh_symbol2scm (const char* x)
 {
   return gh_symbol2scm ((char*)x);
 }
+
+
+bool
+type_check_assignment (SCM val, SCM sym,  SCM type_symbol) 
+{
+  bool ok = true;
+  SCM type_p = SCM_EOL;
+
+  if (gh_symbol_p (sym))
+    type_p = scm_object_property (sym, type_symbol);
+
+  if (type_p != SCM_EOL && !gh_procedure_p (type_p))
+      {
+       warning (_f ("Can't find property type-check for `%s'.  Perhaps you made a typing error? Doing assignment anyway.",
+                    ly_symbol2string (sym).ch_C ()));
+      }
+  else
+    {
+      if (val != SCM_EOL
+         && gh_procedure_p (type_p)
+         && gh_call1 (type_p, val) == SCM_BOOL_F)
+       {
+         SCM errport = scm_current_error_port ();
+         ok = false;
+         SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name"));
+         SCM type_name = gh_call1 (typefunc, type_p);
+
+         String realval = ly_scm2string (ly_write2scm (val));
+         if (realval.length_i () > 200)
+           realval = realval.left_str (100) + "\n :\n :\n" + realval.right_str (100);
+           
+         
+         scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
+                       ly_symbol2string (sym).ch_C (),
+                       realval.ch_C (),
+                       ly_scm2string (type_name).ch_C ()).ch_C (),
+                   errport);
+         scm_puts ("\n", errport);                   
+       }
+    }
+  return ok;
+}
index 989d932580ff3527ff8c3de26b181b9c522a94d6..de47ec41d4e60748b2d4c97deb6ef7fc35326eef 100644 (file)
@@ -172,9 +172,14 @@ set_loose_columns (Line_of_score* which, Column_x_positions const *posns)
        }
       while (1);
       
+    
+#if 0
       Real rx = right->relative_coordinate (right->get_parent (X_AXIS), X_AXIS);
       Real lx = left->relative_coordinate (left->get_parent (X_AXIS), X_AXIS);
 
+      /*
+       divide space equally over loose columns.
+       */
       int j = 1;
       loose = col;
       while (1)
@@ -191,6 +196,45 @@ set_loose_columns (Line_of_score* which, Column_x_positions const *posns)
          j ++; 
          loose = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
        }
+#else
+      /*
+       We divide the remaining space of the column over the left and
+       right side. At the moment, we  
+       
+      */
+      Grob * common = right->common_refpoint (left, X_AXIS);
+      
+      Real rx =        right->extent(common, X_AXIS)[LEFT];
+      Real lx =  left->extent(common, X_AXIS)[RIGHT];
+      Real total_dx = rx - lx;
+      Interval cval =col->extent (col, X_AXIS);
+
+      /*
+       
+       We put it in the middle. This is not an ideal solution -- the
+       break alignment code inserts a fixed space before the clef
+       (about 1 SS), while the space following the clef is
+       flexible. In tight situations, the clef will almost be on top
+       of the following note. 
+       
+      */
+      Real dx = rx-lx - cval.length ();
+      if (total_dx < 2* cval.length ())
+       {
+         /*
+           todo: this is discontinuous. I'm too tired to
+           invent a sliding mechanism. Duh.
+
+           TODO.
+          */
+         dx *= 0.25;
+       }
+      else
+       dx *= 0.5;
+
+      col->line_l_ = which;
+      col->translate_axis (lx + dx - cval[LEFT], X_AXIS); 
+#endif
     }
 }
 
index dc60a9deb430555adb858c94bd54a5b3031ddbcd..b8f3b24209bad677b2c1461b2e71465d88567fdd 100644 (file)
@@ -35,6 +35,6 @@ get_music_ctor (String s)
 Music* 
 get_music (String s)
 {
-  return (*get_music_ctor (s)) ();
+  return (*get_music_ctor (s)) () ;
 }
 
index b7e0e5695498090f7a27da241857dea3fa6cfa14..69755be0500e03a36e54a7fb7ad2f5fe7b85f66c 100644 (file)
@@ -100,9 +100,17 @@ Music_sequence::do_relative_octave (Pitch p, bool ret_first)
   Pitch last = p;
   for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
-      last = unsmob_music (ly_car (s))->to_relative_octave (last);
-      if (!count ++)
-       retval = last;
+      Music *m = unsmob_music (ly_car (s));
+      if (!m)
+       {
+         programming_error ("Music_sequence should only contain music!");
+       }
+      else
+       {
+         last = m->to_relative_octave (last);
+         if (!count ++)
+           retval = last;
+       }
     }
 
   if (!ret_first)
index 65b6bd608f3c491eb30b6dd763f8b6d22415f532..597afc58b22da9b6bcf7c5fe6077703771674967 100644 (file)
@@ -166,42 +166,6 @@ Music::internal_get_mus_property (SCM sym) const
   return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s); 
 }
 
-#if 0
-/*
-  Remove the value associated with KEY, and return it. The result is
-  that a next call will yield SCM_EOL (and not the underlying
-  `basic' property.
-*/
-SCM
-Music::remove_mus_property (const char* key)
-{
-  SCM val = get_mus_property (key);
-  if (val != SCM_EOL)
-    set_mus_property (key, SCM_EOL);
-  return val;
-}
-
-SCM
-Music::get_mus_property (const char *nm) const
-{
-  SCM sym = ly_symbol2scm (nm);
-  return get_mus_property (sym);
-}
-
-void
-Music::set_mus_property (const char* k, SCM v)
-{
-  SCM s = ly_symbol2scm (k);
-  set_mus_property (s, v);
-}
-
-void
-Music::set_immutable_mus_property (SCM s, SCM v)
-{
-  immutable_property_alist_ = gh_cons (gh_cons (s,v), mutable_property_alist_);
-  mutable_property_alist_ = scm_assq_remove_x (mutable_property_alist_, s);
-}
-#endif
 
 void
 Music::internal_set_mus_property (SCM s, SCM v)
@@ -266,16 +230,20 @@ ly_set_mus_property (SCM mus, SCM sym, SCM val)
       return SCM_UNSPECIFIED;
     }
 
-  if (sc)
+  if (!sc)
     {
-      sc->internal_set_mus_property (sym, val);
-    }
-  else
-    {
-      warning (_ ("ly_set_mus_property ():  not of type Music"));
+      warning (_ ("ly_set_mus_property ():  not of type Music: "));
       scm_write (mus, scm_current_error_port ());
+      return SCM_UNSPECIFIED;
     }
 
+
+  bool ok = type_check_assignment (val, sym, ly_symbol2scm ("music-type?"));
+  if (ok)
+    {
+      sc->internal_set_mus_property (sym, val);
+    }
+    
   return SCM_UNSPECIFIED;
 }
 
@@ -293,8 +261,9 @@ ly_make_music (SCM type)
     }
   else
     {
-      SCM s =       get_music (ly_scm2string (type))->self_scm ();
+      SCM s = get_music (ly_scm2string (type))->self_scm ();
       scm_gc_unprotect_object (s);
+
       return s;
     }
 }
@@ -314,9 +283,25 @@ ly_music_name (SCM mus)
    return ly_str02scm (nm);
 }
 
+SCM
+ly_music_list_p (SCM l)
+{
+  if (scm_list_p (l) != SCM_BOOL_T)
+    return SCM_BOOL_F;
+
+  while (gh_pair_p (l))
+    {
+      if (!unsmob_music (gh_car (l)))
+       return SCM_BOOL_F;
+      l =gh_cdr (l);
+    }
+  return SCM_BOOL_T;
+}
+
 static void
 init_functions ()
 {
+  scm_c_define_gsubr ("music-list?", 1, 0, 0, (Scheme_function_unknown)ly_music_list_p);  
   scm_c_define_gsubr ("ly-get-mus-property", 2, 0, 0, (Scheme_function_unknown)ly_get_mus_property);
   scm_c_define_gsubr ("ly-set-mus-property", 3, 0, 0, (Scheme_function_unknown)ly_set_mus_property);
   scm_c_define_gsubr ("ly-make-music", 1, 0, 0, (Scheme_function_unknown)ly_make_music);
index 0de5be0bf5534ede0307ca544bb724ceee8d813d..4f3942169454d53111fd74a13ebe0de890c7b797 100644 (file)
@@ -242,6 +242,7 @@ yylex (YYSTYPE *s,  void * v_l)
 
 /* escaped */
 %token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE E_TILDE
+%token E_BACKSLASH
 %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET 
 
 %type <i>      exclamations questions dots
@@ -1112,7 +1113,12 @@ command_element:
                $$-> set_spot (THIS->here_input ());
                $1-> set_spot (THIS->here_input ());
        }
+       | E_BACKSLASH {
+               $$ = new Music (gh_list (gh_cons (ly_symbol2scm ("name"), ly_symbol2scm ("separator")), SCM_UNDEFINED));
+               $$->set_spot (THIS->here_input ());
+       }
        | '|'      {
+
                extern Music * get_barcheck();
                $$ = get_barcheck ();
                $$->set_spot (THIS->here_input ());
index 4f33d16066ba4e1f8e5e839015b06cb832d2e3b5..7ff2812ca98bc528f4ecf0f642b196558a1c0224 100644 (file)
@@ -481,6 +481,8 @@ Stem::flag (Grob*me)
     {
       style = "";
     }
+  bool adjust = to_boolean (me->get_grob_property ("adjust-if-on-staffline"));
+
   if (String::compare_i (style, "mensural") == 0)
     /* Mensural notation: For notes on staff lines, use different
        flags than for notes between staff lines.  The idea is that
@@ -490,32 +492,37 @@ Stem::flag (Grob*me)
        touches a staff line.
     */
     {
-      /* Urrgh!  We have to detect wether this stem ends on a staff
-        line or between two staff lines.  But we can not call
-        stem_end_position(me) or get_default_stem_end_position(me),
-        since this encounters the flag and hence results in an
-        infinite recursion.  However, in pure mensural notation,
-        there are no multiple note heads attached to a single stem,
-        neither is there usually need for using the stem_shorten
-        property (except for 32th and 64th notes, but that is not a
-        problem since the stem length in this case is augmented by
-        an integral multiple of staff_space).  Hence, it should be
-        sufficient to just take the first note head, assume it's
-        the only one, look if it's on a staff line, and select the
-        flag's shape accordingly.  In the worst case, the shape
-        looks slightly misplaced, but that will usually be the
-        programmer's fault (e.g. when trying to attach multiple
-        note heads to a single stem in mensural notation).
-
-      */
-       Grob *first = first_head(me);
-       int sz = Staff_symbol_referencer::line_count (me)-1;
-       int p = (int)rint (Staff_symbol_referencer::position_f (first));
-       staffline_offs = (((p ^ sz) & 0x1) == 0) ? "1" : "0";
+      if (adjust)
+        {
+         /* Urrgh!  We have to detect wether this stem ends on a staff
+            line or between two staff lines.  But we can not call
+            stem_end_position(me) or get_default_stem_end_position(me),
+            since this encounters the flag and hence results in an
+            infinite recursion.  However, in pure mensural notation,
+            there are no multiple note heads attached to a single stem,
+            neither is there usually need for using the stem_shorten
+            property (except for 32th and 64th notes, but that is not a
+            problem since the stem length in this case is augmented by
+            an integral multiple of staff_space).  Hence, it should be
+            sufficient to just take the first note head, assume it's
+            the only one, look if it's on a staff line, and select the
+            flag's shape accordingly.  In the worst case, the shape
+            looks slightly misplaced, but that will usually be the
+            programmer's fault (e.g. when trying to attach multiple
+            note heads to a single stem in mensural notation).  */
+         Grob *first = first_head(me);
+         int sz = Staff_symbol_referencer::line_count (me)-1;
+         int p = (int)rint (Staff_symbol_referencer::position_f (first));
+         staffline_offs = (((p ^ sz) & 0x1) == 0) ? "1" : "0";
+       }
+      else
+        {
+         staffline_offs = "2";
+       }
     }
   else
     {
-       staffline_offs = "";
+      staffline_offs = "";
     }
   char c = (get_direction (me) == UP) ? 'u' : 'd';
   String index_str
index 79deb7cb8a5bc03ffd5a0c287b06d33e0cb623a8..ee3677cb9a15e26060bb179307bec4cecfabff36 100644 (file)
@@ -160,13 +160,40 @@ Third_spacing_spanner::prune_loose_colunms (Link_array<Grob> *cols)
          c->set_grob_property ("between-cols", gh_cons (lns,
                                                         rns));
 
-
          /*
-           TODO: we should have distance constraints for loose
-           columns anyway, and the placement could be improved. Clefs
-           easily run into their neigbhors when folded into too
-           little space.
+           Set distance constraints for loose columns
          */
+         Drul_array<Grob*> next_door;
+         next_door[LEFT] =cols->elem (i - 1);
+         next_door[RIGHT] =cols->elem (i + 1);   
+         Direction d = LEFT;
+         Drul_array<Real> dists(0,0);
+
+         do
+           {
+             dists[d] = 0.0;
+             Grob *lc = d == LEFT  ? lc : c;
+             Grob *rc = d == LEFT  ? c : rc;         
+             
+             for (SCM s = lc->get_grob_property ("spacing-wishes");
+                  gh_pair_p (s); s = gh_cdr (s))
+               {
+                 Grob *sp = unsmob_grob (gh_car (s));
+                 if (Note_spacing::left_column (sp) != lc
+                     || Note_spacing::right_column (sp) != rc)
+                   continue;
+
+                 dists[d] = dists[d] >? Note_spacing::get_spacing (sp);
+               }
+           }
+         while (flip (&d) != LEFT);
+
+         Rod r;
+         r.distance_f_ = dists[LEFT] + dists[RIGHT];
+         r.item_l_drul_[LEFT] = dynamic_cast<Item*> (cols->elem(i-1));
+         r.item_l_drul_[RIGHT] = dynamic_cast<Item*> (cols->elem (i+1));
+
+         r.add_to_cols ();
        }
       else
        {
index 4a6f5929343d15419f5b05c43cc75add8dc086ea..cfa2c287992a9be1c15522eaa23da482b50f7b95 100644 (file)
@@ -13,6 +13,7 @@
 #include "time-signature.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
+#include "warn.hh"
 
 MAKE_SCHEME_CALLBACK (Time_signature,brew_molecule,1);
 /*
@@ -80,6 +81,11 @@ Time_signature::special_time_signature (Grob*me, String s, int n, int d)
   if (!m.empty_b ()) 
     return m;
 
+  String message =
+      "unknown time signature `" + s +
+      "'; resorting to default layout with numbers";
+  warning (_ (message.ch_C ()));
+
   // Resort to default layout with numbers
   return time_signature (me, n, d);
 }
index bd9d1d1002ecba3ed41960ae05773a19ec6390e3..90e0c70acc19cb00f23d4bf8e02655ddcb1a91c0 100644 (file)
@@ -75,12 +75,6 @@ Translator_group::add_translator (SCM list, Translator *t)
   return list;
 }
 
-void
-Translator_group::add_fresh_simple_translator (Translator*t)
-{
-  simple_trans_list_ = add_translator (simple_trans_list_, t);
-  t->initialize ();
-}
 
 void
 Translator_group::add_used_group_translator (Translator *t)
@@ -410,42 +404,6 @@ Translator_group::finalize ()
 }
 
 
-bool
-type_check_assignment (SCM val, SCM sym,  SCM type_symbol) 
-{
-  bool ok = true;
-  SCM type_p = SCM_EOL;
-
-  if (gh_symbol_p (sym))
-    type_p = scm_object_property (sym, type_symbol);
-
-  if (type_p != SCM_EOL && !gh_procedure_p (type_p))
-      {
-       warning (_f ("Can't find property type-check for `%s'.  Perhaps you made a typing error? Doing assignment anyway.",
-                    ly_symbol2string (sym).ch_C ()));
-      }
-  else
-    {
-      if (val != SCM_EOL
-         && gh_procedure_p (type_p)
-         && gh_call1 (type_p, val) == SCM_BOOL_F)
-       {
-         SCM errport = scm_current_error_port ();
-         ok = false;
-         SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name"));
-         SCM type_name = gh_call1 (typefunc, type_p);
-
-         scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
-                       ly_symbol2string (sym).ch_C (),
-                       ly_scm2string (ly_write2scm (val)).ch_C (),
-                       ly_scm2string (type_name).ch_C ()).ch_C (),
-                   errport);
-         scm_puts ("\n", errport);                   
-       }
-    }
-  return ok;
-}
-
 SCM
 ly_get_trans_property (SCM context, SCM name)
 {
index 4c1eb13019443edfe511af6ea9a2e16e3c68d67e..5601b73a3343c431ec483fe1825268f0aa796f56 100644 (file)
@@ -78,42 +78,11 @@ newpage = {
 }
 
 % dynamic dir?  text script, articulation script dir?  
-oneVoice = {   
-  \stemBoth
-  \slurBoth
-  \tieBoth
-  \shiftOff
-}
-
-voiceOne = {
-  \stemUp
-  \slurUp
-  \tieUp
-  \dotsUp    
-}
-
-voiceTwo = {
-  \stemDown
-  \slurDown
-  \tieDown
-  \dotsDown  
-}
-   
-voiceThree = {
-  \stemUp
-  \slurUp
-  \tieUp
-  \shiftOn
-  \dotsUp
-}
-
-voiceFour = {
-  \stemDown
-  \slurDown
-  \tieDown
-  \shiftOn
-  \dotsDown
-}
+oneVoice = #(context-spec-music (make-voice-props-revert) "Voice")
+voiceOne = #(context-spec-music (make-voice-props-set 0) "Voice")
+voiceTwo = #(context-spec-music (make-voice-props-set 1) "Voice")
+voiceThree =#(context-spec-music (make-voice-props-set 2) "Voice")
+voiceFour = #(context-spec-music (make-voice-props-set 3) "Voice")
 
 % There's also dash, but setting dash period/length should be fixed.
 slurDotted = \property Voice.Slur \override #'dashed = #1
index 3b981777fe2b607107d736a1e5081973e682a179..475282d9964f0d24db21d3aed661c33dff2b1811 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.5.32
-Entered-date: 21FEB02
+Version: 1.5.33
+Entered-date: 25FEB02
 Description: @BLURB@
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.5.32.tar.gz 
+       1000k lilypond-1.5.33.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.5.32.tar.gz 
+       1000k lilypond-1.5.33.tar.gz 
 Copying-policy: GPL
 End
index 76669c9ea3ff53cdfae79c087dc20ed6504ee80d..e7048e0450f55f857d04b0aa80d265ede616a614 100644 (file)
@@ -1,5 +1,5 @@
 %define name lilypond
-%define version 1.5.32
+%define version 1.5.33
 %define release 1mdk
 
 Name: %{name}
index c4a62101842ee9cc1fa2d41bc5f4547d6e5ca2e3..3f552ed47a32795b9563a19b2bae0e5b25842432 100644 (file)
@@ -3,11 +3,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.5.32
+Version: 1.5.33
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.32.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.33.tar.gz
 Summary: Create and print music notation 
 URL: http://www.lilypond.org/
 BuildRoot: /tmp/lilypond-install
index bf059eb8dc31cbab7b850658234dc38c4c4914b4..25e6c57d0b427691b8babfc745ffc58bc50c7d9c 100644 (file)
 
 Distribution: SuSE Linux 7.0 (i386)
 Name: lilypond
-Version: 1.5.32
+Version: 1.5.33
 Release: 2
 Copyright:    GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.32.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.33.tar.gz
 # music notation software for.. ?
 Summary: A program for printing sheet music.
 URL: http://www.lilypond.org/
index 17ea22fecac753b8f9e5b0cfec1f62d61aa6b253..ee62663cfa760e6d36e8f034064e37e102b2b335 100644 (file)
@@ -8,7 +8,7 @@ include $(depth)/make/stepmake.make
 
 AF_FILES = $(wildcard *.af) 
 
-EXTRA_DIST_FILES += README feta.tex
+EXTRA_DIST_FILES += README feta.tex lilypond.map
 
 # don't try to make fonts from test files
 TEST_FILES = $(wildcard *test*.mf)
@@ -57,7 +57,7 @@ ifdef MAKE_PFA_FILES
 PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
 ALL_GEN_FILES += $(PFA_FILES)
 INSTALLATION_OUT_DIR4=$(datadir)/pfa
-INSTALLATION_OUT_FILES4=$(PFA_FILES)
+INSTALLATION_OUT_FILES4=$(PFA_FILES) lilypond.map
 
 pfa: $(PFA_FILES) 
 endif
index 70920b37e77570068379b57efd98ea95a5ef6a96..95d02d7310fd19cc4093e987843391a7fa1599b1 100644 (file)
@@ -40,9 +40,9 @@ else:
 %      input feta-bolletjes;   
 %      input feta-banier;
 %      input feta-eindelijk;
-%      input feta-klef;
+       input feta-klef;
 %      input feta-toevallig;
-       input feta-schrift;
+%      input feta-schrift;
 %      input feta-haak;
 %      input feta-timesig;
 %      input feta-pendaal;
index 39e8f6ee5da62f0f56286d4647e65b7d3a58149e..7fbdc4cb8bcd7e229c8f5f0534e8deef843c2186 100644 (file)
@@ -58,21 +58,21 @@ def draw_c_clef (expr reduction) =
        penpos6(norm-hair,90);
        z6=(xoff+3/4norm,0);
 
-       penpos7(hair,-90);
-       z7r=(x1,-d);
 
        save t; t=0.833;
        save p; path p;
        p = z5l..z4l{up}..z4r{down}..z3r{right}..tension t..z2r{up}
-               ..tension t..z1r{left}..z1l{right}..tension t..z2l{down}
+               ..tension t..
+               flare_path(z1l,180,90,hair,norm-1/2hair, -1)
+%z1r{left}..z1l{right}
+               ..tension t..z2l{down}
                ..z3l{left}..z6r..z5r{down};
        pickup pencircle scaled 1pt#;
        filldraw p..(reverse p yscaled -1)..cycle;
        penlabels (1,2,3,4,5,6);
 
        % ugh, should be bulb, not flare?
-       draw_flare(z1l,180,90,hair,norm-1/2hair);
-       draw_flare(z7r,180,-90,hair,norm-1/2hair);
+
        enddef;
 
 fet_beginchar ("C clef", "C", "altoclef")
@@ -101,66 +101,68 @@ fet_endchar;
 % the dots, but her picture shows that the extreme is ~ 0.2 ss lower
 
 def draw_bass_clef(expr exact_center, reduction) = 
-       save reduced_il, left_tilt, left_thick, ball_to_right;
-       reduced_il# = staff_space# * reduction;
-       
-       set_horizontal_spacing;
-       ball_to_right# = 2.1 reduced_il#;
-       set_char_box(left_space# +
-               - xpart exact_center,
-               right_space# +
-               xpart exact_center + ball_to_right# + 7/12 reduced_il#, 
-               - ypart exact_center + 2.5 reduced_il#, 
-               ypart exact_center +reduced_il#);
-
-       define_pixels(reduced_il, ball_to_right);
-       left_tilt = 5;
-       left_thick = .25  reduced_il;
-
-       x1r - x1l = left_thick;
-       z1l = (hround_pixels(xpart exact_center), 
-               vround_pixels(ypart exact_center));
-
-       y2 = reduced_il;
-
-       x3l - x1l =  ball_to_right;
-       x2 = .5 [x1,x3];
-       x3l - x3r = .48 reduced_il;
-       y3l = -0.05 staff_space;
-       x4 = x1l - stafflinethickness;
-       y4 = -2.2  reduced_il;
-       z5 = (x3l +  1/3 reduced_il, .5 reduced_il);
-
-       penpos1(whatever, left_tilt);
-       penpos2(1.2 stafflinethickness, -90);
-       penpos3(whatever,  185);
-       penpos4(stafflinethickness, 135);
-
-       draw_bulb(1, z1r,  z1l, .45 reduced_il, 1.0);
-
-
-       fill z1r{up} .. z2r{right} .. tension 1.0 .. z3r{down}  .. {curl 0} 
-               simple_serif(z4r, z4l, 90) {curl 0}
-               .. z3l{up} .. tension 0.9 .. z2l{left} 
-               .. z1l{dir (-90 + left_tilt)} -- cycle;
-       labels(2,4);
-       penlabels(1,2,3,4);
-
-       save dot_diam;
-       2 dot_diam = round reduction* (staff_space - stafflinethickness);
-       pickup pencircle scaled dot_diam;
-       drawdot z5;
-       drawdot z5 yscaled -1;
+        save reduced_il, left_tilt, left_thick, ball_to_right;
+        reduced_il# = staff_space# * reduction;
+        
+        set_horizontal_spacing;
+        ball_to_right# = 2.1 reduced_il#;
+        set_char_box(left_space# +
+                - xpart exact_center,
+                right_space# +
+                xpart exact_center + ball_to_right# + 7/12 reduced_il#, 
+                - ypart exact_center + 2.5 reduced_il#, 
+                ypart exact_center +reduced_il#);
+
+        define_pixels(reduced_il, ball_to_right);
+        left_tilt = 5;
+        left_thick = .25  reduced_il;
+
+        x1r - x1l = left_thick;
+        z1l = (hround_pixels(xpart exact_center), 
+                vround_pixels(ypart exact_center));
+
+        y2 = reduced_il;
+
+        x3l - x1l =  ball_to_right;
+        x2 = .5 [x1,x3];
+        x3l - x3r = .48 reduced_il;
+        y3l = -0.05 staff_space;
+        x4 = x1l - stafflinethickness;
+        y4 = -2.2  reduced_il;
+        z5 = (x3l +  1/3 reduced_il, .5 reduced_il);
+
+        penpos1(whatever, left_tilt);
+        penpos2(1.2 stafflinethickness, -90);
+        penpos3(whatever,  185);
+        penpos4(stafflinethickness, 135);
+
+        draw_bulb(1, z1r,  z1l, .45 reduced_il, 1.0);
+
+
+        fill z1r{up} .. z2r{right} .. tension 1.0 .. z3r{down}  .. {curl 0} 
+                simple_serif(z4r, z4l, 90) {curl 0}
+                .. z3l{up} .. tension 0.9 .. z2l{left} 
+                .. z1l{dir (-90 + left_tilt)} -- cycle;
+        labels(2,4);
+        penlabels(1,2,3,4);
+
+        save dot_diam;
+        2 dot_diam = round reduction* (staff_space - stafflinethickness);
+        pickup pencircle scaled dot_diam;
+        drawdot z5;
+        drawdot z5 yscaled -1;
 enddef;
 
 
 
+
 fet_beginchar("F clef ", "F", "bassclef")
        if test = 1:
                draw_staff(-3,1, 0.0);
        fi;
        draw_bass_clef((.5 staff_space#, 0), 1.0);
 fet_endchar;
+
 fet_beginchar("F clef (reduced)", "F_change", "cbassclef")
        draw_bass_clef((.4 staff_space#, 0),0.8);
 fet_endchar;
index 26320c6a6bb22ff15bc8034b74fde2308abce665..f134aba8ea735ff40dc5ec97844957bba42e2890 100644 (file)
@@ -166,7 +166,18 @@ def draw_brush(expr a,w,b,v) =
        fill z3r{z3r-z5l}..z4l..{z5r-z3l}z3l..z5r{z5r-z3l}..z6l..{z3r-z5l}z5l..cycle;
 enddef;
 
-def draw_flare(expr pos,alpha,beta,line,flare) =
+
+
+
+
+%
+% alpha = start direction.
+% beta = which side to turn to.
+% flare = diameter of the bulb
+% line = diameter of line attachment
+% direction = is ink on left or right side (1 or -1)
+%
+def flare_path(expr pos,alpha,beta,line,flare, direction) =
        begingroup;
        clearxy;
        penpos1(line,180+beta+alpha);
@@ -175,16 +186,62 @@ def draw_flare(expr pos,alpha,beta,line,flare) =
        z2=z3;
        penpos3(flare,0+alpha);
        z3l=z1r+(1/2+0.43)*flare*dir(alpha+beta);
-       z4=z2r-line*dir(alpha);
+       save taille;
+       taille = 0.0;
+       z4=z2r-  line * dir(alpha);
        penlabels(1,2,3,4);
        pickup pencircle;
        save t; t=0.833;
-       fill z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)}
+       save p; 
+       path p;
+       p:=z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)}
                ..z3l{dir(180+alpha+beta)}..tension t
-               ..z4{dir(180+alpha+beta)}..z1l{dir(alpha+180)}..cycle;
-       endgroup;
+               ..z4{dir(180+alpha+beta)}..z1l{dir(alpha+180)};
+
+       if direction = 1:
+               p
+       else:
+               reverse p
+       fi
+       endgroup
+       enddef;
+
+def flare_path_t(expr pos,alpha,beta,line, flare, bulb, direction) =
+       begingroup;
+       clearxy;
+       penpos1(line, 180+beta+alpha);
+       z1r=pos;
+       penpos2(bulb, 180+beta+alpha);
+       z2=z3;
+       penpos3(bulb, 0+alpha);
+       save taille,roundness;
+
+       taille = -0.5;
+       roundness = 0.5;
+       z3r = z1  + flare * (dir (alpha) + dir (alpha +beta));
+       z4=  z2r - taille * line * dir(alpha)
+               + roundness * line *dir (alpha - beta)
+               ;
+
+       penlabels(1,2,3,4);
+       pickup pencircle;
+       save t; t=0.833;
+       save p; 
+       path p;
+       p:=z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)}
+               ..z3l{dir(180+alpha+beta)}..tension t
+               ..z4{dir(180+alpha+beta)}
+               ..z1l{dir(alpha+180)};
+
+       if direction = 1:
+               p
+       else:
+               reverse p
+       fi
+       endgroup
        enddef;
 
+
 def brush(expr a,w,b,v) =
        begingroup;
        draw_brush(a,w,b,v);    
index 4065b666515de95901a739cbb30b9e53d399b6fd..eb5581eec25be87fa05123947b4e68eb2fbc1f3f 100644 (file)
@@ -74,9 +74,10 @@ def draw_six =
        save t; t=tense;
        fill z7{right}..z2r{right}..tension t..z3r{down}
                ..tension t..z4r{left}
-               ..tension t..z7r{up}..tension t..z6r{right}
-               ..z6l{left}..tension t..z7l{down}..z10l{up}..cycle;
-       draw_flare(z6r,0,-90,hair,flare);
+               ..tension t..z7r{up}..tension t..
+               flare_path (z6r,0,-90,hair,flare, 1)
+               ..tension t..z7l{down}..z10l{up}..cycle;
+
        unfill z2l{right}..tension t..z3l{down}..tension t
                ..z4l{left}..tension t..z10l{up}..tension t..cycle;
        enddef;
@@ -203,10 +204,10 @@ fet_beginchar("Numeral 2", "2", "two")
        penlabels(5,6);
        save t; t=tense;
        fill z1l{dir(beta)}..tension t..z4r{up}
-               ..tension t..z5r{left}..z5l{right}
+               ..tension t..
+               flare_path(z5r,180,90,thin,flare,1)
                ..z4l{down}..tension t
                ..{dir(180+beta)}z1r..cycle;
-       draw_flare(z5r,180,90,thin,flare);
 fet_endchar;
 
 fet_beginchar("Numeral 3", "3", "three")
@@ -230,16 +231,24 @@ fet_beginchar("Numeral 3", "3", "three")
        penlabels(1,2,3,4,5,6,7);
        save alpha; alpha=25;
        save t; t=tense;
-       fill z1l{right}..tension t..z2l{down}..z7r{dir(180+alpha)}
-               ..z7l{dir(-alpha)}..z5r{down}..tension t..z6r{left}
-               ..z6l{right}..tension t..z5l{up}
+       pickup pencircle scaled 1;
+%      draw
+       fill
+               flare_path (z1l, 180, 90, hair, 7/8 flare, -1) ..tension t..
+               z2l{down}..z7r{dir(180+alpha)}
+               ..z7l{dir(-alpha)}..z5r{down}..tension t..
+
+               flare_path (z6r, 180, -90, hair, flare, 1) ..tension t..
+
+               z5l{up}
                ..tension t..z3l{left}..z4l{left}
                ..z4r{right}..z3r{right}..tension t..z2r{up}
-               ..tension t..z1r{left}..cycle;
-       draw_flare(z1l,180,90,hair,7/8flare);
-       draw_flare(z6r,180,-90,hair,flare);
+               ..tension t.. cycle
+;
 fet_endchar;
 
+
+       
 fet_beginchar("Numeral 4", "4", "four")
        set_char_box(0, 4/5height#*widen, 0, height#);
        message "w:"&decimal w;
@@ -312,10 +321,11 @@ fet_beginchar("Numeral 5", "5", "five")
        save beta; beta=45;
        save t; t=tense;
        fill z8r{dir(beta)}..z9r{right}..tension t..z10r{down}
-               ..tension t..z11r{left}
+               ..tension t..
+               flare_path(z11r,180,-90,hair,flare, 1)
                ..z11l{right}..tension t..z10l{up}..tension t
                ..z9l{left}..z8l{dir(180+beta+10)}..cycle;
-       draw_flare(z11r,180,-90,hair,flare);
+
 fet_endchar;
 
 fet_beginchar("Numeral 6", "6", "six")
index 884ca5c30a5b0cb3045dd6e7478eae4c63b7a766..2c6e8f5338d803daa54e87b23940b2dc3f90d9fc 100644 (file)
@@ -2,7 +2,7 @@
 % part of LilyPond's pretty-but-neat music font
 
 design_size:=10; % feta20 = 20pt
-
+% mode := smoke;
 input feta-nummer;
 
 end.
diff --git a/mf/lilypond.map b/mf/lilypond.map
new file mode 100644 (file)
index 0000000..5ba7e28
--- /dev/null
@@ -0,0 +1,38 @@
+%vvv UniqueID=4455667
+feta11 TeX-feta11 <feta11.pfa
+feta13 TeX-feta13 <feta13.pfa
+feta16 TeX-feta16 <feta16.pfa
+feta19 TeX-feta19 <feta19.pfa
+feta20 TeX-feta20 <feta20.pfa
+feta23 TeX-feta23 <feta23.pfa
+feta26 TeX-feta26 <feta26.pfa
+feta-din4 TeX-feta-din4 <feta-din4.pfa
+feta-din5 TeX-feta-din5 <feta-din5.pfa
+feta-din6 TeX-feta-din6 <feta-din6.pfa
+feta-din7 TeX-feta-din7 <feta-din7.pfa
+feta-din8 TeX-feta-din8 <feta-din8.pfa
+feta-din9 TeX-feta-din9 <feta-din9.pfa
+feta-din10 TeX-feta-din10 <feta-din10.pfa
+feta-din11 TeX-feta-din11 <feta-din11.pfa
+feta-din12 TeX-feta-din12 <feta-din12.pfa
+feta-din13 TeX-feta-din13 <feta-din13.pfa
+feta-din14 TeX-feta-din14 <feta-din14.pfa
+feta-din17 TeX-feta-din17 <feta-din17.pfa
+feta-din19 TeX-feta-din19 <feta-din19.pfa
+feta-braces0 TeX-feta-braces0 <feta-braces0.pfa
+feta-braces1 TeX-feta-braces1 <feta-braces1.pfa
+feta-braces2 TeX-feta-braces2 <feta-braces2.pfa
+feta-braces3 TeX-feta-braces3 <feta-braces3.pfa
+feta-braces4 TeX-feta-braces4 <feta-braces4.pfa
+feta-braces5 TeX-feta-braces5 <feta-braces5.pfa
+feta-braces6 TeX-feta-braces6 <feta-braces6.pfa
+feta-braces7 TeX-feta-braces7 <feta-braces7.pfa
+feta-braces8 TeX-feta-braces8 <feta-braces8.pfa
+feta-nummer4 TeX-feta-nummer4 <feta-nummer4.pfa
+feta-nummer5 TeX-feta-nummer5 <feta-nummer5.pfa
+feta-nummer6 TeX-feta-nummer6 <feta-nummer6.pfa
+feta-nummer7 TeX-feta-nummer7 <feta-nummer7.pfa
+feta-nummer8 TeX-feta-nummer8 <feta-nummer8.pfa
+feta-nummer10 TeX-feta-nummer10 <feta-nummer10.pfa
+feta-nummer11 TeX-feta-nummer11 <feta-nummer11.pfa
+feta-nummer13 TeX-feta-nummer13 <feta-nummer13.pfa
index d60c1af07ebfcfc210858abf33b6275442722268..3efab9dfbe52c0d17a73e53c3ddd37dcf66a17f7 100644 (file)
@@ -14,6 +14,15 @@ fet_begingroup ("custodes")
 noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
 define_pixels(noteheight);
 
+save between_staff_lines, on_staff_line, anywhere;
+between_staff_lines = 0;
+on_staff_line = 1;
+anywhere = 2;
+
+save dir_up, dir_down;
+dir_up = 1;
+dir_down = -1;
+
 
 %%%%%%%%
 %
@@ -22,254 +31,295 @@ define_pixels(noteheight);
 %
 %
 
-% stem up
-fet_beginchar("Custos Hufnagel", "hufnagel", "hufnagel")
-       save b_h,a_w;
-       a_b:=1.54; % b_h*a_b/a_w = wd/ht
-       b_h:=0.85;
-       a_w:=1.09;
-
-       save a, beta, ht, wd;
-       ht# =noteheight#;
-       2beta#=ht#*b_h;
-       a# = beta#*a_b;
-       wd# = 2a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2);
-       black_notehead_width# := wd#;
-
-       save rh_width, rh_height, rh_edge; % rhombus dimensions
-       rh_width#=0.7ht#; % ht*tan(35)
-       rh_height#=1.0ht#;
-       rh_edge#=0.61ht#; % (ht/2)/cos(35)
-
-       define_pixels(rh_width, rh_height, rh_edge);
-       pickup pencircle
-         xscaled stafflinethickness
-         yscaled rh_edge rotated -35;
-       z1=(0.5rh_width,+0.25rh_height);
-       z2=(1.0rh_width,-0.25rh_height);
-       z3=(2.0rh_width,+0.50rh_height);
-       draw z1 -- z2 -- z3;
-fet_endchar;
-
-% stem down
-fet_beginchar("Reverse Custos Hufnagel", "rhufnagel", "rhufnagel")
-       save b_h,a_w;
-       a_b:=1.54; % b_h*a_b/a_w = wd/ht
-       b_h:=0.85;
-       a_w:=1.09;
-
-       save a, beta, ht, wd;
-       ht# =noteheight#;
-       2beta#=ht#*b_h;
-       a# = beta#*a_b;
-       wd# = 2a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2);
-       black_notehead_width# := wd#;
-
-       save rh_width, rh_height, rh_edge; % rhombus dimensions
-       rh_width#=0.7ht#; % ht*tan(35)
-       rh_height#=1.0ht#;
-       rh_edge#=0.61ht#; % (ht/2)/cos(35)
-
-       define_pixels(rh_width, rh_height, rh_edge);
-       pickup pencircle
-         xscaled stafflinethickness
-         yscaled rh_edge rotated +35;
-       z1=(0.5rh_width,-0.25rh_height);
-       z2=(1.0rh_width,+0.25rh_height);
-       z3=(2.0rh_width,-0.50rh_height);
-       draw z1 -- z2 -- z3;
-fet_endchar;
-
+% parameterized hufnagel custos
+def custos_hufnagel(expr verbose_name, internal_name, mudela_name,
+                   direction, staffline_adjustment) =
+
+       fet_beginchar(verbose_name, internal_name, mudela_name)
+
+               save b_h, a_w;
+               a_b := 1.54; % b_h * a_b / a_w = wd / ht
+               b_h := 0.85;
+               a_w := 1.09;
+
+               save a, beta, ht, wd;
+               ht# = noteheight#;
+               2beta# = ht# * b_h;
+               a# = beta# * a_b;
+               wd# = 2a# / a_w;
+               set_char_box(0, wd#, ht# / 2, ht# / 2);
+               black_notehead_width# := wd#;
+
+               save rh_width, rh_height, rh_edge; % rhombus dimensions
+               rh_width# / ht# = tand(35);
+               rh_height# = 1.0ht#;
+               rh_edge# * cosd(35) = ht# / 2;
+
+               save stem_size;
+               if staffline_adjustment = between_staff_lines:
+                       stem_size = 0.25;
+               elseif staffline_adjustment = on_staff_line:
+                       stem_size = 0.75;
+               else: % staffline_adjustment = anywhere
+                       stem_size = 0.50;
+               fi;
+
+               define_pixels(rh_width, rh_height, rh_edge);
+               pickup pencircle
+                 xscaled stafflinethickness
+                 yscaled rh_edge
+                 rotated (-35*direction);
+               z1=(0.5rh_width,+0.25direction*rh_height);
+               z2=(1.0rh_width,-0.25direction*rh_height);
+               z3-z2=(stem_size*rh_width,+0.75*stem_size*direction*rh_height);
+               draw z1 -- z2 -- z3;
+
+       fet_endchar;
+enddef;
+
+% custos hufnagel, stem up, between staff lines
+custos_hufnagel("Custos Hufnagel", "hufnagel-u0", "hufnagel_u0",
+               dir_up, between_staff_lines);
+
+% custos hufnagel, stem up, on staff line
+custos_hufnagel("Custos Hufnagel", "hufnagel-u1", "hufnagel_u1",
+               dir_up, on_staff_line);
+
+% custos hufnagel, stem up, anywhere
+custos_hufnagel("Custos Hufnagel", "hufnagel-u2", "hufnagel_u2",
+               dir_up, anywhere);
+
+% custos hufnagel, stem down, between staff lines
+custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d0", "hufnagel_d0",
+               dir_down, between_staff_lines);
+
+% custos hufnagel, stem down, on staff line
+custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d1", "hufnagel_d1",
+               dir_down, on_staff_line);
+
+% custos hufnagel, stem down, anywhere
+custos_hufnagel("Reverse Custos Hufnagel", "hufnagel-d2", "hufnagel_d2",
+               dir_down, anywhere);
 
 %%%%%%%%
 %
+%
 % Medicaea style
 %
+%
+
+def custos_medicaea(expr verbose_name, internal_name, mudela_name,
+                   direction, staffline_adjustment) =
+
+       fet_beginchar(verbose_name, internal_name, mudela_name)
+
+               save b_h, a_w;
+               a_b := 1.54; % b_h * a_b / a_w = wd / ht
+               b_h := 0.85;
+               a_w := 1.09;
+
+               save a, beta, ht, wd;
+               ht# = noteheight# * mag;
+               2beta# = ht# * b_h;
+               a# = beta# * a_b;
+               wd# = 0.4a# / a_w;      % width intentionally too small
+               set_char_box(0, wd#, ht# / 2, ht# / 2);
+               black_notehead_width# := wd#;
+
+               define_pixels(ht, wd);
+
+               save stem_size;
+               if staffline_adjustment = between_staff_lines:
+                       stem_size = 0.90;
+               elseif staffline_adjustment = on_staff_line:
+                       stem_size = 1.40;
+               else: % staffline_adjustment = anywhere
+                       stem_size = 1.15;
+               fi;
+
+               pickup pencircle xscaled blot_diameter yscaled 1.0ht;
+               z1 = (0.0wd, 0.0ht);
+               z2 = z1 + (1.0wd - blot_diameter/2, 0);
+               draw z1 .. z2;
 
-% stem up
-fet_beginchar("Custos Med.", "medicaea", "medicaea")
-       save b_h, a_w;
-       a_b := 1.54; % b_h*a_b/a_w = wd/ht
-       b_h := 0.85;
-       a_w := 1.09;
-
-       save a, beta, ht, wd;
-       ht# = noteheight# * mag;
-       2beta# = ht# * b_h;
-       a# = beta# * a_b;
-       wd# = 0.4a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
-       black_notehead_width# := wd#;
-
-       define_pixels(ht, wd);
-
-       % head
-       pickup pencircle xscaled blot_diameter yscaled 1.0ht;
-       z1 = (0.0wd, 0.0ht);
-       z2 = z1 + (1.0wd - blot_diameter/2, 0);
-       draw z1 .. z2;
-
-       % stem
-       pickup pencircle scaled stafflinethickness;
-       z3 = (1.0wd - stafflinethickness/2, 0.0ht);
-       z4 = z3 + (0, +1.0ht);
-       draw z3 .. z4;
-fet_endchar;
-
-
-% stem down
-fet_beginchar("Reverse Custos Med.", "rmedicaea", "rmedicaea")
-       save b_h, a_w;
-       a_b := 1.54; % b_h*a_b/a_w = wd/ht
-       b_h := 0.85;
-       a_w := 1.09;
-
-       save a, beta, ht, wd;
-       ht# = noteheight# * mag;
-       2beta# = ht# * b_h;
-       a# = beta# * a_b;
-       wd# = 0.4a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
-       black_notehead_width# := wd#;
-
-       define_pixels(ht, wd);
-
-       % head
-       pickup pencircle xscaled blot_diameter yscaled 1.0ht;
-       z1 = (0.0wd, 0.0ht);
-       z2 = z1 + (1.0wd - blot_diameter/2, 0);
-       draw z1 .. z2;
-
-       % stem
-       pickup pencircle scaled stafflinethickness;
-       z3 = (1.0wd - stafflinethickness/2, 0.0ht);
-       z4 = z3 + (0, -1.0ht);
-       draw z3 .. z4;
-fet_endchar;
+               pickup pencircle scaled stafflinethickness;
+               z3 = (1.0wd - stafflinethickness/2, 0.0ht);
+               z4 = z3 + (0, +direction*stem_size*ht);
+               draw z3 .. z4;
 
+       fet_endchar;
+enddef;
+
+% custos medicaea, stem up, between staff lines
+custos_medicaea("Custos Med.", "medicaea-u0", "medicaea_u0",
+               dir_up, between_staff_lines);
+
+% custos medicaea, stem up, on staff line
+custos_medicaea("Custos Med.", "medicaea-u1", "medicaea_u1",
+               dir_up, on_staff_line);
+
+% custos medicaea, stem up, anywhere
+custos_medicaea("Custos Med.", "medicaea-u2", "medicaea_u2",
+               dir_up, anywhere);
+
+% custos medicaea, stem down, between staff lines
+custos_medicaea("Reverse Custos Med.", "medicaea-d0", "medicaea_d0",
+               dir_down, between_staff_lines);
+
+% custos medicaea, stem down, on staff line
+custos_medicaea("Reverse Custos Med.", "medicaea-d1", "medicaea_d1",
+               dir_down, on_staff_line);
+
+% custos medicaea, stem down, anywhere
+custos_medicaea("Reverse Custos Med.", "medicaea-d2", "medicaea_d2",
+               dir_down, anywhere);
 
 %%%%%%%%
 %
+%
 % Editio Vaticana style
 %
+%
 
-% stem up
-fet_beginchar("Custos Ed. Vat.", "vaticana", "vaticana")
-       save b_h, a_w;
-       a_b := 1.54; % b_h*a_b/a_w = wd/ht
-       b_h := 0.85;
-       a_w := 1.09;
-
-       save a, beta, ht, wd;
-       ht# = noteheight# * mag;
-       2beta# = ht# * b_h;
-       a# = beta# * a_b;
-       wd# = 0.4a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2);
-       black_notehead_width# := wd#;
-
-       define_pixels(ht, wd);
-       pickup pencircle scaled stafflinethickness;
-
-       z1 = (0.0wd, +0.05ht);
-       z2 = (1.0wd + 0.5stafflinethickness, 0.0ht);
-       penpos1(0.5ht, 90);
-       penpos2(0.5ht, 90);
-       penstroke z1e{z2 - z1} .. {right}z2e;
-
-       z3=(1.0wd, +0.0ht);
-       z4=(1.0wd, +1.0ht);
-       draw z3 -- z4;
-fet_endchar;
-
-
-% stem down
-fet_beginchar("Reverse Custos Ed. Vat.", "rvaticana", "rvaticana")
-       save b_h, a_w;
-       a_b := 1.54; % b_h*a_b/a_w = wd/ht
-       b_h := 0.85;
-       a_w := 1.09;
-
-       save a, beta, ht, wd;
-       ht# = noteheight# * mag;
-       2beta# = ht# * b_h;
-       a# = beta# * a_b;
-       wd# = 0.4a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2);
-       black_notehead_width# := wd#;
-
-       define_pixels(ht, wd);
-       pickup pencircle scaled stafflinethickness;
-
-       z1 = (0.0wd, -0.05ht);
-       z2 = (1.0wd + 0.5stafflinethickness, -0.0ht);
-       penpos1(0.5ht, 90);
-       penpos2(0.5ht, 90);
-       penstroke z1e{z2 - z1} .. {right}z2e;
-
-       z3=(1.0wd, -0.0ht);
-       z4=(1.0wd, -1.0ht);
-       draw z3 -- z4;
-fet_endchar;
-
+def custos_vaticana(expr verbose_name, internal_name, mudela_name,
+                   direction, staffline_adjustment) =
+
+       fet_beginchar(verbose_name, internal_name, mudela_name)
+
+               save b_h, a_w;
+               a_b := 1.54; % b_h * a_b / a_w = wd / ht
+               b_h := 0.85;
+               a_w := 1.09;
+
+               save a, beta, ht, wd;
+               ht# = noteheight# * mag;
+               2beta# = ht# * b_h;
+               a# = beta# * a_b;
+               wd# = 0.4a# / a_w;
+               set_char_box(0, wd#, ht# / 2, ht# / 2);
+               black_notehead_width# := wd#;
+
+               save stem_size;
+               if staffline_adjustment = between_staff_lines:
+                       stem_size = 0.60;
+               elseif staffline_adjustment = on_staff_line:
+                       stem_size = 1.10;
+               else: % staffline_adjustment = anywhere
+                       stem_size = 0.85;
+               fi;
+
+               define_pixels(ht, wd);
+               pickup pencircle scaled stafflinethickness;
+
+               z1 = (0.0wd, +direction*0.05ht);
+               z2 = (1.0wd + 0.5stafflinethickness, 0.0ht);
+               penpos1(0.5ht, 90);
+               penpos2(0.5ht, 90);
+               penstroke z1e{z2 - z1} .. {right}z2e;
+
+               z3=(1.0wd, +0.0ht);
+               z4=(1.0wd, +direction*stem_size*ht);
+               draw z3 -- z4;
+
+       fet_endchar;
+enddef;
+
+% custos vaticana, stem up, between staff lines
+custos_vaticana("Custos Ed. Vat.", "vaticana-u0", "vaticana_u0",
+               dir_up, between_staff_lines);
+
+% custos vaticana, stem up, on staff line
+custos_vaticana("Custos Ed. Vat.", "vaticana-u1", "vaticana_u1",
+               dir_up, on_staff_line);
+
+% custos vaticana, stem up, anywhere
+custos_vaticana("Custos Ed. Vat.", "vaticana-u2", "vaticana_u2",
+               dir_up, anywhere);
+
+% custos vaticana, stem down, between staff lines
+custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d0", "vaticana_d0",
+               dir_down, between_staff_lines);
+
+% custos vaticana, stem down, on_staff_line
+custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d1", "vaticana_d1",
+               dir_down, on_staff_line);
+
+% custos vaticana, stem down, anywhere
+custos_vaticana("Reverse Custos Ed. Vat.", "vaticana-d2", "vaticana_d2",
+               dir_down, anywhere);
 
 %%%%%%%%
 %
+%
 % Mensural style
 %
+%
 
-% stem up
-fet_beginchar("Custos Mensural", "mensural", "mensural")
-       save b_h,a_w;
-       a_b:=1.54; % b_h*a_b/a_w = wd/ht
-       b_h:=0.85;
-       a_w:=1.09;
-
-       save a, beta, ht, wd;
-       ht# =noteheight#;
-       2beta#=ht#*b_h;
-       a# = beta#*a_b;
-       wd# = 2a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
-       black_notehead_width# := wd#;
-
-       define_pixels(ht, wd);
-       pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated -35;
-       z1=(0.0wd,-0.2ht);
-       z2=(0.2wd,+0.2ht);
-       z3=(0.4wd,-0.2ht);
-       z4=(0.6wd,+0.2ht);
-       z5=(0.8wd,-0.2ht);
-       z6=(1.6wd,+1.4ht);
-       draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
-fet_endchar;
-
-% stem down
-fet_beginchar("Reverse Custos Mensural", "rmensural", "rmensural")
-       save b_h,a_w;
-       a_b:=1.54; % b_h*a_b/a_w = wd/ht
-       b_h:=0.85;
-       a_w:=1.09;
-
-       save a, beta, ht, wd;
-       ht# =noteheight#;
-       2beta#=ht#*b_h;
-       a# = beta#*a_b;
-       wd# = 2a# / a_w;
-       set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
-       black_notehead_width# := wd#;
-
-       define_pixels(ht, wd);
-       pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated +35;
-       z1=(0.0wd,+0.2ht);
-       z2=(0.2wd,-0.2ht);
-       z3=(0.4wd,+0.2ht);
-       z4=(0.6wd,-0.2ht);
-       z5=(0.8wd,+0.2ht);
-       z6=(1.6wd,-1.4ht);
-       draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
-fet_endchar;
+def custos_mensural(expr verbose_name, internal_name, mudela_name,
+                   direction, staffline_adjustment) =
+
+       fet_beginchar(verbose_name, internal_name, mudela_name)
+
+               save b_h,a_w;
+               a_b:=1.54; % b_h * a_b / a_w = wd / ht
+               b_h:=0.85;
+               a_w:=1.09;
+
+               save a, beta, ht, wd;
+               ht# = noteheight#;
+               2beta# = ht# * b_h;
+               a# = beta# * a_b;
+               wd# = 2a# / a_w;        % width intentionally too small
+               set_char_box(0, wd#, ht# / 2, ht# / 2);
+               black_notehead_width# := wd#;
+
+               save stem_size;
+               if staffline_adjustment = between_staff_lines:
+                       stem_size = 0.85;
+               elseif staffline_adjustment = on_staff_line:
+                       stem_size = 1.35;
+               else: % staffline_adjustment = anywhere
+                       stem_size = 1.10;
+               fi;
+
+               define_pixels(ht, wd);
+               pickup pencircle
+                 xscaled stafflinethickness
+                 yscaled 0.4ht
+                 rotated (-35*direction);
+               z1=(0.0wd,-direction*0.2ht);
+               z2=(0.2wd,+direction*0.2ht);
+               z3=(0.4wd,-direction*0.2ht);
+               z4=(0.6wd,+direction*0.2ht);
+               z5=(0.8wd,-direction*0.2ht);
+               z6-z5=(stem_size*0.5wd,+direction*stem_size*ht);
+               draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
+
+       fet_endchar;
+enddef;
+
+% custos mensural, stem up, between staff lines
+custos_mensural("Custos Mensural", "mensural-u0", "mensural_u0",
+               dir_up, between_staff_lines);
+
+% custos mensural, stem up, on staff line
+custos_mensural("Custos Mensural", "mensural-u1", "mensural_u1",
+               dir_up, on_staff_line);
+
+% custos mensural, stem up, anywhere
+custos_mensural("Custos Mensural", "mensural-u2", "mensural_u2",
+               dir_up, anywhere);
+
+% custos mensural, stem down, between staff lines
+custos_mensural("Reverse Custos Mensural", "mensural-d0", "mensural_d0",
+               dir_down, between_staff_lines);
+
+% custos mensural, stem down, on staff line
+custos_mensural("Reverse Custos Mensural", "mensural-d1", "mensural_d1",
+               dir_down, on_staff_line);
+
+% custos mensural, stem down, anywhere
+custos_mensural("Reverse Custos Mensural", "mensural-d2", "mensural_d2",
+               dir_down, anywhere);
 
 fet_endgroup ("custodes")
index bdfd5aac0910c2b0cc975be04ca04de7fcc0baab..63a5ded432c57c24b6616f5e56a701fab6fcc4b4 100644 (file)
 
 fet_begingroup ("flags")
 
+save between_staff_lines, on_staff_line, anywhere;
+between_staff_lines = 0;
+on_staff_line = 1;
+anywhere = 2;
 
-%%%%%%%%
-%
-%
-%
-% Mensural Notation
-%
-%
-%
-
-def draw_mensural_outermost_flag_i =
-       define_pixels(stafflinethickness, staff_space)
-
-       pickup pencircle
-               xscaled 1.00 stafflinethickness
-               yscaled 0.22 staff_space
-               rotated -35;
-
-       save za, zb, zc, zd, ze;
-       pair za, zb, zc, zd, ze;
-
-       za = (+0.00 staff_space, -0.00 staff_space);
-       zb = (+0.15 staff_space, -0.00 staff_space);
-       zc = (+0.45 staff_space, -0.35 staff_space);
-       zd = (+0.45 staff_space, -0.85 staff_space);
-       ze = (+0.00 staff_space, -2.00 staff_space);
-
-       draw za .. zb -- zc{zc-zb} .. {ze-zd}zd -- ze;
-enddef;
-
-def draw_mensural_outermost_flag_ii =
-       define_pixels(stafflinethickness, staff_space)
-
-       pickup pencircle
-               xscaled 1.00 stafflinethickness
-               yscaled 0.22 staff_space
-               rotated -35;
-
-       save za, zb, zc, zd, ze;
-       pair za, zb, zc, zd, ze;
-
-       za = (+0.00 staff_space, -0.00 staff_space);
-       zb = (+0.15 staff_space, -0.00 staff_space);
-       zc = (+0.20 staff_space, -0.05 staff_space);
-       zd = (+0.20 staff_space, -1.15 staff_space);
-       ze = (+0.00 staff_space, -1.40 staff_space);
-
-       draw za .. zb -- zc{zc-zb} .. {ze-zd}zd -- ze;
-enddef;
-
-def draw_mensural_inner_flag(expr il_shift) =
-       define_pixels(stafflinethickness, staff_space)
-
-       pickup pencircle
-               xscaled 1.00 stafflinethickness
-               yscaled 0.22 staff_space
-               rotated -35;
+save dir_up, dir_down;
+dir_up = 1;
+dir_down = -1;
 
-       save zs, za, zb, zc, zd;
-       pair zs, za, zb, zc, zd;
-
-       zs = (0, -il_shift * staff_space);
-       za = zs + (+0.00 staff_space, -0.10 staff_space);
-       zb = zs + (+0.33 staff_space, -0.30 staff_space);
-       zc = zs + (+0.33 staff_space, -0.70 staff_space);
-       zd = zs + (+0.00 staff_space, -0.90 staff_space);
-
-       draw za{2,1} .. zb .. zc .. {-2,-1}zd;
-enddef;
-
-fet_beginchar("8th Mensural Flag (up)", "mensuralu03", "menseighthflag")
-       set_char_box(0, 0.60 staff_space#, 2.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-fet_endchar;
-
-fet_beginchar("8th Mensural Flag (up)", "mensuralu13", "mens1eighthflag")
-       set_char_box(0, 0.60 staff_space#, 1.50 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-fet_endchar;
-
-fet_beginchar("8th Mensural Flag (down)", "mensurald03", "mensdeighthflag")
-       set_char_box(0.60 staff_space#, 0, 0, 2.00 staff_space#)
-       draw_mensural_outermost_flag_i
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
-
-fet_beginchar("8th Mensural Flag (down)", "mensurald13", "mensd1eighthflag")
-       set_char_box(0.60 staff_space#, 0, 0, 1.50 staff_space#)
-       draw_mensural_outermost_flag_ii
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
-
-fet_beginchar("16th Mensural Flag (up)", "mensuralu04", "menssixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
-fet_endchar;
-
-fet_beginchar("16th Mensural Flag (up)", "mensuralu14", "mens1sixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
-fet_endchar;
-
-fet_beginchar("16th Mensural Flag (down)", "mensurald04", "mensdsixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
-
-fet_beginchar("16th Mensural Flag (down)", "mensurald14", "mensd1sixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
-
-fet_beginchar("32th Mensural Flag (up)", "mensuralu05", "mensthirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
-       draw_mensural_inner_flag(3.0)
-fet_endchar;
-
-fet_beginchar("32th Mensural Flag (up)", "mensuralu15", "mens1thirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
-fet_endchar;
-
-fet_beginchar("32th Mensural Flag (down)", "mensurald05", "mensdthirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
-       draw_mensural_inner_flag(3.0)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
-
-fet_beginchar("32th Mensural Flag (down)", "mensurald15", "mensd1thirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
-
-fet_beginchar("64th Mensural Flag (up)", "mensuralu06", "menssixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
-       draw_mensural_inner_flag(3.5)
-fet_endchar;
-
-fet_beginchar("64th Mensural Flag (up)", "mensuralu16", "mens1sixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.17)
-       draw_mensural_inner_flag(2.08)
-       draw_mensural_inner_flag(3.00)
-fet_endchar;
-
-fet_beginchar("64th Mensural Flag (down)", "mensurald06", "mensdsixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
-       draw_mensural_inner_flag(3.5)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
-
-fet_beginchar("64th Mensural Flag (down)", "mensurald16", "mensd1sixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.17)
-       draw_mensural_inner_flag(2.08)
-       draw_mensural_inner_flag(3.00)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
-fet_endchar;
 
 %%%%%%%%
 %
@@ -199,7 +27,7 @@ fet_endchar;
 %
 %
 
-def draw_mensural_outermost_flag_i =
+def draw_mensural_outermost_flare (expr staffline_adjustment) =
        define_pixels(stafflinethickness, staff_space)
 
        pickup pencircle
@@ -212,34 +40,25 @@ def draw_mensural_outermost_flag_i =
 
        za = (+0.00 staff_space, -0.00 staff_space);
        zb = (+0.15 staff_space, -0.00 staff_space);
-       zc = (+0.45 staff_space, -0.35 staff_space);
-       zd = (+0.45 staff_space, -0.85 staff_space);
-       ze = (+0.00 staff_space, -2.00 staff_space);
 
-       draw za .. zb -- zc{zc-zb} .. {ze-zd}zd -- ze;
-enddef;
-
-def draw_mensural_outermost_flag_ii =
-       define_pixels(stafflinethickness, staff_space)
-
-       pickup pencircle
-               xscaled 1.00 stafflinethickness
-               yscaled 0.22 staff_space
-               rotated -35;
-
-       save za, zb, zc, zd, ze;
-       pair za, zb, zc, zd, ze;
-
-       za = (+0.00 staff_space, -0.00 staff_space);
-       zb = (+0.15 staff_space, -0.00 staff_space);
-       zc = (+0.20 staff_space, -0.05 staff_space);
-       zd = (+0.20 staff_space, -1.15 staff_space);
-       ze = (+0.00 staff_space, -1.40 staff_space);
+       if staffline_adjustment = between_staff_lines:
+               zc = (+0.45 staff_space, -0.35 staff_space);
+               zd = (+0.45 staff_space, -0.85 staff_space);
+               ze = (+0.00 staff_space, -2.00 staff_space);
+       elseif staffline_adjustment = on_staff_line:
+               zc = (+0.20 staff_space, -0.05 staff_space);
+               zd = (+0.20 staff_space, -1.15 staff_space);
+               ze = (+0.00 staff_space, -1.40 staff_space);
+       else: % staffline_adjustment = anywhere
+               zc = (+0.33 staff_space, -0.20 staff_space);
+               zd = (+0.33 staff_space, -1.00 staff_space);
+               ze = (+0.00 staff_space, -1.70 staff_space);
+       fi;
 
        draw za .. zb -- zc{zc-zb} .. {ze-zd}zd -- ze;
 enddef;
 
-def draw_mensural_inner_flag(expr il_shift) =
+def draw_mensural_inner_flare(expr il_shift) =
        define_pixels(stafflinethickness, staff_space)
 
        pickup pencircle
@@ -259,116 +78,152 @@ def draw_mensural_inner_flag(expr il_shift) =
        draw za{2,1} .. zb .. zc .. {-2,-1}zd;
 enddef;
 
+def draw_mensural_flag (expr staffline_adjustment, flares, direction) =
+       save char_box_adjust, flare_shift;
+       if staffline_adjustment = between_staff_lines:
+               flare_shift = 0.5;
+       elseif staffline_adjustment = on_staff_line:
+               flare_shift = 0.0;
+       else: % staffline_adjustment = anywhere
+               flare_shift = 0.25;
+       fi;
+       char_box_adjust = flare_shift+0.5;
+       if direction = dir_up:
+               set_char_box(0, 0.60 staff_space#,
+                            (1.00+char_box_adjust)*staff_space#, 0)
+       else: % direction = dir_down
+               set_char_box(0.60 staff_space#, 0,
+                            (1.00+char_box_adjust)*staff_space#, 0)
+       fi;
+       draw_mensural_outermost_flare (staffline_adjustment)
+       for flare_count := 2 step 1 until 4:
+               if flares >= flare_count:
+                       draw_mensural_inner_flare(flare_shift+flare_count-0.5)
+               fi;
+       endfor;
+       if direction = dir_down:
+               currentpicture := currentpicture xscaled -1 yscaled -1;
+       fi;
+enddef;
+
+% 8th mensural flag, upwards, between staff lines
 fet_beginchar("8th Mensural Flag (up)", "mensuralu03", "menseighthflag")
-       set_char_box(0, 0.60 staff_space#, 2.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
+       draw_mensural_flag (between_staff_lines, 1, dir_up)
 fet_endchar;
 
+% 8th mensural flag, upwards, on staff line
 fet_beginchar("8th Mensural Flag (up)", "mensuralu13", "mens1eighthflag")
-       set_char_box(0, 0.60 staff_space#, 1.50 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
+       draw_mensural_flag (on_staff_line, 1, dir_up)
+fet_endchar;
+
+% 8th mensural flag, upwards, anywhere
+fet_beginchar("8th Mensural Flag (up)", "mensuralu23", "mens1eighthflag")
+       draw_mensural_flag (anywhere, 1, dir_up)
 fet_endchar;
 
+% 8th mensural flag, downwards, between staff lines
 fet_beginchar("8th Mensural Flag (down)", "mensurald03", "mensdeighthflag")
-       set_char_box(0.60 staff_space#, 0, 0, 2.00 staff_space#)
-       draw_mensural_outermost_flag_i
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (between_staff_lines, 1, dir_down)
 fet_endchar;
 
+% 8th mensural flag, downwards, on staff line
 fet_beginchar("8th Mensural Flag (down)", "mensurald13", "mensd1eighthflag")
-       set_char_box(0.60 staff_space#, 0, 0, 1.50 staff_space#)
-       draw_mensural_outermost_flag_ii
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (on_staff_line, 1, dir_down)
+fet_endchar;
+
+% 8th mensural flag, downwards, anywhere
+fet_beginchar("8th Mensural Flag (down)", "mensurald23", "mensd1eighthflag")
+       draw_mensural_flag (anywhere, 1, dir_down)
 fet_endchar;
 
+% 16th mensural flag, upwards, between staff lines
 fet_beginchar("16th Mensural Flag (up)", "mensuralu04", "menssixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
+       draw_mensural_flag (between_staff_lines, 2, dir_up)
 fet_endchar;
 
+% 16th mensural flag, upwards, on staff line
 fet_beginchar("16th Mensural Flag (up)", "mensuralu14", "mens1sixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
+       draw_mensural_flag (on_staff_line, 2, dir_up)
 fet_endchar;
 
+% 16th mensural flag, upwards, anywhere
+fet_beginchar("16th Mensural Flag (up)", "mensuralu24", "mens1sixteenthflag")
+       draw_mensural_flag (anywhere, 2, dir_up)
+fet_endchar;
+
+% 16th mensural flag, downwards, between staff lines
 fet_beginchar("16th Mensural Flag (down)", "mensurald04", "mensdsixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (between_staff_lines, 2, dir_down)
 fet_endchar;
 
+% 16th mensural flag, downwards, on staff line
 fet_beginchar("16th Mensural Flag (down)", "mensurald14", "mensd1sixteenthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (on_staff_line, 2, dir_down)
+fet_endchar;
+
+% 16th mensural flag, downwards, anywhere
+fet_beginchar("16th Mensural Flag (down)", "mensurald24", "mensd1sixteenthflag")
+       draw_mensural_flag (anywhere, 2, dir_down)
 fet_endchar;
 
+% 32th mensural flag, upwards, between staff lines
 fet_beginchar("32th Mensural Flag (up)", "mensuralu05", "mensthirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
-       draw_mensural_inner_flag(3.0)
+       draw_mensural_flag (between_staff_lines, 3, dir_up)
 fet_endchar;
 
+% 32th mensural flag, upwards, on staff line
 fet_beginchar("32th Mensural Flag (up)", "mensuralu15", "mens1thirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
+       draw_mensural_flag (on_staff_line, 3, dir_up)
 fet_endchar;
 
+% 32th mensural flag, upwards, anywhere
+fet_beginchar("32th Mensural Flag (up)", "mensuralu25", "mens1thirtysecondflag")
+       draw_mensural_flag (anywhere, 3, dir_up)
+fet_endchar;
+
+% 32th mensural flag, downwards, between staff lines
 fet_beginchar("32th Mensural Flag (down)", "mensurald05", "mensdthirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(2.0)
-       draw_mensural_inner_flag(3.0)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (between_staff_lines, 3, dir_down)
 fet_endchar;
 
+% 32th mensural flag, downwards, on staff line
 fet_beginchar("32th Mensural Flag (down)", "mensurald15", "mensd1thirtysecondflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (on_staff_line, 3, dir_down)
+fet_endchar;
+
+% 32th mensural flag, downwards, anywhere
+fet_beginchar("32th Mensural Flag (down)", "mensurald25", "mensd1thirtysecondflag")
+       draw_mensural_flag (anywhere, 3, dir_down)
 fet_endchar;
 
+% 64th mensural flag, upwards, between staff lines
 fet_beginchar("64th Mensural Flag (up)", "mensuralu06", "menssixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
-       draw_mensural_inner_flag(3.5)
+       draw_mensural_flag (between_staff_lines, 4, dir_up)
 fet_endchar;
 
+% 64th mensural flag, upwards, on staff line
 fet_beginchar("64th Mensural Flag (up)", "mensuralu16", "mens1sixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.17)
-       draw_mensural_inner_flag(2.08)
-       draw_mensural_inner_flag(3.00)
+       draw_mensural_flag (on_staff_line, 4, dir_up)
 fet_endchar;
 
+% 64th mensural flag, upwards, anywhere
+fet_beginchar("64th Mensural Flag (up)", "mensuralu26", "mens1sixtyfourthflag")
+       draw_mensural_flag (anywhere, 4, dir_up)
+fet_endchar;
+
+% 64th mensural flag, downwards, between staff lines
 fet_beginchar("64th Mensural Flag (down)", "mensurald06", "mensdsixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_i
-       draw_mensural_inner_flag(1.5)
-       draw_mensural_inner_flag(2.5)
-       draw_mensural_inner_flag(3.5)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (between_staff_lines, 4, dir_down)
 fet_endchar;
 
+% 64th mensural flag, downwards, on staff line
 fet_beginchar("64th Mensural Flag (down)", "mensurald16", "mensd1sixtyfourthflag")
-       set_char_box(0, 0.60 staff_space#, 3.00 staff_space#, 0)
-       draw_mensural_outermost_flag_ii
-       draw_mensural_inner_flag(1.17)
-       draw_mensural_inner_flag(2.08)
-       draw_mensural_inner_flag(3.00)
-       currentpicture := currentpicture xscaled -1 yscaled -1;
+       draw_mensural_flag (on_staff_line, 4, dir_down)
+fet_endchar;
+
+% 64th mensural flag, downwards, anywhere
+fet_beginchar("64th Mensural Flag (down)", "mensurald26", "mensd1sixtyfourthflag")
+       draw_mensural_flag (anywhere, 4, dir_down)
 fet_endchar;
 
 fet_endgroup ("flags")
index 370d0dcf4b65ce0dc160cf5c7e6debbb0d4a3e7a..688de02bf1e1f22844843376529f2a0a4f5dd3b3 100644 (file)
@@ -11,7 +11,7 @@ numeric black_notehead_width;
 
 fet_begingroup ("noteheads")
 
-noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
+noteheight#:=staff_space# + (1 + overdone_heads)*stafflinethickness#;
 define_pixels(noteheight);
 
 
@@ -206,6 +206,7 @@ fet_endchar;
 %
 % ledger (leger) lines
 %
+%
 fet_beginchar("Ledger ending", "ledgerending", "ledgerending")
 set_char_box (5/2 ledgerlinethickness#, 5/2 ledgerlinethickness#,
                ledgerlinethickness#/2,ledgerlinethickness#/2);
@@ -432,22 +433,22 @@ punctum_char("Ed. Vat. punctum", "0vaticana_punctum", "vatpunctumhead",
             false, false, false, false, 1.0);
 
 % punctum cavum (for OpusTeX compatibility)
-%punctum_char("Ed. Vat. punctum cavum", "0vaticana_punctum_cavum",
-%           "vatpunctumcavumhead",
-%           false, false, false, true, false,
-%           false, false, false, false, 1.0);
+punctum_char("Ed. Vat. punctum cavum", "0vaticana_punctum_cavum",
+            "vatpunctumcavumhead",
+            false, false, false, true, false,
+            false, false, false, false, 1.0);
 
 % linea punctum (for OpusTeX compatibility)
-%punctum_char("Ed. Vat. linea punctum", "0vaticana_linea_punctum",
-%           "vatlineapunctumhead",
-%           false, false, true, false, false,
-%           false, false, false, false, 1.0);
+punctum_char("Ed. Vat. linea punctum", "0vaticana_linea_punctum",
+            "vatlineapunctumhead",
+            false, false, true, false, false,
+            false, false, false, false, 1.0);
 
 % linea punctum cavum (for OpusTeX compatibility)
-%punctum_char("Ed. Vat. linea punctum cavum", "0vaticana_linea_punctum_cavum",
-%           "vatlineapunctumcavumhead",
-%           false, false, true, true, false,
-%           false, false, false, false, 1.0);
+punctum_char("Ed. Vat. linea punctum cavum", "0vaticana_linea_punctum_cavum",
+            "vatlineapunctumcavumhead",
+            false, false, true, true, false,
+            false, false, false, false, 1.0);
 
 % punctum inclinatum
 inclinatum_char("Ed. Vat. inclinatum", "0vaticana_inclinatum",
@@ -530,36 +531,36 @@ fet_beginchar("Ed. Vat. quilisma", "0vaticana_quilisma", "vatquilismahead")
 fet_endchar;
 
 % solesmes punctum inclinatum parvum
-%inclinatum_char("Solesmes punctum inclinatum parvum", "0solesmes_incl_parvum",
-%              "solinclparvumhead",
-%              true, false, false);
+inclinatum_char("Solesmes punctum inclinatum parvum", "0solesmes_incl_parvum",
+               "solinclparvumhead",
+               true, false, false);
 
 % solesmes punctum auctum ascendens
-%punctum_char("Solesmes punctum auctum ascendens", "0solesmes_auct_asc",
-%           "solauctaschead",
-%           false, false, false, false, false,
-%           true, true, false, false, 1.0);
+punctum_char("Solesmes punctum auctum ascendens", "0solesmes_auct_asc",
+            "solauctaschead",
+            false, false, false, false, false,
+            true, true, false, false, 1.0);
 
 % solesmes punctum auctum descendens
-%punctum_char("Solesmes punctum auctum descendens", "0solesmes_auct_desc",
-%           "solauctdeschead",
-%           false, false, false, false, false,
-%           true, false, false, false, 1.0);
+punctum_char("Solesmes punctum auctum descendens", "0solesmes_auct_desc",
+            "solauctdeschead",
+            false, false, false, false, false,
+            true, false, false, false, 1.0);
 
 % solesmes punctum inclinatum auctum
-%inclinatum_char("Solesmes punctum incl. auctum", "0solesmes_incl_auctum",
-%              "solpunctuminclinatumauctumhead",
-%              false, false, true);
+inclinatum_char("Solesmes punctum incl. auctum", "0solesmes_incl_auctum",
+               "solpunctuminclinatumauctumhead",
+               false, false, true);
 
 % solesmes stropha
-%inclinatum_char("Solesmes stropha", "0solesmes_stropha",
-%              "solstrophahead",
-%              false, true, false);
+inclinatum_char("Solesmes stropha", "0solesmes_stropha",
+               "solstrophahead",
+               false, true, false);
 
 % solesmes stropha aucta
-%inclinatum_char("Solesmes stropha aucta", "0solesmes_stropha_aucta",
-%              "solstrophaauctahead",
-%              false, true, true);
+inclinatum_char("Solesmes stropha aucta", "0solesmes_stropha_aucta",
+               "solstrophaauctahead",
+               false, true, true);
 
 % solesmes oriscus
 fet_beginchar("Solesmes oriscus", "0solesmes_oriscus",
index 852def1a078da501ec93fb73a7d5bb572edeb6c6..e2a807e76b08c884d8219327ec4de3e6bdf587b1 100644 (file)
@@ -45,6 +45,7 @@
    (,boolean? . "boolean")
    (,moment? . "moment")
    (,ly-input-location? . "input location")
+   (,music-list? . "list of music")
    (,music? . "music")
    (,number? . "number")
    (,char? . "char")
   (cons (f (car x)) (f (cdr x))))
 
 ;; used where?
-;;(define (reduce operator list)
-;;      (if (null? (cdr list)) (car list)
-;;       (operator (car list) (reduce operator (cdr list)))))
+(define (reduce operator list)
+  "reduce OP [A, B, C, D, ... ] =
+   A op (B op (C ... ))
+"
+      (if (null? (cdr list)) (car list)
+         (operator (car list) (reduce operator (cdr list)))))
 
 
 
index 683f0d29b49d281a8831f9459876752806011b47..45d8e6be195fb789e7d63b82419f88422ba929ba 100644 (file)
@@ -3,13 +3,7 @@
 
 ;;;; changed eval to primitive-eval for guile 1.4/1.4.1 compatibility --jcn
 
-(define (seq-music-list elts)
-   (let* ( (ml (ly-make-music "Sequential_music")) )
-   (ly-set-mus-property ml 'elements elts)
-   ml 
-))
-
-(define (make-art-script x) 
+(define (make-articulation-script x) 
      (let* (  (m (ly-make-music "Articulation_req"))
            )
      (ly-set-mus-property m 'articulation-type x)
  )
 
 ;; adds the articulation script x to m if x is not #f.
-(define (add-art-script m x)
+(define (add-articulation-script m x)
   (if x
    (if (and x (equal? (ly-music-name m) "Request_chord"))
      (ly-set-mus-property m 'elements
-       (cons (make-art-script x) (ly-get-mus-property m 'elements))
+       (cons (make-articulation-script x) (ly-get-mus-property m 'elements))
      )
      (let* ( (es (ly-get-mus-property m 'elements))
             (e (ly-get-mus-property m 'element)) )
-       (map (lambda (y) (add-art-script y x)) es)
+       (map (lambda (y) (add-articulation-script y x)) es)
        (if (music? e)
-         (add-art-script e x))
+         (add-articulation-script e x))
      )
    )
   )
@@ -80,9 +74,9 @@
              (script (cadr pap))
              (pitch (caddr pap))
              (ht (make-head-type style))
-             (seq (seq-music-list (list ht req-ch)))
+             (seq (make-sequential-music (list ht req-ch)))
              )
-         (add-art-script req-ch script)
+         (add-articulation-script req-ch script)
          (ly-set-mus-property fe 'pitch pitch)
          (set! req-ch (make-thread-context style seq))
         req-ch
index 7076f11149aa73bd86f9f87526056ac3e36f502f..0ce17a070685e768e591e16820cfe6f5ea5ed182 100644 (file)
@@ -31,6 +31,7 @@
                (left-padding . 0.2)
                (right-padding . 0.4)
                (paren-cautionaries . #t)
+               (font-family . music)
                (meta . ,(grob-description accidentals-interface font-interface side-position-interface))
        ))
 
        ))
 
        (Custos . (
-               (break-align-symbol . Custos)
-               (breakable . #t )
-               (molecule-callback . ,Custos::brew_molecule)
-               (visibility-lambda . ,end-of-line-visible)
-              (style .  vaticana)
-              (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-              (font-family . music)
-               (meta . ,(grob-description custos-interface staff-symbol-referencer-interface break-aligned-interface) )
+               (break-align-symbol . Custos)
+               (breakable . #t)
+               (molecule-callback . ,Custos::brew_molecule)
+               (visibility-lambda . ,end-of-line-visible)
+               (style . vaticana)
+               (neutral-position . 0)
+               (neutral-direction . -1)
+               (adjust-if-on-staffline . #t)
+               (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
+               (font-family . music)
+               (meta . ,(grob-description custos-interface staff-symbol-referencer-interface break-aligned-interface) )
        ))
        
 
                (X-offset-callbacks . (,Stem::off_callback))
                (X-extent-callback . ,Stem::dim_callback)       
                (Y-extent-callback . ,Stem::height)
+               (adjust-if-on-staffline . #t)
                (font-family . music)      
                (meta . ,(grob-description stem-interface  font-interface))
        ))
index 173eccbbf38b852756c8f267d18519992df1f1c4..4231dfe19d078387c2fae5f0674a523b268cdb4d 100644 (file)
@@ -33,6 +33,7 @@
 . OPTION-LIST) entries. OPTION-LIST can contain 'cautionary, 'natural
 and 'tie-break-reminder ")
 (grob-property-description 'add-stem boolean? "Add stem to porrectus?.")
+(grob-property-description 'adjust-if-on-staffline boolean? "If this grob is on a staff line, adjust its appearance, so that it better fits into the staff.  E.g., if set true on stem grobs, flares of mensural flags will always be aligned with the staff lines, regardless if the associated note head is printed on a staff line or inbetween.")
 (grob-property-description 'after-line-breaking-callback procedure? "Procedure taking a grob as argument.
 This procedure is called (using dependency resolution) after line breaking. Return value is ignored.")
 (grob-property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical.")
@@ -105,12 +106,9 @@ Align_interface::center_on_element). .")
 (grob-property-description 'dash-period number? "the length of one dash + white space.")
 (grob-property-description 'dashed number? "[FIXME: use dash-period/dash length; see text-spanner] number representing the length of the dashes.")
 (grob-property-description 'de-uglify-parameters list? "list of 3 real constants. They define the valid areas for the middle control points. Used in de_uglyfy. They are a bit empirical.")
-(grob-property-description 'neutral-direction dir? "Where to go if
-we're in the middle of the staff.  [Ross] has the following to say
-about this: Some engravers consider the middle line neutral, and take
-the option of using either up- or down-stems for notes that fall on
-it. However, more up-to-date engraving no longer permits an option;
-now a down-stem is always appropriate.")
+
+(grob-property-description 'neutral-direction dir? "Where to go if we're on the neutral position of the staff (by default, the middle of the staff; see also grob-property neutral-position).  [Ross] has the following to say about this: Some engravers consider the middle line neutral, and take the option of using either up- or down-stems for notes that fall on it. However, more up-to-date engraving no longer permits an option; now a down-stem is always appropriate.")
+(grob-property-description 'neutral-position number? "Position (in half staff spaces) where to flip the direction of stems: by default, custodes above this position get their stems downwards; custodes below this position get their stems upwards.  A value of 0 designates the center of the staff.  Use property neutral-direction to control the behaviour of stems on the neutral position itself.  (Note: currently, neutral-position is supported only for custodes; for stems of note heads, neutral-position is currently fixed to 0, i.e. the middle of the staff.)")
 
 (grob-property-description 'delta-y number? "amount of ascension.")
 (grob-property-description 'dependencies list? "list of score-grob pointers that indicate who to compute first for certain global passes.")
@@ -241,6 +239,7 @@ FIXME: also pair? (cons LEFT RIGHT)
 
 (grob-property-description 'minimum-width number? "minimum-width of rest symbol, in staffspace.")
 (grob-property-description 'molecule-callback procedure? "Function taking grob as argument, returning a Scheme encoded Molecule.")
+
 (grob-property-description 'new-accidentals list? "list of (pitch, accidental) pairs.")
 (grob-property-description 'no-spacing-rods boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
 (grob-property-description 'no-stem-extend boolean? "should stem not be extended to middle staff line?.")
index 6d2257b7e6c837362b14d0a171d3da7c00e6ceee..9c254e5a8d69d6da5a1670397d5e6eb61ba6c483 100644 (file)
@@ -67,3 +67,165 @@ Fingering_engraver."
          (pitchify-scripts e)))
 
     music))
+
+
+;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;
+
+
+(define (make-grob-property-set grobs gprop val)
+  "Make a M-exp that sets GPROP to VAL in GROBS. Does a pop first, i.e.
+this is not an override 
+"
+  
+   (let* ((m (ly-make-music  "Music")))
+     (ly-set-mus-property m 'iterator-ctor Push_property_iterator::constructor)
+     (ly-set-mus-property m 'symbols grobs)
+     (ly-set-mus-property m 'grob-property gprop)
+     (ly-set-mus-property m 'grob-value val)
+     (ly-set-mus-property m 'pop-first #t)
+               
+     m
+   
+   ))
+   
+(define (make-grob-property-revert grobs gprop)
+   (let* ((m (ly-make-music  "Music")))
+     (ly-set-mus-property m 'iterator-ctor Pop_property_iterator::constructor)
+     (ly-set-mus-property m 'symbols grobs)
+     (ly-set-mus-property m 'grob-property gprop)
+               
+     m
+   
+   ))
+   
+(define (make-voice-props-set n)
+  (make-sequential-music
+   (list
+      (make-grob-property-set '(Tie Slur Stem Dots) 'direction
+                        (if (odd? n) -1 1))
+      (make-grob-property-set '(NoteColumn) 'horizontal-shift (quotient n 2))
+   )
+  ))
+
+(define (make-voice-props-revert)
+  (make-sequential-music
+   (list
+      (make-grob-property-revert '(Tie Slur Stem Dots) 'direction)
+      (make-grob-property-revert '(NoteColumn) 'horizontal-shift)
+   ))
+  )
+
+(define (context-spec-music m context . rest)
+  "Add \context CONTEXT = foo to M. "
+  
+  (let* ((cm (ly-make-music "Context_specced_music")))
+    (ly-set-mus-property cm 'element m)
+    (ly-set-mus-property cm 'context-type context)
+    (if (and  (pair? rest) (string? (car rest)))
+       (ly-set-mus-property cm 'context-id (car rest))
+    )
+    cm
+  ))
+
+(define (make-sequential-music elts)
+  (let*  ((m (ly-make-music "Sequential_music")))
+    (ly-set-mus-property m 'elements elts)
+    m
+  ))
+(define (make-simultaneous-music elts)
+  (let*  ((m (ly-make-music "Simultaneous_music")))
+    (ly-set-mus-property m 'elements elts)
+    m
+    ))
+(define (music-separator? m)
+  "Is M a separator."
+  (let* ((n (ly-get-mus-property m 'name )))
+    (and (symbol? n) (equal? 'separator n))
+  ))
+
+(define (split-one sep?  l acc)
+  "Split off the first parts before separator and return both parts.
+
+"
+  (if (null? l)
+      (cons acc '())
+      (if (sep? (car l))
+         (cons acc (cdr l))
+         (split-one sep? (cdr l) (cons (car l) acc))
+         )
+      ))
+
+(define (split-list l sep?)
+  (if (null? l)
+      '()
+      (let* ((c (split-one sep? l '())))
+       (cons (reverse! (car c) '()) (split-list (cdr c) sep?))
+       )
+      )
+  )
+
+;; test code
+; (display (split-list '(a b c / d e f / g) (lambda (x) (equal? x '/))) )
+
+
+;;; splitting chords into voices.
+
+(define (voicify-list lst number)
+   "Make a list of Musics.
+
+   voicify-list :: [ [Music ] ] -> number -> [Music]
+   LST is a list music-lists.
+"
+
+   (if (null? lst) '()
+       (cons (context-spec-music
+             (make-sequential-music
+              (list
+               (make-voice-props-set number)
+               (make-simultaneous-music (car lst))))
+
+             "Voice"  (number->string number))
+             (voicify-list (cdr lst) (+ number 1))
+       ))
+   )
+
+(define (voicify-chord ch)
+  "Split the parts of a chord into different Voices using separator"
+   (let* ((es (ly-get-mus-property ch 'elements)))
+
+
+     (ly-set-mus-property  ch 'elements
+       (voicify-list (split-list es music-separator?) 0))
+     ch
+   ))
+
+(define (voicify-music m)
+   "Recursively split chords that are separated with \\ "
+   
+   (if (not (music? m))
+       (begin (display m)
+       (error "not music!"))
+       )
+   (let*
+       ((es (ly-get-mus-property m 'elements))
+       (e (ly-get-mus-property m 'element))
+       )
+       
+     (if
+      (and (equal? (ly-music-name m) "Simultaneous_music")
+          (reduce (lambda (x y ) (or x y))     (map music-separator? es)))
+      (voicify-chord m)
+      (begin
+       (if (pair? es)
+           (ly-set-mus-property m 'elements (map voicify-music es)))
+       (if (music? e)
+           (ly-set-mus-property m 'element  (voicify-music e)))
+           
+       m)
+      
+      )
+     ))
+
+;;;
index 8914c5c3dbabe105b19e5e552bbff66aba575f54..d0d76a9445f1a8bd76ff9b19f6038547dc17eea9 100644 (file)
@@ -36,7 +36,7 @@
 (music-property-description 'direction dir? "Print this up or down?")
 (music-property-description 'text-type symbol? "Particular type of text script (eg. finger, dynamic).")
 (music-property-description 'element music? "The single child of a Music_wrapper music object, or the body of a repeat.")
-(music-property-description 'elements list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
+(music-property-description 'elements music-list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
 (music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note")
 (music-property-description 'grob-property symbol? "The symbol of the grob property to set. ")
 (music-property-description 'grob-value scheme? "The value of the grob property to set")
@@ -49,6 +49,8 @@
 (music-property-description 'penalty number? "Penalty for break hint.")
 (music-property-description 'pitch pitch? "the pitch of this note")
 (music-property-description 'pitch-alist list? "list of pitches jointly forming the scale of a key signature")
+(music-property-description 'pop-first boolean? "Do a revert before we try to do a override on some grob property.")
+
 (music-property-description 'predicate procedure? "the predicate of a \outputproperty")
 (music-property-description 'type symbol? "The type of this music object. Determines iteration in some cases.")
 (music-property-description 'repeat-count  integer? "do a @code{\repeat} how ofen?")
index 77ee7d379edf37af463332bb720c0523774a3c58..7f2aca9c3aa09f225a88dd4382c45a975fbcec53 100644 (file)
@@ -92,7 +92,7 @@
    " { /"
    (car name-mag)
    " findfont "
-   "12 " (ly-number->string (cdr name-mag)) " mul "
+   "20 " (ly-number->string (cdr name-mag)) " mul "
    "lilypondpaperoutputscale div scalefont setfont } bind def "
    "\n"))
 
index 3c750c7bfe8e64612530fb57a809782360fc3510..a8faef95953a734338377b6cff894cba176d5b44 100644 (file)
@@ -1,8 +1,9 @@
 
 # Don't remove $(outdir)/.log's.  Logs are a target!
 
+# we want to see botched results as well.
 $(outdir)/%.dvi: %.mf
-       $(METAFONT) "\nonstopmode; input $<;"
+       -$(METAFONT) "\nonstopmode; input $<;"
        gftodvi  $(basename $<)
        mv $(basename $<).dvi $(outdir)
        rm $(basename $<).*gf