From: hanwen Date: Fri, 9 Jan 2004 11:35:44 +0000 (+0000) Subject: release commit X-Git-Tag: release/2.1.8~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5546d2f426bd2b96826bbe9bda090624d9fffdbf;p=lilypond.git release commit --- diff --git a/ChangeLog b/ChangeLog index d59be95f03..a0e7bd48c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,21 @@ 2004-01-09 Han-Wen Nienhuys + * stepmake/bin/add-html-footer.py (built): add Wiki links to + footer. + + * lily/parser.yy (translator_mod): allow \with { \remove .. } + + * lily/bar-check-iterator.cc (process): only warn if + barCheckLastFail was changed. + + * scm/define-translator-properties.scm (barCheckLastFail): add + property. + * lily/main.cc (main_prog): print summary of failed files. * lily/axis-group-engraver.cc: move all spanner creation to process_music (). Now staffs can be adjusted with \override too. + (Jan, you are a brilliant programmer!) * lily/chord-tremolo-engraver.cc (try_music): fix spurious warning. diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index c85cc20c2d..03b9b96f45 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -10,6 +10,22 @@ Unreleased: @itemize +@end itemize + +Version 2.1.7 + +@itemize @bullet + +@item Contexts may now be changed locally for an isolated music +expression. For example, + +@example + \new Voice \with @{ + \consists "Pitch_squash_engraver" + @} @{ + c'4 + @} +@end example @item The syntax for changing staffs has changed. The keyword @code{\change} should now be used, e.g. @@ -18,24 +34,19 @@ Unreleased: \change Staff = up @end example -@item Features of spanner contexts, like @code{Staff}, can now be changed easily: +@item Features of spanner contexts, like @code{Staff}, can now be changed + using @code{\property}, eg. @example - \new Staff \with @{ - StaffSymbol \set #'line-count = #4 - @} @{ - c'4 - @} + \new Staff @{ + \property Staff.StaffSymbol \set #'line-count = #4 + c'4 + @} @end example @noindent puts a quarter note C on a staff with 4 lines. -@end itemize - -Version 2.1.7 - -@itemize @bullet @item Multi measure rests are now truly centered between the clefs/barlines of the staff, their position is independent of symbols diff --git a/Documentation/user/internals.itely b/Documentation/user/internals.itely index 39151e2776..d8d9d3d14b 100644 --- a/Documentation/user/internals.itely +++ b/Documentation/user/internals.itely @@ -35,6 +35,7 @@ together with the embedded Scheme interpreter. * Context properties:: * Context evaluation:: * Defining contexts:: +* Changing contexts locally:: * Engravers and performers:: * Defining new contexts:: @end menu @@ -285,6 +286,44 @@ It is not possible to collect multiple property assignments in a variable, and apply to one @code{\translator} definition by referencing that variable. +@node Changing contexts locally +@subsection Changing contexts locally + + +Extending an existing context can also be done locally. A piece of +music can be interpreted in a changed context by using the following syntax + +@example + \with @{ + @var{context modifications} + @} +@end example + +These statements comes between @code{\new} or @code{\context} and the +music to be interpreted. The @var{context modifications} property +settings and @code{\remove}, @code{\consists} and @code{\consistsend} +commands. The syntax is similar to the @code{\translator} block. + +The following example shows how a staff is created with bigger spaces: + +@lilypond[relative=1,fragment] +<< + \new Staff { c4 es4 g2 } + \new Staff \with { + StaffSymbol \set #'staff-space = #(magstep 1.5) + fontSize = #1.5 + \remove "Clef_engraver" + } { + c4 es4 g2 + } >> +@end lilypond + +@refbugs + +@code{\with} has no effect on contexts that already exist. Neither can +it be used for @internalsref{Score} contexts. + + @node Engravers and performers @subsection Engravers and performers diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index dcd20b587f..51eae7e7f5 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -32,7 +32,6 @@ somewhat familiar with using LilyPond. * Ancient notation:: * Contemporary notation:: * Tuning output:: -* Tuning spanning contexts:: * Global layout:: * Sound:: @end menu @@ -813,15 +812,12 @@ staff symbol. @cindex thickness of staff lines, setting @cindex number of staff lines, setting -This object is created whenever a @internalsref{Staff} context is -created. To change its appearance, use the @code{\with} command, -described in @ref{Tuning spanning contexts}. - @seealso +Internals: @internalsref{StaffSymbol}, -@internalsref{StaffSymbol}, @inputfileref{input/test,staff-lines.ly}, -@inputfileref{input/test,staff-size.ly}, @ref{Tuning spanning contexts}. +Examples: @inputfileref{input/test,staff-lines.ly}, +@inputfileref{input/test,staff-size.ly} @refbugs @@ -1189,11 +1185,7 @@ The barlines at the start of each system are @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and @internalsref{SystemStartBracket}. Only one of these types is created in every context, and that type is determined by the property -@code{systemStartDelimiter}. They are spanner objects and therefore -the objects, as well as @code{systemStartDelimiter} must be set from a -@code{\translator} block (see @ref{Defining contexts}) or using -@code{\with} (see @code{Tuning spanning contexts}). - +@code{systemStartDelimiter}. @node Polyphony @section Polyphony @@ -3741,8 +3733,7 @@ chord. @cindex Non-guitar tablatures You can change the number of strings, by setting the number of lines -in the @internalsref{TabStaff}. For more information, see @ref{Tuning -spanning contexts}). +in the @internalsref{TabStaff}. You can change the tuning of the strings. A string tuning is given as a Scheme list with one integer number for each string, the number @@ -3754,9 +3745,6 @@ g: @lilypond[fragment,verbatim] \context TabStaff << - - \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) - 'line-count 4) \property TabStaff.stringTunings = #'(-5 -10 -15 -20) \notes { @@ -4927,8 +4915,7 @@ historic style mensural G clef @tab Editio Vaticana style do clef @tab @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab @lilypond[relative 0, notime] -\context Staff -\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4) + \property Staff.StaffSymbol \set #'line-count = #4 \property Staff.TimeSignature \set #'transparent = ##t \clef "vaticana_do2" c @end lilypond @@ -4938,8 +4925,7 @@ Editio Vaticana style do clef @tab Editio Vaticana style fa clef @tab @code{vaticana_fa1}, @code{vaticana_fa2} @tab @lilypond[relative 0, notime] -\context Staff -\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4) + \property Staff.StaffSymbol \set #'line-count = #4 \property Staff.TimeSignature \set #'transparent = ##t \clef "vaticana_fa2" c @end lilypond @@ -4949,8 +4935,7 @@ Editio Vaticana style fa clef @tab Editio Medicaea style do clef @tab @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab @lilypond[relative 0, notime] -\context Staff -\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4) + \property Staff.StaffSymbol \set #'line-count = #4 \property Staff.TimeSignature \set #'transparent = ##t \clef "medicaea_do2" c @end lilypond @@ -4960,8 +4945,7 @@ Editio Medicaea style do clef @tab Editio Medicaea style fa clef @tab @code{medicaea_fa1}, @code{medicaea_fa2} @tab @lilypond[relative 0, notime] -\context Staff -\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4) + \property Staff.StaffSymbol \set #'line-count = #4 \property Staff.TimeSignature \set #'transparent = ##t \clef "medicaea_fa2" c @end lilypond @@ -4971,8 +4955,7 @@ Editio Medicaea style fa clef @tab historic style hufnagel do clef @tab @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab @lilypond[relative 0, notime] -\context Staff -\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4) + \property Staff.StaffSymbol \set #'line-count = #4 \property Staff.TimeSignature \set #'transparent = ##t \clef "hufnagel_do2" c @end lilypond @@ -4982,8 +4965,7 @@ historic style hufnagel do clef @tab historic style hufnagel fa clef @tab @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab @lilypond[relative 0, notime] -\context Staff -\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4) + \property Staff.StaffSymbol \set #'line-count = #4 \property Staff.TimeSignature \set #'transparent = ##t \clef "hufnagel_fa2" c @end lilypond @@ -7434,6 +7416,10 @@ layout property name: @menu * Tuning objects:: +* Constructing a tweak:: +* Applyoutput:: +* Font selection:: +* Text markup:: @end menu @@ -7609,40 +7595,6 @@ including the changed thickness, but excluding the new neutral direction. -@node Tuning spanning contexts -@section Tuning spanning contexts - -Certain objects, for example, the staff symbol, are constructed before -any @code{\property} statements are executed. Therefore, they must be -tuned with a different mechanism. This mechanism is @code{\with}. The -syntax is as follows - -@example - \with @{ - @var{property-settings} - @} -@end example - -These statements comes between @code{\new} or @code{\context} and the -music to be interpreted. @var{property-settings} may be any type of -@code{\property} command. The following example shows how a staff is -created with bigger spaces: - -@lilypond[relative=1,fragment] -<< \new Staff { c4 es4 g2 } - \new Staff \with { - StaffSymbol \set #'staff-space = #(magstep 1.5) - fontSize = #1.5 - } { - c4 es4 g2 - } >> -@end lilypond - -@refbugs - -@code{\with} has no effect for already existing contexts. @code{\with} -can not be used for @internalsref{Score} contexts. - @menu * Constructing a tweak:: diff --git a/VERSION b/VERSION index 4f890a9c78..0076e7ac4c 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 -PATCH_LEVEL=7 -MY_PATCH_LEVEL=hwn1 +PATCH_LEVEL=8 +MY_PATCH_LEVEL= diff --git a/input/test/ancient-font.ly b/input/test/ancient-font.ly index 15d4082947..faa151109d 100644 --- a/input/test/ancient-font.ly +++ b/input/test/ancient-font.ly @@ -14,9 +14,7 @@ upperStaff = \context GregorianStaff = upperStaff << \property Score.timing = ##f % \property Score.forceAccidental = ##t %%%%%%%% FIXME: what happened to this property? - % this is broken until further notice -- see refman - % \property Staff.StaffSymbol \override #'line-count = #4 - \context Staff \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4) + \property Staff.StaffSymbol \override #'line-count = #4 \notes \transpose c c { \property Staff.KeySignature \override #'style = #'vaticana diff --git a/input/test/staff-lines.ly b/input/test/staff-lines.ly index d76c98fbee..19fc31b39f 100644 --- a/input/test/staff-lines.ly +++ b/input/test/staff-lines.ly @@ -19,9 +19,10 @@ lower = \notes\relative c { \new Staff << \upper >> - \new Staff \with { StaffSymbol \set #'line-count = #4 } << - \clef bass - \lower + \new Staff { + \property Staff.StaffSymbol \set #'line-count = #4 } << + \clef bass + \lower >> >> \paper { raggedright=##t} diff --git a/input/test/staff-size.ly b/input/test/staff-size.ly index 14ccc00ce9..56554bea7a 100644 --- a/input/test/staff-size.ly +++ b/input/test/staff-size.ly @@ -3,24 +3,13 @@ \header { texidoc = "@cindex Staff Size -For setting staff sizes there are two options: using -@code{StaffContainer} and override/revert, or -@code{\with}. Both methods are shown in this example." +For setting staff sizes, both @code{staff-space} and @code{fontSize} +must be set." } \score { \notes \relative c' << - \new StaffContainer { - \property StaffContainer.StaffSymbol \set #'staff-space = #(magstep -2) - \property Staff.fontSize = #-2 - - \dynamicUp\stemDown - - %\key gis \major - c8 d e[ f g a] b c \ff - } - \new Staff \relative c'' { \dynamicDown c,,4 \ff c c c } diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index c00c4af282..94a873bc9c 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -59,6 +59,10 @@ Axis_group_engraver::get_spanner () const return new Spanner (get_property ("VerticalAxisGroup")); } +/* + TODO: should we junk minimumVerticalExtent/extraVerticalExtent ? + */ + void Axis_group_engraver::finalize () { diff --git a/lily/bar-check-iterator.cc b/lily/bar-check-iterator.cc index c95c064a45..16b03abf2c 100644 --- a/lily/bar-check-iterator.cc +++ b/lily/bar-check-iterator.cc @@ -48,14 +48,26 @@ Bar_check_iterator::process (Moment m) if (where->main_part_) { - get_music ()->origin ()->warning (_f ("barcheck failed at: %s", - where->to_string ())); + bool warn =true; if (to_boolean (sync)) { tr = tr->where_defined (ly_symbol2scm("measurePosition")); Moment zero; tr->set_property ("measurePosition", zero.smobbed_copy ()); } + else + { + SCM lf = tr->get_property ("barCheckLastFail"); + if (unsmob_moment (lf) + && *unsmob_moment (lf) == *where) + warn = false; + else + tr->set_property ("barCheckLastFail", mp); + } + + if (warn) + get_music ()->origin ()->warning (_f ("barcheck failed at: %s", + where->to_string ())); } } } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index a6b5018b0c..6398c0e040 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -155,7 +155,6 @@ Score_engraver::one_time_step () Grob *g = announce_infos_[i].grob_; if (!dynamic_cast (g)) // ugh. { - String msg= "Grob " + g->name() + " was created too late!"; diff --git a/lily/translator-group.cc b/lily/translator-group.cc index c83baf9f95..14f5321d48 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -93,6 +93,11 @@ Translator_group::add_fresh_group_translator (Translator*t) trans_group_list_ = add_translator (trans_group_list_,t); Translator_def * td = unsmob_translator_def (tg->definition_); + + /* + this can not move before add_translator(), because \override + operations require that we are in the hierarchy. + */ td->apply_default_property_operations (tg); t->initialize (); diff --git a/scm/define-translator-properties.scm b/scm/define-translator-properties.scm index 780d434af3..3f2f7b8599 100644 --- a/scm/define-translator-properties.scm +++ b/scm/define-translator-properties.scm @@ -108,6 +108,8 @@ wins. In case of draw, a normal accidental is typeset. (translator-property-description 'barAlways boolean? "If set to true a bar line is drawn after each note. ") +(translator-property-description 'barCheckLastFail ly:moment? "Where in the measurze did the last barcheck fail?") + (translator-property-description 'barCheckSynchronize boolean? "If true then reset measurePosition when finding a barcheck. Turn off when using barchecks in polyphonic music.") diff --git a/stepmake/bin/add-html-footer.py b/stepmake/bin/add-html-footer.py index 18b691719b..5f659c8da0 100644 --- a/stepmake/bin/add-html-footer.py +++ b/stepmake/bin/add-html-footer.py @@ -34,16 +34,33 @@ footer_file = '' default_header = r""" """ + +wiki_base = 'http://afavant.elte.hu/lywiki/' + + default_footer = r"""
Please take me back to the index of @PACKAGE_NAME@ """ -built = r"""
-

-This page is for @PACKAGE_NAME@-@PACKAGE_VERSION@ (@BRANCH@).
+built = r""" +

+ + + +
+ +Read comments on this page, or +add one. +

+ +This page is for %(package_name)s-%(package_version)s (%(branch_str)s).

-Report errors to <@MAILADDRESS@>.
""" +Report errors to <%(mail_address)s>. +
+ + +""" def gulp_file (f): @@ -186,6 +203,7 @@ def remove_self_ref (s): def do_file (f): s = gulp_file (f) + s = re.sub ('%', '%%', s) if changelog_file: changes = gulp_file (changelog_file) @@ -241,28 +259,18 @@ def do_file (f): branch_str = 'stable-branch' if string.atoi ( versiontup[1]) % 2: branch_str = 'development-branch' - - s = re.sub ('@INDEX@', index, s) - s = re.sub ('@TOP@', top, s) - s = re.sub ('@PACKAGE_NAME@', package_name, s) - s = re.sub ('@PACKAGE_VERSION@', package_version, s) - s = re.sub ('@WEBMASTER@', webmaster, s) - s = re.sub ('@GCOS@', gcos, s) - s = re.sub ('@LOCALTIME@', localtime, s) - s = re.sub ('@MAILADDRESS@', mail_address, s) - s = re.sub ('@BRANCH@', branch_str, s) - # ugh, python2.[12] re is broken. - #pat = re.compile ('.*?', re.DOTALL) - pat = re.compile ('[.\n]*?') - m = pat.search (s) - while m: - at_var = m.group (1) - at_val = m.group (2) - sys.stderr.write ('at: %s -> %s\n' % (at_var, at_val)) - s = re.sub (at_var, at_val, s) - m = pat.search (s) + wiki_page = ('v%s.%s-' % (versiontup[0], versiontup[1]) + f) + wiki_page = re.sub ('out-www/', '', wiki_page) + wiki_page = re.sub ('/', '-', wiki_page) + wiki_page = re.sub ('.html', '', wiki_page) + subst = globals () + subst.update (locals()) + + + s = s % subst + # urg # maybe find first node? fallback_web_title = '-- --'