]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scripts/abc2ly.py (dump_slyrics): add ord().
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Nov 2004 00:16:17 +0000 (00:16 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Nov 2004 00:16:17 +0000 (00:16 +0000)
* lily/note-heads-engraver.cc (process_music): add shapeNoteStyles
to regular engraver.

ChangeLog
Documentation/topdocs/NEWS.texi
Documentation/user/notation.itely
THANKS
input/regression/note-head-solfa.ly
lily/note-heads-engraver.cc
lily/shape-note-heads-engraver.cc [deleted file]
ly/property-init.ly
mf/feta-bolletjes.mf
mf/parmesan-heads.mf
scripts/abc2ly.py

index 2e431341a80a49c5656c4467e6315ad0ab904f23..c8c0aad7c23ab3a9d7dcf88dd99bc114ef647200 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-11-23  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scripts/abc2ly.py (dump_slyrics): add ord(). 
+
+       * lily/note-heads-engraver.cc (process_music): add shapeNoteStyles
+       to regular engraver. 
+
+2004-11-22  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * mf/feta-bolletjes.mf (triangle): rewrite solfa heads.
+
 2004-11-22  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/define-markup-commands.scm (fill-line): Typo.
index bfa0fe9038a448f05c4ae4b8ea8fb1342c36e57b..b7219377bbf09fc052042e12591ffa735ca266e6 100644 (file)
@@ -7,6 +7,9 @@
 @unnumbered New features in 2.5 since 2.4
 
 @itemize @bullet
+@item
+Shaped note heads. This feature has been sponsored by Jonathan Walther.
+
 @item
 Layout for titles, page header and footer can now be entered as
 @code{\markup} commands.
index 02aada2296543a3a2d15c305c8cdb3ab1fda9430..aed049fc106b8c5e98b4b42e8e1c857347d696ac 100644 (file)
@@ -13,24 +13,24 @@ by LilyPond.  It is intended as a reference for users who are already
 somewhat familiar with LilyPond.
 
 @menu
-* Note entry::
-* Easier music entry::
-* Staff notation::
-* Polyphony::
-* Beaming::
-* Accidentals::
-* Expressive marks::
-* Repeats::
-* Rhythmic music::
-* Piano music::
-* Vocal music::
-* Other instrument specific notation::
-* Tablatures::
-* Popular music::
-* Orchestral music::
-* Ancient notation::
-* Contemporary notation::
-* Educational use::
+* Note entry::                  
+* Easier music entry::          
+* Staff notation::              
+* Polyphony::                   
+* Beaming::                     
+* Accidentals::                 
+* Expressive marks::            
+* Repeats::                     
+* Rhythmic music::              
+* Piano music::                 
+* Vocal music::                 
+* Other instrument specific notation::  
+* Tablatures::                  
+* Popular music::               
+* Orchestral music::            
+* Ancient notation::            
+* Contemporary notation::       
+* Educational use::             
 @end menu
 
 @c FIXME: Note entry vs Music entry at top level menu is confusing.
@@ -43,19 +43,19 @@ This section is about basic notation elements like notes, rests, and
 related constructs, such as stems, tuplets and ties.
 
 @menu
-* Notes::
-* Pitches::
-* Chromatic alterations::
-* Micro tones::
-* Chords::
-* Rests::
-* Skips::
-* Durations::
-* Augmentation dots::
-* Scaling durations::
-* Stems::
-* Ties::
-* Tuplets::
+* Notes::                       
+* Pitches::                     
+* Chromatic alterations::       
+* Micro tones::                 
+* Chords::                      
+* Rests::                       
+* Skips::                       
+* Durations::                   
+* Augmentation dots::           
+* Scaling durations::           
+* Stems::                       
+* Ties::                        
+* Tuplets::                     
 @end menu
 
 
@@ -581,11 +581,11 @@ website for more information.
 
 
 @menu
-* Relative octaves::
-* Octave check::
-* Bar check::
-* Skipping corrected music::
-* Automatic note splitting::
+* Relative octaves::            
+* Octave check::                
+* Bar check::                   
+* Skipping corrected music::    
+* Automatic note splitting::    
 @end menu
 
 
@@ -839,16 +839,16 @@ such as key signatures, clefs and time signatures.
 @cindex Staff notation
 
 @menu
-* Staff symbol::
-* Key signature::
-* Clef::
-* Ottava brackets::
-* Time signature::
-* Partial measures::
-* Unmetered music::
-* Bar lines::
-* Time administration::
-* Controlling formatting of prefatory matter::
+* Staff symbol::                
+* Key signature::               
+* Clef::                        
+* Ottava brackets::             
+* Time signature::              
+* Partial measures::            
+* Unmetered music::             
+* Bar lines::                   
+* Time administration::         
+* Controlling formatting of prefatory matter::  
 @end menu
 
 @node Staff symbol
@@ -1394,7 +1394,7 @@ a piece of music.  Polyphony in LilyPond refers to having more than
 one voice on the same staff.
 
 @menu
-* Writing polyphonic music::
+* Writing polyphonic music::    
 @end menu
 
 @node Writing polyphonic music
@@ -1556,10 +1556,10 @@ grouped.
 
 @cindex Automatic beams
 @menu
-* Automatic beams::
-* Manual beams::
-* Setting automatic beam behavior::
-* Beam formatting::
+* Automatic beams::             
+* Manual beams::                
+* Setting automatic beam behavior::  
+* Beam formatting::             
 @end menu
 
 @node Automatic beams
@@ -1809,7 +1809,7 @@ This section describes how to change the way that accidentals are
 inserted automatically before notes.
 
 @menu
-* Automatic accidentals::
+* Automatic accidentals::       
 @end menu
 
 @node Automatic accidentals
@@ -1965,19 +1965,19 @@ Expressive marks help musicians to bring more to the music than simple
 notes and rhythms.
 
 @menu
-* Slurs::
-* Phrasing slurs::
-* Breath marks::
-* Metronome marks::
-* Text scripts::
-* Text spanners::
-* Analysis brackets::
-* Articulations::
-* Running trills::
-* Fingering instructions::
-* Grace notes::
-* Glissando::
-* Dynamics::
+* Slurs::                       
+* Phrasing slurs::              
+* Breath marks::                
+* Metronome marks::             
+* Text scripts::                
+* Text spanners::               
+* Analysis brackets::           
+* Articulations::               
+* Running trills::              
+* Fingering instructions::      
+* Grace notes::                 
+* Glissando::                   
+* Dynamics::                    
 @end menu
 
 @node Slurs
@@ -2730,13 +2730,13 @@ Repetition is a central concept in music, and multiple notations exist
 for repetitions.
 
 @menu
-* Repeat types::
-* Repeat syntax::
-* Repeats and MIDI::
-* Manual repeat commands::
-* Tremolo repeats::
-* Tremolo subdivisions::
-* Measure repeats::
+* Repeat types::                
+* Repeat syntax::               
+* Repeats and MIDI::            
+* Manual repeat commands::      
+* Tremolo repeats::             
+* Tremolo subdivisions::        
+* Measure repeats::             
 @end menu
 
 @node Repeat types
@@ -3053,9 +3053,9 @@ Rhythmic music is primarily used for percussion and drum notation, but it can
 also be used to show the rhythms of melodies.
 
 @menu
-* Showing melody rhythms::
-* Entering percussion::
-* Percussion staves::
+* Showing melody rhythms::      
+* Entering percussion::         
+* Percussion staves::           
 @end menu
 
 
@@ -3334,12 +3334,12 @@ handle this cross-staffing behavior.  In this section we discuss the
 
 
 @menu
-* Automatic staff changes::
-* Manual staff switches::
-* Pedals::
-* Arpeggio::
-* Staff switch lines::
-* Cross staff stems::
+* Automatic staff changes::     
+* Manual staff switches::       
+* Pedals::                      
+* Arpeggio::                    
+* Staff switch lines::          
+* Cross staff stems::           
 @end menu
 
 @refbugs
@@ -3684,13 +3684,13 @@ for complex vocal music.
 
 
 @menu
-* Setting simple songs::
-* Entering lyrics::
-* Hyphens and extenders::
-* The Lyrics context::
-* Flexibility in alignment::
-* More stanzas::
-* Ambitus::
+* Setting simple songs::        
+* Entering lyrics::             
+* Hyphens and extenders::       
+* The Lyrics context::          
+* Flexibility in alignment::    
+* More stanzas::                
+* Ambitus::                     
 @end menu
 
 @node Setting simple songs
@@ -4297,7 +4297,7 @@ This section includes extra information for writing string music, and may
 include extra information for other instruments in the future.
 
 @menu
-* Harmonic notes::
+* Harmonic notes::              
 @end menu
 
 @node Harmonic notes, , Other instrument specific notation, Other instrument specific notation
@@ -4326,8 +4326,8 @@ indicating on which string and fret a note must be played.  LilyPond
 offers limited support for tablature.
 
 @menu
-* Tablatures basic::
-* Non-guitar tablatures::
+* Tablatures basic::            
+* Non-guitar tablatures::       
 @end menu
 
 @node Tablatures basic, Non-guitar tablatures, Tablatures, Tablatures
@@ -4425,11 +4425,11 @@ Program reference: @internalsref{Tab_note_heads_engraver}.
 This section discusses issues that arise when writing popular music.
 
 @menu
-* Chord names::
-* Chords mode::
-* Printing chord names::
-* Fret diagrams::
-* Improvisation::
+* Chord names::                 
+* Chords mode::                 
+* Printing chord names::        
+* Fret diagrams::               
+* Improvisation::               
 @end menu
 
 @node Chord names, Chords mode, Popular music, Popular music
@@ -4867,19 +4867,19 @@ some common problems in orchestral music.
 
 
 @menu
-* System start delimiters::
-* Aligning to cadenzas::
-* Rehearsal marks::
-* Bar numbers::
-* Instrument names::
-* Transpose::
-* Instrument transpositions::
-* Multi measure rests::
-* Automatic part combining::
-* Hiding staves::
-* Different editions from one source::
-* Quoting other voices::
-* Formatting cue notes::
+* System start delimiters::     
+* Aligning to cadenzas::        
+* Rehearsal marks::             
+* Bar numbers::                 
+* Instrument names::            
+* Transpose::                   
+* Instrument transpositions::   
+* Multi measure rests::         
+* Automatic part combining::    
+* Hiding staves::               
+* Different editions from one source::  
+* Quoting other voices::        
+* Formatting cue notes::        
 @end menu
 
 @node System start delimiters
@@ -5849,19 +5849,19 @@ up during the baroque period.
 Here are all suptopics at a glance:
 
 @menu
-* Ancient note heads::
-* Ancient accidentals::
-* Ancient rests::
-* Ancient clefs::
-* Ancient flags::
-* Ancient time signatures::
-* Ancient articulations::
-* Custodes::
-* Divisiones::
-* Ligatures::
-* Gregorian Chant contexts::
-* Mensural contexts::
-* Figured bass::
+* Ancient note heads::          
+* Ancient accidentals::         
+* Ancient rests::               
+* Ancient clefs::               
+* Ancient flags::               
+* Ancient time signatures::     
+* Ancient articulations::       
+* Custodes::                    
+* Divisiones::                  
+* Ligatures::                   
+* Gregorian Chant contexts::    
+* Mensural contexts::           
+* Figured bass::                
 @end menu
 
 
@@ -6559,8 +6559,8 @@ Augmentum dots within ligatures are not handled correctly.
 
 
 @menu
-* White mensural ligatures::
-* Gregorian square neumes ligatures::
+* White mensural ligatures::    
+* Gregorian square neumes ligatures::  
 @end menu
 
 @node White mensural ligatures
@@ -7716,10 +7716,10 @@ LilyPond is limited.
 
 
 @menu
-* Polymetric notation::
-* Clusters::
-* Special fermatas::
-* Feathered beams::
+* Polymetric notation::         
+* Clusters::                    
+* Special fermatas::            
+* Feathered beams::             
 @end menu
 
 @node Polymetric notation
@@ -7963,10 +7963,11 @@ With the amount of control that LilyPond offers, one can make great
 teaching tools in addition to great musical scores.
 
 @menu
-* Balloon help::
-* Blank music sheet::
-* Hidden notes::
-* Easy Notation note heads::
+* Balloon help::                
+* Blank music sheet::           
+* Hidden notes::                
+* Shaped note heads ::          
+* Easy Notation note heads::    
 @end menu
 
 @node Balloon help
@@ -8063,6 +8064,43 @@ as possible.
 @end lilypond
 
 
+@node Shaped note heads 
+@subsection Shaped note heads 
+
+In shaped note head notation, the shape of the note head corresponds
+to the harmonic function of a note in the scale. This notation was
+popular in the 19th century American song books.
+
+Shaped note heads can be produced by setting @code{\aikenHeads} or
+@code{\sacredHarpHeads}, depending on the style desired.
+
+@lilypond[verbatim,relative=1,fragment]
+  \aikenHeads
+  c8 d4 e8 a2 g1
+  \sacredHarpHeads
+  c8 d4. e8 a2 g1
+@end lilypond
+
+Shapes are determined on the step in the scale, where the base of the
+scale is determined by  the @code{\key} command
+
+@findex \key
+@findex shapeNoteStyles
+@findex \aikenHeads
+@findex \sacredHarpHeads
+
+Shaped note heads are implemented through the @code{shapeNoteStyles}
+property. Its value is a vector of symbols. The k-th element indicates
+the style to use for the k-th step of the scale. Arbitrary
+combinations  are possible, eg.,
+
+
+@lilypond[verbatim,relative=1,fragment]
+  \set shapeNoteStyles  = ##(cross triangle fa #f mensural xcircle diamond)
+  c8 d4. e8 a2 g1
+@end lilypond
+
+
 @node Easy Notation note heads
 @subsection Easy Notation note heads
 
diff --git a/THANKS b/THANKS
index 395ee1be86014538f3515825063a3a96b4733289..54320d25a057644f5855f75952233255f0b2266b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -16,6 +16,11 @@ Heikki Junes
 Werner Lemberg
 Andreas Scherer
 
+
+SPONSORS
+
+Jonathan Walther
+
 BUG HUNTERS/SUGGESTIONS
 
 Andreas Scherer
index 1e5b776c39d38b68eee3164c10f3198010fae007..637c463c294c837f3097d928b66fa0cb5f787a80 100644 (file)
@@ -1,28 +1,22 @@
 
 \header {
 
-  texidoc = "With @code{Shape_note_heads_engraver}, the style of the
-note head is adjusted according to the step of the scale, as measured
-relative to the @code{tonic} property."
+  texidoc = "With @code{shapeNoteStyles}, the style of the note head
+is adjusted according to the step of the scale, as measured relative
+to the @code{tonic} property."
 
 }
 \version "2.5.1"
 
 fragment = {
   \key c \major
-  \set shapeNoteStyles = ##(triangle cross slash  triangle cross slash  triangle cross slash)
-  c d e f g a b c 
   \set shapeNoteStyles = ##(do re mi fa #f la ti)
-  b a g f e d c 
+  c d e f g a b c d e f g a b c
 }
 
 
 \transpose c d 
-\new Voice \with {
-  \remove "Note_heads_engraver"
-  \consists "Shape_note_heads_engraver"
-} \relative {
-
+ \relative {
   \fragment
 }
    
index 8ec38e34d4d4e7c7a4078a482314dbd955b0511c..8ca7dc97c3b6bac5e9d08491f477ea546c16bb0d 100644 (file)
@@ -84,6 +84,32 @@ Note_heads_engraver::process_music ()
        pos += scm_to_int (c0);
 
       note->set_property ("staff-position",   scm_int2num (pos));
+
+      /*
+       Shaped note heads change on step of the scale.
+       */
+      SCM shape_vector = get_property ("shapeNoteStyles");
+      if (ly_c_vector_p (shape_vector))
+       {
+         SCM scm_tonic = get_property ("tonic");
+         Pitch tonic (0,0,0); 
+         if (unsmob_pitch (scm_tonic))
+           tonic = *unsmob_pitch (scm_tonic);
+      
+         unsigned int delta = (pit->get_notename() - tonic.get_notename() + 7) % 7;
+         
+         SCM style = SCM_EOL;
+         if (SCM_VECTOR_LENGTH (shape_vector) > delta
+             && scm_is_symbol (scm_vector_ref (shape_vector, scm_from_int (delta))))
+           {
+             style = scm_vector_ref (shape_vector, scm_from_int (delta));
+           }
+         if (scm_is_symbol (style))
+           {
+             note->set_property ("style", style);
+           }
+       }
+      
       notes_.push (note);
     }
 }
diff --git a/lily/shape-note-heads-engraver.cc b/lily/shape-note-heads-engraver.cc
deleted file mode 100644 (file)
index 694e9ea..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
-  shape-note-heads-engraver.cc -- part of GNU LilyPond
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include <cctype>
-
-#include "rhythmic-head.hh"
-#include "output-def.hh"
-#include "dots.hh"
-#include "dot-column.hh"
-#include "staff-symbol-referencer.hh"
-#include "item.hh"
-#include "engraver.hh"
-#include "warn.hh"
-
-class Shape_note_heads_engraver : public Engraver
-{
-  Link_array<Item> notes_;
-  Link_array<Item> dots_;
-  Link_array<Music> note_evs_;
-
-public:
-  TRANSLATOR_DECLARATIONS (Shape_note_heads_engraver);
-
-protected:
-  virtual bool try_music (Music *ev) ;
-  virtual void process_music ();
-  virtual void stop_translation_timestep ();
-};
-
-Shape_note_heads_engraver::Shape_note_heads_engraver ()
-{
-}
-
-bool
-Shape_note_heads_engraver::try_music (Music *m) 
-{
-  if (m->is_mus_type ("note-event"))
-    {
-      note_evs_.push (m);
-      return true;
-    }
-  else if (m->is_mus_type ("busy-playing-event"))
-    return note_evs_.size ();
-  
-  return false;
-}
-
-
-void
-Shape_note_heads_engraver::process_music ()
-{
-  if (!note_evs_.size())
-    return ;
-  
-  for (int i=0; i < note_evs_.size (); i++)
-    {
-
-      Music * ev = note_evs_[i];
-      Item *note = make_item ("NoteHead", ev->self_scm ());
-      
-      Duration dur = *unsmob_duration (ev->get_property ("duration"));
-
-      note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
-      if (dur.dot_count ())
-       {
-         Item * d = make_item ("Dots", note->self_scm ());
-         Rhythmic_head::set_dots (note, d);
-         
-         if (dur.dot_count ()
-             != robust_scm2int (d->get_property ("dot-count"), 0))
-           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
-
-         d->set_parent (note, Y_AXIS);
-         
-         dots_.push (d);
-       }
-
-      Pitch *pit = unsmob_pitch (ev->get_property ("pitch"));
-
-      SCM scm_tonic = get_property ("tonic");
-      Pitch tonic (0,0,0); 
-      if (unsmob_pitch (scm_tonic))
-       tonic = *unsmob_pitch (scm_tonic);
-      
-      unsigned int delta = (pit->get_notename() - tonic.get_notename() + 7) % 7;
-      SCM shape_vector = get_property ("shapeNoteStyles");
-
-      SCM style = SCM_EOL;
-      if (ly_c_vector_p (shape_vector)
-         && SCM_VECTOR_LENGTH (shape_vector) > delta
-         && scm_is_symbol (scm_vector_ref (shape_vector, scm_from_int (delta))))
-       {
-         style = scm_vector_ref (shape_vector, scm_from_int (delta));
-       }
-      if (scm_is_symbol (style))
-       {
-         note->set_property ("style", style);
-       }
-      
-      int pos = pit ? pit->steps () : 0;
-      SCM c0 = get_property ("middleCPosition");
-      if (scm_is_number (c0))
-       pos += scm_to_int (c0);
-
-      note->set_property ("staff-position",   scm_int2num (pos));
-      notes_.push (note);
-
-
-      
-      
-      
-    }
-}
-
-void
-Shape_note_heads_engraver::stop_translation_timestep ()
-{
-  notes_.clear ();
-  dots_.clear ();
-  note_evs_.clear ();
-}
-
-
-
-ENTER_DESCRIPTION (Shape_note_heads_engraver,
-/* descr */       "Generate noteheads.",
-/* creats*/       "NoteHead Dots",
-/* accepts */     "note-event busy-playing-event",
-/* acks  */      "",
-/* reads */       "middleCPosition shapeNoteStyles",
-/* write */       "");
index c820c5c7032a70e20d7f9550eecac6eeb1199520..f8fc46ef4e0135538b9ee8dbfc789642e65e275d 100644 (file)
@@ -37,14 +37,21 @@ setEasyHeads = \sequential {
        \override NoteHead #'X-extent-callback = #'()
 }
 
+aikenHeads = \set shapeNoteStyles = ##(do re mi fa #f la ti)
+
+sacredHarpHeads =
+  \set shapeNoteStyles = ##(#f #f mi #f fa la #f)
+
 dynamicUp = {
   \override DynamicText  #'direction = #1
   \override DynamicLineSpanner  #'direction = #1
 }
+
 dynamicDown = {
   \override DynamicText  #'direction = #-1
   \override DynamicLineSpanner  #'direction = #-1
 }
+
 dynamicNeutral = {
   \revert DynamicText #'direction
   \revert DynamicLineSpanner #'direction
index d3b4a973fec578f29f64979a42f82e4124a54732..a0bc9be0cfb2124a443f69702851fb733158c713 100644 (file)
@@ -536,7 +536,7 @@ save solfa_pen_thick;
 solfa_pen_thick# = 2 stafflinethickness#;
 define_pixels (solfa_pen_thick);
 
-def draw_do_head (expr width_factor) =
+def draw_do_head (expr width_factor, dir) =
        save p ;
        path p;
        set_char_box(0, width_factor * noteheight#, 0.5 noteheight#, 0.5 noteheight#);
@@ -551,22 +551,38 @@ def draw_do_head (expr width_factor) =
        x3 =.5[x1,x2];
 
        p := z1 -- z2 -- z3 -- cycle;
+
+       charwx := charwd;
+       charwy := - chardp + 0.5 stafflinethickness#;
+       if dir = -1:
+               charwy := - charwy;
+       fi;
 enddef;
 
 fet_beginchar("Whole dohead", "s0do", "wholedohead")
-       draw_do_head (1.8);
+       draw_do_head (1.8, 1);
        draw p;
 fet_endchar;
 
 
+fet_beginchar("Half dohead", "d1do", "downhalfdohead")
+       draw_do_head (1.5, -1);
+       draw p;
+fet_endchar;
+
 fet_beginchar("Half dohead", "s1do", "halfdohead")
-       draw_do_head (1.5);
+       draw_do_head (1.5, 1);
        draw p;
 fet_endchar;
 
+fet_beginchar("Quart dohead", "d2do", "downdohead")
+       draw_do_head (1.55, -1);
+       filldraw p;
+fet_endchar;
+
 
 fet_beginchar("Quart dohead", "s2do", "dohead")
-       draw_do_head (1.55);
+       draw_do_head (1.55, 1);
        filldraw p;
 fet_endchar;
 
@@ -579,18 +595,19 @@ fet_endchar;
 
 
 
-def draw_re_head (expr width_factor) =
+def draw_re_head (expr width_factor, dir) =
        save p ;
        path p;
        set_char_box(0, width_factor * noteheight#, 0.5 noteheight#, 0.5 noteheight#);
        
        pickup pencircle scaled solfa_pen_thick;
 
-
+       save curve_start;
+       curve_start = 0.7;
        lft x1 = 0;
        y1 = y5;
        x1 = x2;
-       y2 = .7 [y3,y1];
+       y2 = curve_start [y3,y1];
        bot y3 = - d;
        x3 = .5 [x2,x4];
        rt x4 = w;
@@ -599,22 +616,38 @@ def draw_re_head (expr width_factor) =
        x5 = x4;
        labels (range 1 thru 5);
        p := z1 --- z2 .. z3{right} .. z4 --- z5 --- cycle;
+
+       charwx := charwd;
+       charwy := curve_start [-chardp, charht];
+       if dir = -1:
+               charwy := - charwy;
+       fi;
 enddef;
 
 fet_beginchar("Whole rehead", "s0re", "wholerehead")
-       draw_re_head (1.8);
+       draw_re_head (1.8,1);
        draw p;
 fet_endchar;
 
 
-fet_beginchar("Half rehead", "s1re", "halfrehead")
-       draw_re_head (1.5);
+fet_beginchar("Half up rehead", "u1re", "uphalfrehead")
+       draw_re_head (1.5, 1);
+       draw p;
+fet_endchar;
+
+fet_beginchar("Half down rehead", "d1re", "downhalfrehead")
+       draw_re_head (1.5, -1);
        draw p;
 fet_endchar;
 
 
-fet_beginchar("Quart rehead", "s2re", "rehead")
-       draw_re_head (1.55);
+fet_beginchar("Quart rehead", "u2re", "uprehead")
+       draw_re_head (1.55, 1);
+       filldraw p;
+fet_endchar;
+
+fet_beginchar("Quart rehead", "d2re", "downrehead")
+       draw_re_head (1.55, -1);
        filldraw p;
 fet_endchar;
 
@@ -699,6 +732,8 @@ def draw_fa_head (expr width_factor) =
        p_up := z1 -- z2 -- z3 --cycle;
        p_down := z1 -- z4 -- z3 --cycle;
 
+       charwy := 0.0;
+       charwx := charwd;
 enddef;
 
 
@@ -712,22 +747,22 @@ fet_beginchar("Whole fa down head", "u0fa", "wholefauphead")
        draw p_down;
 fet_endchar;
 
-fet_beginchar("half fa up head", "d0fa", "halffadownhead")
+fet_beginchar("half fa up head", "d1fa", "halffadownhead")
        draw_fa_head (1.5);
        draw p_up;
 fet_endchar;
 
-fet_beginchar("Half fa down head", "u0fa", "halffauphead")
+fet_beginchar("Half fa down head", "u1fa", "halffauphead")
        draw_fa_head (1.5);
        draw p_down;
 fet_endchar;
 
-fet_beginchar("Quarter fa up head", "u0fa", "quarterfadownhead")
+fet_beginchar("Quarter fa up head", "u2fa", "quarterfadownhead")
        draw_fa_head (1.55);
        filldraw p_up;
 fet_endchar;
 
-fet_beginchar("Quarter fa down head", "d0fa", "quarterfauphead")
+fet_beginchar("Quarter fa down head", "d2fa", "quarterfauphead")
        draw_fa_head (1.55);
        filldraw p_down;
 fet_endchar;
@@ -775,17 +810,19 @@ fet_endchar;
 
 
 
-def draw_ti_head (expr width_factor) =
+def draw_ti_head (expr width_factor, dir) =
        set_char_box(0, width_factor * noteheight#, 0.5 noteheight#, 0.5 noteheight#);
        save p;
        path p;
-       
+       save cone_height;
+       cone_height = 0.64;
+
        pickup pencircle scaled solfa_pen_thick;
 
        x1 = .5 [x2, x4];
        bot y1 = -d;
        lft x2 = 0;
-       y2 = .65 [y1,y3];
+       y2 = cone_height [y1,y3];
        rt x4 = w;
        y4 = y2;
        x3 = x1;
@@ -794,22 +831,39 @@ def draw_ti_head (expr width_factor) =
        labels(range 1 thru 4);
 
        p := z1 -- z2  .. z3{right} .. z4 -- cycle;
+       charwx := charwd;
+       charwy := cone_height [-chardp, charht];
+       if dir = - 1:
+               charwy := - charwy;
+       fi;
 enddef;
 
-fet_beginchar("Whole tihead", "s0ti", "wholetihead")
-       draw_ti_head (1.8);
+fet_beginchar("Whole up tihead", "s0ti", "wholetihead")
+       draw_ti_head (1.8, 1);
        draw p;
 fet_endchar;
 
 
-fet_beginchar("Half tihead", "s1ti", "halftihead")
-       draw_ti_head (1.5);
+fet_beginchar("Half up tihead", "u1ti", "uphalftihead")
+       draw_ti_head (1.5, 1);
        draw p;
 fet_endchar;
 
+fet_beginchar("Half down tihead", "d1ti", "dnhalftihead")
+       draw_ti_head (1.5, -1);
+       draw p;
+fet_endchar;
+
+
+
+fet_beginchar("Quart up tihead", "u2ti", "utihead")
+       draw_ti_head (1.55, 1);
+       filldraw p;
+fet_endchar;
+
 
-fet_beginchar("Quart tihead", "s2ti", "tihead")
-       draw_ti_head (1.55);
+fet_beginchar("Quart down tihead", "d2ti", "dtihead")
+       draw_ti_head (1.55, -1);
        filldraw p;
 fet_endchar;
 
index 85dc846f95de52ef82ba81b29eec8700654fc490..99bdd261d05de39ebdba400bb353c843bf340ffb 100644 (file)
@@ -129,15 +129,15 @@ enddef;
 %
 % (ze is wel breed)
 % 
-fet_beginchar("Neo-mensural maxima notehead", "-3neomensural", "neomensuralmaximahead");
+fet_beginchar("Neo-mensural maxima notehead", "s-3neomensural", "neomensuralmaximahead");
        draw_neomensural_longa (2.6 staff_space#)
 fet_endchar;
 
-fet_beginchar("Neo-mensural longa notehead", "-2neomensural", "neomensurallongahead");
+fet_beginchar("Neo-mensural longa notehead", "s-2neomensural", "neomensurallongahead");
        draw_neomensural_longa (2 staff_space#)
 fet_endchar;
 
-fet_beginchar("Neo-mensural brevis notehead", "-1neomensural", "neomensuralbrevishead")
+fet_beginchar("Neo-mensural brevis notehead", "s-1neomensural", "neomensuralbrevishead")
        draw_neomensural_brevis(2 staff_space#);
 fet_endchar;
 
@@ -181,7 +181,7 @@ def draw_neomensural_open_head (expr wid, height)=
        unfill z5 -- z6 -- z7 -- z8 --cycle;
 enddef;
 
-fet_beginchar("Neo-mensural open head","0neomensural","neomensuralsemibrevishead")
+fet_beginchar("Neo-mensural open head","s0neomensural","neomensuralsemibrevishead")
       draw_neomensural_open_head (staff_space#, noteheight#);
 fet_endchar;
 
@@ -198,11 +198,11 @@ fet_beginchar("Harmonic notehead (Neo-mensural open)",
 fet_endchar;
 
 
-fet_beginchar("Neo-mensural open head","1neomensural","neomensuralminimahead")
+fet_beginchar("Neo-mensural open head","s1neomensural","neomensuralminimahead")
       draw_neomensural_open_head (staff_space#, noteheight#);
 fet_endchar;
 
-fet_beginchar("Neo-mensural black head","2neomensural","neomensuralsemiminimahead")
+fet_beginchar("Neo-mensural black head","s2neomensural","neomensuralsemiminimahead")
       draw_neomensural_black_head (staff_space#, noteheight#);
 fet_endchar;
 
@@ -231,19 +231,19 @@ def draw_mensural_longa (expr wid) =
        draw z6 .. z7;
 enddef;
 
-fet_beginchar("Mensural left stemmed notehead", "lmensural", "mensuralleftstemmedhead");
+fet_beginchar("Mensural left stemmed notehead", "slmensural", "mensuralleftstemmedhead");
        draw_mensural_left_stemmed_head (staff_space#)
 fet_endchar;
 
-fet_beginchar("Mensural maxima notehead", "-3mensural", "mensuralmaximahead");
+fet_beginchar("Mensural maxima notehead", "-s3mensural", "mensuralmaximahead");
        draw_mensural_longa (2.0 staff_space#)
 fet_endchar;
 
-fet_beginchar("Mensural longa notehead", "-2mensural", "mensurallongahead");
+fet_beginchar("Mensural longa notehead", "s-2mensural", "mensurallongahead");
        draw_mensural_longa (staff_space#)
 fet_endchar;
 
-fet_beginchar("Mensural brevis notehead", "-1mensural", "mensuralbrevishead")
+fet_beginchar("Mensural brevis notehead", "s-1mensural", "mensuralbrevishead")
        draw_mensural_brevis(staff_space#);
 fet_endchar;
 
@@ -288,15 +288,15 @@ def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
 enddef;
 
 
-fet_beginchar("Mensural open head","0mensural","mensuralsemibrevishead")
+fet_beginchar("Mensural open head","s0mensural","mensuralsemibrevishead")
        draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
 fet_endchar;
 
-fet_beginchar("Mensural open head","1mensural","mensuralminimahead")
+fet_beginchar("Mensural open head","s1mensural","mensuralminimahead")
        draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
 fet_endchar;
 
-fet_beginchar("Mensural black head","2mensural","mensuralsemiminimahead")
+fet_beginchar("Mensural black head","s2mensural","mensuralsemiminimahead")
        draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
 fet_endchar;
 
index 68200e785e3769859068434d01f4c1af0cc25c4c..9cd88b27f869af53d0220a8b6625525e049ff03d 100644 (file)
@@ -204,7 +204,7 @@ def dump_slyrics (outf):
        ks.sort ()
        for k in ks:
                if re.match('[1-9]', k):
-                       m = chr(string.atoi(k) + 'A')
+                       m = chr(string.atoi(k) + ord ('A'))
                else:
                        m = k
                for i in range (len(slyrics[voice_idx_dict[k]])):
@@ -219,7 +219,7 @@ def dump_voices (outf):
        ks.sort ()
        for k in ks:
                if re.match ('[1-9]', k):
-                       m = chr(string.atoi(k) + 'A')
+                       m = chr(string.atoi(k) + ord ('A'))
                else:
                        m = k
                outf.write ("\nvoice%s =  {" % m)