From: fred Date: Wed, 27 Mar 2002 01:00:59 +0000 (+0000) Subject: lilypond-1.3.147 X-Git-Tag: release/1.5.59~773 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b946349e6943c57bd0bf93456eb848d20d142cc0;p=lilypond.git lilypond-1.3.147 --- diff --git a/Documentation/user/appendices.itely b/Documentation/user/appendices.itely index 800cd82d63..17ab55f4c0 100644 --- a/Documentation/user/appendices.itely +++ b/Documentation/user/appendices.itely @@ -11,6 +11,11 @@ @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 index 0000000000..dc68f844d4 --- /dev/null +++ b/input/ascii-art/as1.ly @@ -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 index 0000000000..4866362704 --- /dev/null +++ b/input/ascii-art/as2.ly @@ -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 index 0000000000..32380cc1e1 --- /dev/null +++ b/input/regression/merge-differently-dotted.ly @@ -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] } + > +}} diff --git a/input/test/beam-position.ly b/input/test/beam-position.ly index 33726b736c..59d7922004 100644 --- a/input/test/beam-position.ly +++ b/input/test/beam-position.ly @@ -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] } diff --git a/input/test/boxed-molecule.ly b/input/test/boxed-molecule.ly index e4b660d41d..aef4112f2a 100644 --- a/input/test/boxed-molecule.ly +++ b/input/test/boxed-molecule.ly @@ -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 }} diff --git a/lily/beam.cc b/lily/beam.cc index 901d56ab21..46bf9a7131 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -11,8 +11,10 @@ /* [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; diff --git a/lily/rest.cc b/lily/rest.cc index 2efbf78e04..4a9169e83f 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -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; diff --git a/lily/stem.cc b/lily/stem.cc index 165848acd7..09c15b5679 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -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); diff --git a/ly/engraver.ly b/ly/engraver.ly index 8205f6c3df..52995c5849 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -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 diff --git a/scm/grob-description.scm b/scm/grob-description.scm index ea40dd0cf7..ad4e1e2501 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -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) @@ -574,7 +574,7 @@ (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) @@ -730,6 +730,7 @@ (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)) )) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 03733c2d49..1018a71263 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -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: