From: John Mandereau Date: Fri, 29 Feb 2008 16:18:13 +0000 (+0100) Subject: Merge branch 'master' into dev/jmandereau X-Git-Tag: release/2.11.42-1~7^2~15^2~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=76c76ae6a8328b0ad69f183cc7c36e166f15bd05;hp=f6caefb696b778cd8f49acc127583253f020248c;p=lilypond.git Merge branch 'master' into dev/jmandereau * master: Re-enable @version macro. add reminder. Minor policy update. Small updates. Updates from Ralph. MusicXML: Add double-dotted notes to duration test MusicXML: Change time signature in duration test file, so it looks better MusicXML: Add support for longa and breve notes, fix error messages Fix alignment problem with text crescendi Typo in comment move ignore-collision to note-column-interface Update from Trevor. Conflicts: Documentation/user/writing-texinfo.txt --- diff --git a/Documentation/user/editorial.itely b/Documentation/user/editorial.itely index 99f32bff59..674605cb26 100644 --- a/Documentation/user/editorial.itely +++ b/Documentation/user/editorial.itely @@ -248,7 +248,6 @@ gis a gis a \override NoteHead #'color = #(x11-color "LimeGreen") gis a - % this is deliberate nonsense; note that the stems remain black \override Stem #'color = #(x11-color 'Boggle) b2 cis @@ -306,33 +305,20 @@ for details. @cindex parentheses Objects may be parenthesized by prefixing @code{\parenthesize} to -the music event, +the music event. This only functions inside chords; to +parenthesize a single note it must be enclosed with @code{<>} as +if it is a chord. @lilypond[relative=2,fragment,verbatim,ragged-right] -< - c - \parenthesize d - g ->2-\parenthesize -. -d g -< - c, - \parenthesize fis -> +c2 < \parenthesize d> +<\parenthesize e> d @end lilypond -This only functions inside chords, to parenthesize a single note it -must be enclosed with @code{<>} as if it is a chord. - -@example -< \parenthesize NOTE> -@end example +Non-note objects may be parenthesized as well. @lilypond[relative=2,fragment,verbatim,ragged-right] -c4 -<\parenthesize d> -g -<\parenthesize d> +< c \parenthesize d g >2-\parenthesize -. d +g < c, \parenthesize fis > @end lilypond @seealso @@ -436,15 +422,19 @@ notes. \layout { \context { \Staff - \consists "Grid_point_engraver" %% sets of grid + \consists "Grid_point_engraver" + % sets up grids gridInterval = #(ly:make-moment 1 4) + % this sets the grid interval to 1 quarternote (crotchet) } } \new Score \with { \consists "Grid_line_span_engraver" - %% centers grid lines horizontally below note heads + %% centers grid lines horizontally below note heads by default + %the grid lines are aligned with the left side of the notehead \override NoteColumn #'X-offset = #-0.5 + % this moves them to the right half a staff space } \new ChoirStaff << @@ -455,8 +445,9 @@ notes. } } \new Staff { - %% centers grid lines vertically \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 ) + % by default the grid lines join the middle line of each staff, + % this moves them up one staff space \stemDown \clef bass \relative c { diff --git a/Documentation/user/input.itely b/Documentation/user/input.itely index 5f2b84131a..0a02af5d37 100644 --- a/Documentation/user/input.itely +++ b/Documentation/user/input.itely @@ -16,6 +16,12 @@ rather than specific notation. FIXME: don't complain about anything in this chapter. It's still under heavy development. +FIXME: add comments +@verbatim +% %{ +@end verbatim +to 3.1. + @menu * Input files:: * Common syntax issues TODO name?:: diff --git a/Documentation/user/lilypond-learning.tely b/Documentation/user/lilypond-learning.tely index fac164092e..ca8f2b0cc4 100644 --- a/Documentation/user/lilypond-learning.tely +++ b/Documentation/user/lilypond-learning.tely @@ -100,7 +100,6 @@ Free Documentation License''. @ifnottex @node Top @top GNU LilyPond --- learning manual -@c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX. This is the learning manual for GNU LilyPond version @version{}. diff --git a/Documentation/user/pitches.itely b/Documentation/user/pitches.itely index 0ec57da745..05b71b88db 100644 --- a/Documentation/user/pitches.itely +++ b/Documentation/user/pitches.itely @@ -1756,6 +1756,8 @@ ambitus. @node Note heads @subsection Note heads +This section suggests ways of altering note heads. + @menu * Special note heads:: * Easy notation note heads:: diff --git a/Documentation/user/rhythms.itely b/Documentation/user/rhythms.itely index b2f9977731..cf4c1a205d 100644 --- a/Documentation/user/rhythms.itely +++ b/Documentation/user/rhythms.itely @@ -153,7 +153,7 @@ rests from 128th to maxima (8 x whole) may be printed. @cindex triplets @funindex \times -Tuplets are made out of a music expression by multiplying all +Tuplets are made from a music expression by multiplying all the durations with a fraction: @example @@ -164,7 +164,7 @@ durations with a fraction: The duration of @var{musicexpr} will be multiplied by the fraction. The fraction's denominator will be printed over or under the notes, optionally with a bracket. The most common -tuplet is the triplet in which 3 notes have the length of 2, so +tuplet is the triplet in which 3 notes have the duration of 2, so the notes are 2/3 of their written length. @lilypond[quote,ragged-right,fragment,verbatim,relative=2] @@ -175,11 +175,9 @@ c4 c \times 2/3 {b4 a g} Tuplets may be nested: -@lilypond[fragment,ragged-right,verbatim,relative=2] -\relative c'' { - \autoBeamOff - c4 \times 4/5 { f8 e f \times 2/3 {e[ f g] } } f4 | -} +@lilypond[quote,fragment,ragged-right,verbatim,relative=2] +\autoBeamOff +c4 \times 4/5 { f8 e f \times 2/3 {e[ f g] } } f4 | @end lilypond Modifying nested tuplets which begin at the same musical moment @@ -207,21 +205,6 @@ must be done with @code{\tweak}. @lilypondfile [verbatim,lilyquote,ragged-right,texidoc] {entering-several-tuplets-using-only-one--times-command.ly} -@ignore -@c TODO Remove when snippet works ok -@c Sent to Snippet 5 Feb 08 -The property @code{tupletSpannerDuration} specifies how long each -bracket should last. With this, you can make lots of tuplets -while typing @code{\times} only once, thus saving lots of typing. -In the next example, there are two triplets shown, while -@code{\times} was only used once. - -@lilypond[quote,fragment,relative=2,ragged-right,verbatim] -\set tupletSpannerDuration = #(ly:make-moment 1 4) -\times 2/3 { c8 c c c c c } -@end lilypond -@end ignore - @noindent For more information about @code{make-moment}, see @ref{Time administration}. @@ -381,8 +364,7 @@ full length mode and how to modify what material they cover. @code{\compressMusic} works similarly to \times, but does not create a tuplet bracket. One application is in polymetric -notation, as shown in the following example. See -@ref{Polymetric notation}. +notation, see @ref{Polymetric notation}. @lilypondfile [verbatim,lilyquote,ragged-right,texidoc] {printing-music-with-different-time-signatures.ly} @@ -2616,3 +2598,4 @@ Internals Reference: @internalsref{Timing_translator}, + diff --git a/Documentation/user/tweaks.itely b/Documentation/user/tweaks.itely index 698a7b30ea..a68fd71359 100644 --- a/Documentation/user/tweaks.itely +++ b/Documentation/user/tweaks.itely @@ -424,7 +424,7 @@ the context. Let's use a very large value for the thickness at first, so we can be sure the command is working. We get: @example - \override Slur #'thickness = #5.0 +\override Slur #'thickness = #5.0 @end example Don't forget the @code{#'} preceding the @@ -662,7 +662,7 @@ Ok, so the @code{\override} command we need to print the lyrics in italics should be @example - \override LyricText #'font-shape = #'italic +\override LyricText #'font-shape = #'italic @end example @noindent @@ -703,7 +703,7 @@ object name, as otherwise the two names are run together and the interpreter cannot recognise them. So the command should be: @example - \override Lyrics . LyricText #'font-shape = #'italic +\override Lyrics . LyricText #'font-shape = #'italic @end example @warning{In lyrics always leave whitespace between the final @@ -3191,15 +3191,15 @@ To be effective under all circumstances these checks must be enabled by placing the overrides in a Score @code{\with} block, rather than in-line in music, as follows: -@verbatim -\new Score \with { +@example +\new Score \with @{ % Makes sure text scripts and lyrics are within the paper margins \override PaperColumn #'keep-inside-line = ##t \override NonMusicalPaperColumn #'keep-inside-line = ##t -} { +@} @{ .. -} -@end verbatim +@} +@end example @node Advanced tweaks with Scheme @subsection Advanced tweaks with Scheme @@ -3225,33 +3225,29 @@ the staff. #(define (color-notehead grob) "Color the notehead according to its position on the staff." (let ((mod-position (modulo (ly:grob-property grob 'staff-position) 7))) - (case mod-position ; Set rainbow colors - ((1) (ly:grob-set-property! grob 'color (x11-color 'red))) - ((2) (ly:grob-set-property! grob 'color (x11-color 'orange))) - ((3) (ly:grob-set-property! grob 'color (x11-color 'yellow))) - ((4) (ly:grob-set-property! grob 'color (x11-color 'green))) - ((5) (ly:grob-set-property! grob 'color (x11-color 'blue))) - ((6) (ly:grob-set-property! grob 'color (x11-color 'purple))) - ((0) (ly:grob-set-property! grob 'color (x11-color 'violet))) - ) + (case mod-position + ;; Return rainbow colors + ((1) (x11-color 'red )) ; for C + ((2) (x11-color 'orange )) ; for D + ((3) (x11-color 'yellow )) ; for E + ((4) (x11-color 'green )) ; for F + ((5) (x11-color 'blue )) ; for G + ((6) (x11-color 'purple )) ; for A + ((0) (x11-color 'violet )) ; for B + ) ) ) -rainbow = { - % Override color so it is obtained from color-notehead Scheme function - \override NoteHead #'color = #color-notehead -} - \relative c' { - \rainbow { - c2 c' | - b4 g8 a b4 c | - c,2 a' | - g1 | - } + % Arrange to obtain color from color-notehead procedure + \override NoteHead #'color = #color-notehead + c2 c' | + b4 g8 a b4 c | + c,2 a' | + g1 | } \addlyrics { - Some -- where o -- ver the Rain -- bow, way up high, + Some -- where o -- ver the Rain -- bow way up high, } @end lilypond diff --git a/input/manual/editorial-headword.ly b/input/manual/editorial-headword.ly index 6022cb4725..340971876f 100644 --- a/input/manual/editorial-headword.ly +++ b/input/manual/editorial-headword.ly @@ -46,18 +46,7 @@ d'8-2 \staccato | c'4-3 - r8 - r16. - c'32-3 \pp - | - c'8-2 - r16. - c'32 - c'8 - r16. - c'32 - | - c'8 + r4 } % LH Staff @@ -93,18 +82,7 @@ d8-2 \staccato | c4-3 - r8 - r16. - c32-3 - | - c8-2 - r16. - c32 - c8 - r16. - c32 - | - c8 + r4 } >> diff --git a/input/regression/musicxml/00c-Basics-Durations.xml b/input/regression/musicxml/00c-Basics-Durations.xml index cbb8dc62ed..c42439e04b 100644 --- a/input/regression/musicxml/00c-Basics-Durations.xml +++ b/input/regression/musicxml/00c-Basics-Durations.xml @@ -15,13 +15,13 @@ - 32 + 64 0 major - @@ -51,35 +47,25 @@ C 5 - 128 - + 512 1 - whole - - - + breve - - - C 5 - 128 + 256 1 whole - - - C 5 - 64 + 128 1 half down @@ -89,7 +75,7 @@ C 5 - 32 + 64 1 quarter down @@ -99,7 +85,7 @@ C 5 - 16 + 32 1 eighth down @@ -110,7 +96,7 @@ C 5 - 8 + 16 1 16th down @@ -122,7 +108,7 @@ C 5 - 4 + 8 1 32nd down @@ -135,7 +121,7 @@ C 5 - 2 + 4 1 64th down @@ -149,7 +135,7 @@ C 5 - 1 + 2 1 128th down @@ -164,7 +150,7 @@ C 5 - 1 + 2 1 128th down @@ -176,37 +162,62 @@ + + + + + + + C + 5 + + 1536 + 1 + longa + + + + C 5 - 96 + 768 1 - half + breve - down C 5 - 32 + 384 1 - quarter - down + whole + - - - C 5 - 48 + 192 + 1 + half + + + + + C + 5 + + 96 1 quarter @@ -217,7 +228,7 @@ C 5 - 24 + 48 1 eighth @@ -229,7 +240,7 @@ C 5 - 12 + 24 1 16th @@ -242,7 +253,7 @@ C 5 - 6 + 12 1 32nd @@ -256,11 +267,10 @@ C 5 - 3 + 6 1 64th - down continue continue continue @@ -271,11 +281,10 @@ C 5 - 2 + 3 1 128th - down continue continue continue @@ -287,17 +296,152 @@ C 5 - 2 + 3 1 128th - down end end end end end + + + + + + + + + C + 5 + + 1792 + 1 + longa + + + + + + + + + C + 5 + + 896 + 1 + breve + + + + + + C + 5 + + 448 + 1 + whole + + + + + + C + 5 + + 224 + 1 + half + + + + + + C + 5 + + 112 + 1 + quarter + + + + + + C + 5 + + 56 + 1 + eighth + + + begin + + + + C + 5 + + 28 + 1 + 16th + + + continue + begin + + + + C + 5 + + 14 + 1 + 32nd + + + continue + continue + begin + + + + C + 5 + + 7 + 1 + 64th + + + continue + continue + continue + begin + + + + C + 5 + + 7 + 1 + 64th + + + end + end + end + end + light-heavy diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index e9f18461a1..7c62929738 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -100,7 +100,7 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir) } details = scm_acons (ly_symbol2scm ("X"), - scm_from_double (bound_grob->extent (commonx, X_AXIS) + scm_from_double (robust_relative_extent (bound_grob, commonx, X_AXIS) .linear_combination (attach)), details); } @@ -343,7 +343,7 @@ Line_spanner::print (SCM smob) line.translate (Offset (-me->relative_coordinate (commonx, X_AXIS), -me->relative_coordinate (my_common_y, Y_AXIS))); - + return line.smobbed_copy (); } diff --git a/lily/module-scheme.cc b/lily/module-scheme.cc index 9f4832628f..07943858a6 100644 --- a/lily/module-scheme.cc +++ b/lily/module-scheme.cc @@ -14,7 +14,7 @@ /* - If a variable in changed in SRC, we DEST doesn't see the + If a variable is changed in SRC, then DEST doesn't see the definitions. */ diff --git a/lily/note-collision.cc b/lily/note-collision.cc index 8ee404cb06..5ba8fe4872 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -575,7 +575,6 @@ ADD_INTERFACE (Note_collision_interface, "@code{force-hshift} and @code{horizontal-shift}.", /* properties */ - "ignore-collision " "merge-differently-dotted " "merge-differently-headed " "positioning-done "); diff --git a/lily/note-column.cc b/lily/note-column.cc index 68075fc250..e1a8e695fd 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -216,6 +216,7 @@ ADD_INTERFACE (Note_column, "arpeggio " "force-hshift " "horizontal-shift " + "ignore-collision " "note-heads " "rest " "rest-collision " diff --git a/python/musicexp.py b/python/musicexp.py index adce691101..862b5d8c4f 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -2,9 +2,9 @@ import inspect import sys import string import re -import lilylib +import lilylib as ly -_ = lilylib._ +_ = ly._ from rational import Rational @@ -155,8 +155,12 @@ class Duration: def ly_expression (self, factor = None): if not factor: factor = self.factor - - str = '%d%s' % (1 << self.duration_log, '.'*self.dots) + + if self.duration_log < 0: + str = {-1: "\\breve", -2: "\\longa"}.get (self.duration_log, "1") + else: + str = '%d' % (1 << self.duration_log) + str += '.'*self.dots if factor <> Rational (1,1): if factor.denominator () <> 1: diff --git a/python/musicxml.py b/python/musicxml.py index e9d1ef8bed..7c398e1e5d 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -5,9 +5,9 @@ from rational import * import re import sys import copy -import lilylib +import lilylib as ly -_ = lilylib._ +_ = ly._ def error (str): ly.stderr_write ((_ ("error: %s") % str) + "\n") @@ -51,7 +51,7 @@ class Xml_node: return ''.join ([c.get_text () for c in self._children]) def message (self, msg): - lilylib.stderr_write (msg+'\n') + ly.stderr_write (msg+'\n') p = self while p: @@ -340,7 +340,7 @@ class Note (Measure_element): 'half': 1, 'whole': 0, 'breve': -1, - 'long': -2}.get (log, 0) + 'longa': -2}.get (log, 0) elif self.get_maybe_exist_named_child (u'grace'): # FIXME: is it ok to default to eight note for grace notes? return 3 @@ -379,7 +379,7 @@ class Part_list (Music_xml_node): if instrument_name: return instrument_name else: - lilylib.stderr_write (_ ("Unable to find find instrument for ID=%s\n") % id) + ly.stderr_write (_ ("Unable to find find instrument for ID=%s\n") % id) return "Grand Piano" class Part_group (Music_xml_node): diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index e594aa7d47..f808a8325b 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1386,6 +1386,7 @@ class LilyPondVoiceBuilder: else: duration_factor = Rational (diff.numerator ()) else: + # for skips of a whole or more, simply use s1*factor duration_log = 0 duration_factor = diff skip.duration.duration_log = duration_log diff --git a/stepmake/stepmake/texinfo-vars.make b/stepmake/stepmake/texinfo-vars.make index 4ee7cefa47..bd620ab56c 100644 --- a/stepmake/stepmake/texinfo-vars.make +++ b/stepmake/stepmake/texinfo-vars.make @@ -7,6 +7,7 @@ TEXINFO_SOURCES = $(TEXI_FILES) OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt)) +TEXI2PDF_FLAGS += --command '@set version $(TOPLEVEL_VERSION)' GENERATE_OMF = $(PYTHON) $(buildscript-dir)/texi2omf.py --format $(1) --location $(webdir)/$(tree-dir)/out-www/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ TEXI2PDF_FLAGS += --command '@set version $(TOPLEVEL_VERSION)'