]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.147
authorfred <fred>
Wed, 27 Mar 2002 01:00:59 +0000 (01:00 +0000)
committerfred <fred>
Wed, 27 Mar 2002 01:00:59 +0000 (01:00 +0000)
12 files changed:
Documentation/user/appendices.itely
input/ascii-art/as1.ly [new file with mode: 0644]
input/ascii-art/as2.ly [new file with mode: 0644]
input/regression/merge-differently-dotted.ly [new file with mode: 0644]
input/test/beam-position.ly
input/test/boxed-molecule.ly
lily/beam.cc
lily/rest.cc
lily/stem.cc
ly/engraver.ly
scm/grob-description.scm
scripts/convert-ly.py

index 800cd82d6317a1c3c83d68f5d1774a38dd91db33..17ab55f4c08450eaf16581bf4817f65760c7f812 100644 (file)
 @node Lyrics mode definition
 @section Lyrics mode definition
 
+The definition of lyrics mode is ludicrous, and this will remain so
+until the authors of LilyPond acquire a deeper understanding of
+character encoding, or someone else steps up to fix this.
+
+
 A word in Lyrics mode begins with: an alphabetic character, @code{_},
 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
@@ -143,16 +148,13 @@ scheme = \chords {
 @end lilypond
 @end quotation
 
-
-[barnumbers look silly, fixme.]
+@c [barnumbers look silly, fixme.]
 
 
 
 @node MIDI instruments
 @section MIDI instruments
 
-[todo: make nicely formatted table]
-
 @example 
 "acoustic grand"            "contrabass"           "lead 7 (fifths)"
 "bright acoustic"           "tremolo strings"      "lead 8 (bass+lead)"
diff --git a/input/ascii-art/as1.ly b/input/ascii-art/as1.ly
new file mode 100644 (file)
index 0000000..dc68f84
--- /dev/null
@@ -0,0 +1,13 @@
+
+\version "1.3.146"
+
+\score { 
+  \context Voice \notes\relative c {
+    \time 4/4
+       g''1 a2 b4. c8
+       \repeat "volta" 2 { a4 b c d } \alternative { { c c c c } { d2 d4 [d8 d] } }
+       
+  }
+  \paper { }  
+  \midi { }
+}
diff --git a/input/ascii-art/as2.ly b/input/ascii-art/as2.ly
new file mode 100644 (file)
index 0000000..4866362
--- /dev/null
@@ -0,0 +1,22 @@
+\version "1.3.146"
+
+% test for ascii-art output
+
+\include "paper-as9.ly"
+
+\score {
+       \notes\relative c'{
+               \time 4/4
+               c8( e g )b
+               d( d d )d
+               \bar "|."
+       }
+       \paper {
+               linewidth=65.0\char
+               \translator { \StaffContext barSize = #9 }
+               %\translator { \VoiceContext beamHeight = #0 }
+               \translator { \VoiceContext beamHeight = ##f }
+       }
+
+}
+
diff --git a/input/regression/merge-differently-dotted.ly b/input/regression/merge-differently-dotted.ly
new file mode 100644 (file)
index 0000000..32380cc
--- /dev/null
@@ -0,0 +1,16 @@
+\header {
+
+texidoc = "If NoteCollision has merge-differently-dotted set, note
+heads that have differing dot counts may be merged anyway."
+
+ }
+       
+\score { \notes {
+  \context Staff <
+  \context Voice = VA { \voiceOne g'8 g'8 
+     \property Staff.NoteCollision \override #'merge-differently-dotted = ##t
+     g'8 g'8
+     }
+  \context Voice = VB { \voiceTwo [g'8. f16] [g'8. f'16] } 
+  >
+}}
index 33726b736c88e1f4e1f8b38c2c57275571fccffd..59d792200479d9312ba531b28255ea50cc991dd3 100644 (file)
@@ -2,8 +2,8 @@
 
 
 fragment = \notes {
-  \property Voice.Beam \set #'staff-position = #2
-  \property Voice.Beam \set #'height = #-2
+  \property Voice.Beam \set #'staff-position = #4
+  \property Voice.Beam \set #'height = #-4
   [c'8 c]
 }
 
index e4b660d41d09a4326417ba9c21cf1dc2aa63b802..aef4112f2a1e70139189bbdc1ae69db12c79ff18 100644 (file)
@@ -45,7 +45,7 @@ texidoc = "overriding the molecule callback can also be used to draw a
  )
 
 
- \score { \notes  {
+ \score { \notes \relative c''  {
 
  \property Voice.TextScript \override #'molecule-callback =
    #(make-molecule-boxer Text_item::brew_molecule)
@@ -55,5 +55,11 @@ texidoc = "overriding the molecule callback can also be used to draw a
 \property Voice.Stem \override #'molecule-callback =
    #(make-molecule-boxer Stem::brew_molecule)
 
-      c''8
+\property Score.RehearsalMark \override #'molecule-callback =
+   #(make-molecule-boxer Text_item::brew_molecule)
+
+      c8
+\property Voice.Stem \revert #'molecule-callback
+
+      c4. c4 \mark "F" c1 
    }}
index 901d56ab21bbb24f1e04b63c9745dbeacdf84ed8..46bf9a7131cf91e1093b2ddeb0a61b127fa4430f 100644 (file)
 /*
   [TODO]
 
-  * shorter! (now +- 1000 lines)
-  * less hairy code
+  -* shorter! (now +- 1000 lines)
+  
+  -* less hairy code
+  
   */
 
 
@@ -135,7 +137,7 @@ Beam::get_default_dir (Grob*me)
   /*
     If dir is not determined: get default
   */
-  return to_dir (me->get_grob_property ("default-neutral-direction"));
+  return to_dir (me->get_grob_property ("neutral-direction"));
 }
 
 
@@ -495,7 +497,7 @@ Beam::user_override (SCM smob)
   SCM s = me->get_grob_property ("staff-position");
   if (gh_number_p (s))
     {
-      Real y = gh_scm2double (s) * staff_space;
+      Real y = gh_scm2double (s) * staff_space * 0.5;
       me->set_grob_property ("y", gh_double2scm (y));
     }
 
@@ -503,7 +505,7 @@ Beam::user_override (SCM smob)
   s = me->get_grob_property ("height");
   if (gh_number_p (s))
     {
-      Real dy = gh_scm2double (s) * staff_space;
+      Real dy = gh_scm2double (s) * staff_space * 0.5;
       me->set_grob_property ("dy", gh_double2scm (dy));
     }
   
@@ -772,11 +774,13 @@ Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev,
   Real bdy = interbeam_f;
   Real stemdx = staffline_f;
 
+#if 0
     // ugh -> use commonx
   Real dx = visible_stem_count (me) ?
     last_visible_stem (me)->relative_coordinate (0, X_AXIS) - first_visible_stem (me)->relative_coordinate (0, X_AXIS)
     : 0.0;
-
+#endif
+  
   Molecule leftbeams;
   Molecule rightbeams;
 
index 2efbf78e0417761b5ffee0424dc0c1745f47dd56..4a9169e83f135efa8ae002b6e1b43661b77f37b9 100644 (file)
@@ -30,7 +30,7 @@ Rest::after_line_breaking (SCM smob)
   if (d && bt > 4) // UGH.
     {
       d->set_grob_property ("staff-position",
-                          gh_int2scm ((bt == 7) ? 4 : 3));
+                           gh_int2scm ((bt == 7) ? 4 : 3));
     }
 
   return SCM_UNSPECIFIED;
index 165848acd7d3e73c30581d305d1ed53f1f558500..09c15b567969faf314cdc2b9474668ae94849610 100644 (file)
@@ -235,7 +235,7 @@ Stem::get_default_dir (Grob*me)
   if (sign (dd - du))
     return Direction (sign (dd -du));
 
-  return to_dir (me->get_grob_property ("default-neutral-direction"));
+  return to_dir (me->get_grob_property ("neutral-direction"));
 }
 
 Real
@@ -476,12 +476,9 @@ Stem::brew_molecule (SCM smob)
   stem_y.unite (Interval (y2,y1));
 
   Real dy = Staff_symbol_referencer::staff_space (me)/2.0;
-  Real head_wid = 0;
     
   if (Grob *hed = support_head (me))
     {
-      Real slope =0.0;
-      
       Interval head_height = hed->extent (hed,Y_AXIS);
       Real y_attach = Note_head::stem_attachment_coordinate ( hed, Y_AXIS);
 
index 8205f6c3df02f662a0406faca62a2faa90ddb19d..52995c5849c188391383d7177682102b2e0a5aff 100644 (file)
@@ -11,8 +11,6 @@ StaffContext=\translator {
        Generic_property_list = #generic-staff-properties
        \consists "Property_engraver"
        
-       \consists "Multi_measure_rest_engraver"
-
        \consists "Bar_engraver"
  % Bar_engraver must be first so default bars aren't overwritten
 % with empty ones.
@@ -32,20 +30,11 @@ StaffContext=\translator {
        \consists "Rest_collision_engraver"
        \consists "Local_key_engraver"
        \consists "Piano_pedal_engraver"
-
-%{
-       The Instrument_name_engravei puts the name of the instrument
-       (\property Staff.instrument Staff.instr for subsequent lines)
-       to the left of a staff.
-
-       This is commented out, so you don't get funny things on the
-       PianoStaff      
        \consists "Instrument_name_engraver"
-%}
 
        \consistsend "Axis_group_engraver"
        
-       MinimumVerticalExtent = ##f
+       MinimumVerticalExtent = #'(-4 . 4)
        ExtraVerticalExtent = ##f
        VerticalExtent = ##f 
 
@@ -134,7 +123,7 @@ VoiceContext = \translator {
        \consists "Voice_devnull_engraver"
        \consists "Output_property_engraver"    
        \consists "Arpeggio_engraver"
-
+       \consists "Multi_measure_rest_engraver"
        \consists "Text_spanner_engraver"
        \consists "Property_engraver"
        
@@ -250,10 +239,11 @@ PianoStaffContext = \translator{
 
        \consists "Vertical_align_engraver"
 
-       alignmentReference = #0
+       
+       
        verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
        VerticalAlignment \override #'forced-distance = #12
-
+       VerticalAlignment \override #'self-alignment-Y = #0
 %      \consistsend "Axis_group_engraver"
 }
 
@@ -412,8 +402,6 @@ ScoreContext = \translator {
        splitInterval = #'(0 . 1)
        changeMoment = #`(,(make-moment 0 0) . ,(make-moment 1 512))
 
-       StaffMinimumVerticalExtent = #(cons -4.0 4.0)
-
        barAuto = ##t
        voltaVisibility = ##t
        %  name, glyph id, clef position 
index ea40dd0cf78df9a5af9f514b2daf545f86ddf3c5..ad4e1e2501fbcb171141c73f6dff487d5525981e 100644 (file)
@@ -80,7 +80,7 @@
                 (thickness . 0.48) ; in staff-space
                 (before-line-breaking-callback . ,Beam::before_line_breaking)
                 (after-line-breaking-callback . ,Beam::after_line_breaking)
-                (default-neutral-direction . 1)
+                (neutral-direction . 1)
                 (dir-function . ,beam-dir-majority)
                 (height-quants .  ,default-beam-dy-quants)
                 (vertical-position-quant-function . ,default-beam-y-quants)
                (lengths . (3.5 3.5 3.5 4.5 5.0))
                (stem-shorten . (0.5))
                ; if stem is on middle line, choose this direction.
-               (default-neutral-direction . 1)
+               (neutral-direction . 1)
                (X-offset-callbacks . (,Stem::off_callback))
                (X-extent-callback . ,Stem::dim_callback)       
                (Y-extent-callback . ,Stem::height)
                (axes 1)
                (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
                (X-extent-callback . #f)
+
                (stacking-dir . -1)
                (meta . ,(grob-description "VerticalAlignment" align-interface axis-group-interface))
        ))
index 03733c2d494001c41f7998802196e8f19e6367cd..1018a71263fdd3f633ede4bad6f7f217b525b90b 100644 (file)
@@ -706,7 +706,7 @@ if 1:
                def regularize_assignment (match):
                        return '\n' + regularize_id (match.group (1)) + ' = '
                str = re.sub ('\$([^\t\n ]+)', regularize_dollar_reference, str)
-               str = re.sub ('\n([^ \t\n]+) = ', regularize_assignment, str)
+               str = re.sub ('\n([^ \t\n]+)[ \t]*= *', regularize_assignment, str)
                return str
        
        conversions.append (((1,3,117), conv, 'identifier names: $!foo_bar_123 -> xfooBarABC'))
@@ -800,13 +800,24 @@ if 1:
                str = re.sub ('\\\\key[ \t]*;', '\\key \\default;', str)
                str = re.sub ('\\\\mark[ \t]*;', '\\mark \\default;', str)
 
-               # only remove ; that are directly after words.
-               # otherwise  we interfere with Scheme comments, which is badbadbad.
-               str = re.sub ("([^ \t]);", "\\1", str)
+               # Make sure groups of more than one ; have space before
+               # them, so that non of them gets removed by next rule
+               str = re.sub ("([^ \n\t;]);(;+)", "\\1 ;\\2", str)
+               
+               # Only remove ; that are not after spaces, # or ;
+               # Otherwise  we interfere with Scheme comments,
+               # which is badbadbad.
+               str = re.sub ("([^ \t;#]);", "\\1", str)
 
                return str
        conversions.append (((1,3,146), conv, 'semicolons removed'))
 
+if 1:
+       def conv (str):
+               str = re.sub ('default-neutral-direction', 'neutral-direction',str)
+               return str
+       conversions.append (((1,3,147), conv, 'default-neutral-direction -> neutral-direction'))
+
 ################################
 #      END OF CONVERSIONS      
 ################################
@@ -943,6 +954,8 @@ identify ()
 for f in files:
        if f == '-':
                f = ''
+       if not os.path.isfile (f):
+               continue
        try:
                do_one_file (f)
        except UnknownVersion: