+2004-07-04 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/define-context-properties.scm
+ (all-user-translation-properties): change voltaOnThisStaff
+ definition. Backport?
+
+ * lily/volta-engraver.cc (stop_translation_timestep): set bounds
+ if necessary.
+
+ * lily/volta-bracket.cc (print): handle volta brackets without
+ bars.
+
2004-07-01 Jan Nieuwenhuizen <janneke@gnu.org>
* scripts/abc2ly.py (try_parse_chord_delims): Bugfix: update to
@end example
@item A new block, @code{\bookpaper} has been introduced to
-hold settings for paper size and output scaling.
+hold settings for paper size and output scaling. Further options
+include @code{raggedbottom} (if set, systems are not vertically filled
+to reach the bottom of the page), and @code{raggedlastbottom}.
+
+
@item Support for fret diagrams has been contributed by Carl
D. Sorensen. @file{input/test/fret-diagram.ly} contains an example.
LilyPond includes an interpreter for the programming language Scheme,
a member of the LISP family. This interpreter,
-@uref{GUILE,http://www.gnu.org/software/guile/},
+@uref{http://www.gnu.org/software/guile/,GUILE},
forms the basis of the
****************************************************************
}
@end lilypond
+@seealso
+
+Brackets for the repeat are normally only printed over the topmost
+staff. This can be adjusted by setting the @code{voltaOnThisStaff}
+property @inputfileref{input/regression,volta-multi-staff.ly},
+@inputfileref{input/regression,volta-chord-names.ly}
+
@refbugs
A nested repeat like
For clarity, it is advisable to use braces in such situations.
@cindex ambiguity
+
+
+Timing information is not remembered at the start of an alternative,
+so after a repeat timing information must be reset by hand, for
+example by setting @code{Score.measurePosition} or entering
+@code{\partial}. Similarly, slurs or ties are also not repeated.
+
+
+
+
@node Repeats and MIDI
@subsection Repeats and MIDI
example file @inputfileref{input/test,unfold-all-repeats.ly}.
-@refbugs
-
-Timing information is not remembered at the start of an alternative,
-so after a repeat timing information must be reset by hand, for
-example by setting @code{Score.measurePosition} or entering
-@code{\partial}. Similarly, slurs or ties are also not repeated.
-
@node Manual repeat commands
@subsection Manual repeat commands
@internalsref{VocalName}. Music expressions
@internalsref{LyricEvent}.
-@refbugs
-
-@cindex ambiguity
-
-Input for lyrics introduces a syntactical ambiguity
-
-@example
-foo = bar
-@end example
-
-@noindent
-is interpreted as assigning a string identifier @code{\foo} such that
-it contains @code{"bar"}. However, it could also be interpreted as
-making or a music identifier @code{\foo} containing the syllable
-`bar'. The force the latter interpretation, use
-@example
-foo = \lyrics bar4
-@end example
@node Ambitus
}
@end lilypond
+For longer instrument names, it may be useful to increase the
+@code{indent} setting in the @code{\paper} block.
+
@seealso
Program reference: @internalsref{InstrumentName}.
settings. Hence, the MIDI file should not have more than 15 staves
(or 14 if you do not use drums). Other staves will remain silent.
+Not all MIDI players correctly handle tempo change in the MIDI
+output. Players that are known to work include
+@uref{timidity,http://timidity.sourceforge.net/}
+
@menu
* MIDI block::
Volta_bracket_interface::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
- Link_array<Item> bars
- = Pointer_group_interface__extract_grobs (me, (Item*)0, "bars");
-
- if (!bars.size ())
- return SCM_EOL;
-
Spanner *orig_span = dynamic_cast<Spanner*> (me->original_);
bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner*)me);
bool no_vertical_start = orig_span && !broken_first_bracket;
bool no_vertical_end = orig_span && !broken_last_bracket;
SCM s = me->get_property ("bars");
- Grob * endbar = unsmob_grob (ly_car (s));
- SCM glyph = endbar->get_property ("glyph");
+ Grob * endbar = ly_c_pair_p (s) ? unsmob_grob (ly_car (s)) : 0;
+ SCM glyph = endbar ? endbar->get_property ("glyph") : SCM_EOL;
String str;
if (ly_c_string_p (glyph))
str = ly_scm2string (glyph);
else
- return SCM_EOL;
+ str = "|";
const char* cs = str.to_str0 ();
no_vertical_end |=
bool
Volta_engraver::staff_eligible ()
{
- /*
- UGH.
- */
- if (!unsmob_grob (staff_))
- return true;
-
- if (!to_boolean (get_property ("voltaOnThisStaff")))
+ SCM doit =get_property ("voltaOnThisStaff");
+ if (ly_c_boolean_p (doit))
{
- /*
- TODO: this does weird things when you open a piece with a
- volta spanner.
-
- */
- SCM staffs = get_property ("stavesFound");
+ return to_boolean (doit);
+ }
- /*
- only put a volta on the top staff.
+
+ if (!unsmob_grob (staff_))
+ return false;
+
+ /*
+ TODO: this does weird things when you open a piece with a
+ volta spanner.
+ */
+ SCM staffs = get_property ("stavesFound");
+
+ /*
+ only put a volta on the top staff.
- May be this is a bit convoluted, and we should have a single
- volta engraver in score context or somesuch.
+ May be this is a bit convoluted, and we should have a single
+ volta engraver in score context or somesuch.
- */
- if (!ly_c_pair_p (staffs))
- {
- programming_error ("Huh? Volta engraver can't find staffs?");
- return false;
- }
- else if (ly_car (scm_last_pair (staffs)) != staff_)
- {
- return false;
- }
+ */
+ if (!ly_c_pair_p (staffs))
+ {
+ programming_error ("Huh? Volta engraver can't find staffs?");
+ return false;
+ }
+ else if (ly_car (scm_last_pair (staffs)) != staff_)
+ {
+ return false;
}
return true;
}
+
void
Volta_engraver::process_music ()
{
volta_span_ = 0;
}
+ if (end_volta_span_ && !end_volta_span_->get_bound (RIGHT))
+ {
+ Grob * cc = unsmob_grob (get_property ("currentCommandColumn"));
+ Item * ci = dynamic_cast<Item*> (cc);
+ end_volta_span_->set_bound (RIGHT, ci);
+ }
+
end_volta_span_ =0;
+
+ if (volta_span_ && !volta_span_->get_bound (LEFT))
+ {
+ Grob * cc = unsmob_grob (get_property ("currentCommandColumn"));
+ Item * ci = dynamic_cast<Item*> (cc);
+ volta_span_->set_bound (LEFT, ci);
+ }
+
}
/*
*/
ENTER_DESCRIPTION (Volta_engraver,
-/* descr */ "Make volta brackets",
+/* descr */ "Make volta brackets.",
/* creats*/ "VoltaBracket",
/* accepts */ "",
/* acks */ "bar-line-interface staff-symbol-interface note-column-interface",
\type "Engraver_group_engraver"
\name ChordNames
\description "Typesets chord names."
+
+ \consists "Volta_engraver"
\consists "Rest_swallow_translator"
\consists "Output_property_engraver"
\consists "Skip_event_swallow_translator"
\consistsend "Hara_kiri_engraver"
+ voltaOnThisStaff = ##f
minimumVerticalExtent = #'(0 . 2.5)
extraVerticalExtent = ##f
\override SeparatingGroupSpanner #'padding = #0.8
(voltaOnThisStaff ,boolean?
"Normally, volta brackets are put only on the
-topmost staff. Setting this variable will create a bracket on
-this staff as well.")
+topmost staff. This variable overrides this behavior, when set to
+@code{#t} or @code{#f}.")
(voltaSpannerDuration ,ly:moment? "This specifies the maximum duration
to use for the brackets printed for @code{\\alternative}. This can be