longer than 4/4. Patch courtesy Kim Shrier <kim@tinker.com>.
+2002-10-11 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/multi-measure-rest.cc: use breve rests for measure lengths
+ longer than 4/4. Patch courtesy Kim Shrier <kim@tinker.com>.
+
+2002-10-10 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * stepmake/stepmake/c++-rules.make: Fixes for bison 1.50.
+
+ * lily/lexer.ll (My_lily_lexer): Avoid silly flex induced gcc warnings.
+
2002-10-11 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* lily/my-lily-lexer.cc (prepare_for_next_token): use previous
* lily/lexer.ll (My_lily_lexer): Avoid silly flex induced gcc warnings.
+
2002-10-07 Jan Nieuwenhuizen <janneke@gnu.org>
* input/regression/bar-scripts.ly: Blunt documentation build fix.
Rune Zedeler
Jeremie Lumbroso
Juergen Reuter
+Kim Shrier
BUG HUNTERS
Karl-Johan Karlsson
Karl Berry
Werner Lemberg
-
+Thomas Rijniers
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=7
-PATCH_LEVEL=2
+PATCH_LEVEL=3
MY_PATCH_LEVEL=
# Use the above to send patches: MY_PATCH_LEVEL is always empty for a
% stpaper = \paper{ \translator {\BarNumberingStaffContext }}
stpaper = \paper{ }
+
scscore = \score { \grstaff \paper {
\scpaper
}}
+scscore = \score { \grstaff \paper {
+\scpaper
+}}
stscore = \score { \onestaff \paper {
\stpaper
}}
+
%\score {\stscore}
\score {\scscore}
+
+
+\score{\notes c''}
+\score {\scscore}
+
int cur = gh_scm2int (get_property ("currentBarNumber"));
lastrest_->set_grob_property ("measure-count",
gh_int2scm (cur - start_measure_));
+ SCM sml = get_property ("measureLength");
+ Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1);
+ if (ml < Rational (2))
+ {
+ lastrest_->set_grob_property ("use-breve-rest", SCM_BOOL_F);
+ }
+ else
+ {
+ lastrest_->set_grob_property ("use-breve-rest", SCM_BOOL_T);
+ }
+
mmrest_ = 0;
}
}
ENTER_DESCRIPTION(Multi_measure_rest_engraver,
/* descr */ "Engraves multi-measure rests that are produced with @code{R}. Reads
-measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest
+measurePosition and currentBarNumber to determine what number to print over the MultiMeasureRest.
+Reads measureLength to determine if it should use a whole rest or a breve rest to represent 1 measure
+
",
/* creats*/ "MultiMeasureRest",
/* accepts */ "multi-measure-rest-event",
/* acks */ "",
-/* reads */ "currentBarNumber currentCommandColumn measurePosition",
+/* reads */ "currentBarNumber currentCommandColumn measurePosition measureLength",
/* write */ "");
Font_metric *musfont
= Font_interface::get_font (me,style_chain);
+ SCM sml = me->get_grob_property ("use-breve-rest");
+
if (measures == 1)
{
- Molecule s = musfont->find_by_name (Rest::glyph_name (me, 0, ""));
+ if (sml == SCM_BOOL_T)
+ {
+ Molecule s = musfont->find_by_name (Rest::glyph_name (me, -1, ""));
+
+ s.translate_axis ((space - s.extent (X_AXIS).length ())/2, X_AXIS);
+
+ return s ;
+ }
+ else
+ {
+ Molecule s = musfont->find_by_name (Rest::glyph_name (me, 0, ""));
- /*
- ugh.
- */
- if (Staff_symbol_referencer::get_position (me) == 0.0)
- s.translate_axis (staff_space, Y_AXIS);
+ /*
+ ugh.
+ */
+ if (Staff_symbol_referencer::get_position (me) == 0.0)
+ s.translate_axis (staff_space, Y_AXIS);
- s.translate_axis ((space - s.extent (X_AXIS).length ())/2, X_AXIS);
+ s.translate_axis ((space - s.extent (X_AXIS).length ())/2, X_AXIS);
- return s ;
+ return s ;
+ }
}
else
{
int l = measures;
int count = 0;
Real symbols_width = 0.0;
+
+ SCM sml = me->get_grob_property ("use-breve-rest");
+
while (l)
{
- int k;
- if (l >= 4)
- {
- l-=4;
- k = -2;
- }
- else if (l>= 2)
+ if (sml == SCM_BOOL_T)
{
- l -= 2;
- k = -1;
+ int k;
+ if (l >= 2)
+ {
+ l-=2;
+ k = -2;
+ }
+ else
+ {
+ l -= 1;
+ k = -1;
+ }
+
+ Molecule r (musfont->find_by_name ("rests-" + to_string (k)));
+ symbols_width += r.extent (X_AXIS).length ();
+ mols = gh_cons (r.smobbed_copy (), mols);
}
- else
- {
- k = 0;
- l --;
- }
-
- Molecule r (musfont->find_by_name ("rests-" + to_string (k)));
- if (k == 0)
+ else
{
- Real staff_space = Staff_symbol_referencer::staff_space (me);
- r.translate_axis (staff_space, Y_AXIS);
+ int k;
+ if (l >= 4)
+ {
+ l-=4;
+ k = -2;
+ }
+ else if (l>= 2)
+ {
+ l -= 2;
+ k = -1;
+ }
+ else
+ {
+ k = 0;
+ l --;
+ }
+
+ Molecule r (musfont->find_by_name ("rests-" + to_string (k)));
+ if (k == 0)
+ {
+ Real staff_space = Staff_symbol_referencer::staff_space (me);
+ r.translate_axis (staff_space, Y_AXIS);
+ }
+ symbols_width += r.extent (X_AXIS).length ();
+ mols = gh_cons (r.smobbed_copy (), mols);
}
- symbols_width += r.extent (X_AXIS).length ();
- mols = gh_cons (r.smobbed_copy (), mols);
count ++;
}
",
- "expand-limit measure-count number-threshold padding thickness");
+ "expand-limit measure-count number-threshold padding thickness use-breve-rest");
;
sup_quotes:
- '\'' {
+ "'" {
$$ = 1;
}
- | sup_quotes '\'' {
+ | sup_quotes "'" {
$$ ++;
}
;
(number-threshold . 1)
(padding . 1)
(thickness . 6.6)
+ (use-breve-rest . #f)
(font-family . number)
(padding . 1)
(meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface spanner-interface))))
(grob-property-description 'avoid-note-head boolean? "if set, the stem of a chord does not pass through all note head, but start at the last note head. Used by tablature.")
(grob-property-description 'up-to-staff boolean? "if set, stems' lengths are set so as stems end out of the staff. Used by tablature.")
+(grob-property-description 'use-breve-rest boolean? "boolean that tells multi-measure-rest to use a breve rest to represent the duration of 1 measure instead of w whole rest. It defaults to false. It is set to true when the duration of a measure is a breve or longer.")