From: Han-Wen Nienhuys Date: Sat, 17 Jan 2004 14:57:59 +0000 (+0000) Subject: release commit X-Git-Tag: release/2.1.23~222 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=38c2d7e469930513d883f7612feedb4061618284;p=lilypond.git release commit --- diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 9c86015586..2c0e54171f 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -17,6 +17,20 @@ Version 2.1.9 @end ignore @itemize @bullet +@item Objects in the output can now be documented: the following fragment + boxes the note head, and adds the text ``heads or tails?'' three +spaces below the box. + +@example + \context Voice \applyoutput #(add-balloon-text + 'NoteHead "heads, or tails?" + '(0 . -3)) + + + c8 +@end example + + @item Default staff sizes are now scalable. There are two new mechanisms for setting staff sizes. Both are demonstrated in this fragment: @@ -37,16 +51,14 @@ piece. Similarly, the paper size may be changed as follows @end example -@item - Warnings for bar check errors are more cleverly printed. This -makes barCheckSynchronize superfluous. barCheckSynchronize is now -switched off by default. +@item Warnings for bar check errors are more cleverly printed. This +makes @code{barCheckSynchronize} superfluous, so it is now switched +off by default. Warning: this will cause problems in scores that use bar checks to shorten measures. -@item - The black note head was made a little rounder, which causes a less +@item The black note head was made a little rounder, which causes a less frantic graphic impression. @item diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index c8bd6b2f17..54cee83ff8 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -8140,18 +8140,18 @@ respectively. This is converted to a musical symbol, e.g. @code{\musicglyph #"accidentals-0"} will select the natural sign from the music font. See @ref{The Feta font} for a complete listing of the possible glyphs. + @item \char This produces a single character, e.g. @code{\char #65} produces the letter 'A'. -@item \note @var{log} @var{dots} @var{dir} +@item \note @var{duration} @var{dir} @cindex @code{\note} This produces a note with a stem pointing in @var{dir} direction, with -duration log @var{log} and @var{dots} augmentation dots. The duration -log is the negative 2-logarithm of the duration denominator. For -example, a quarter note has log 2, an eighth note 3 and a breve has -log -1. +the @var{duration} for the note head type and augmentation dots. For +example, @code{\note #"4." #-0.75} creates a dotted quarter note, with +a shortened down stem. @item \hspace #@var{amount} @cindex @code{\hspace} diff --git a/input/regression/grace-nest.ly b/input/regression/grace-nest.ly index ee9c339ca4..d864fa9fea 100644 --- a/input/regression/grace-nest.ly +++ b/input/regression/grace-nest.ly @@ -3,12 +3,14 @@ texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example." } -\score{ -\notes +\score { + \notes { + c''2 { \grace b'16 c''2 } \bar "|." + } + \paper { -{ c''2 { \grace b'16 c''2 } \bar "|." } - \paper { + raggedright = ##t + } } - } diff --git a/scm/new-markup.scm b/scm/new-markup.scm index b3635719b3..aef4bb31f6 100644 --- a/scm/new-markup.scm +++ b/scm/new-markup.scm @@ -279,18 +279,26 @@ Syntax: \\fraction MARKUP1 MARKUP2." (define-public (note-markup paper props . rest) + "This produces a note with a stem pointing in @var{dir} direction, with +the @var{duration} for the note head type and augmentation dots. For +example, @code{\note #\"4.\" #-0.75} creates a dotted quarter note, with +a shortened down stem." + (let* ((parsed (parse-simple-duration (car rest))) (dir (cadr rest))) - (make-note paper props (car parsed) (cadr parsed) dir) + (note-by-number-markup paper props (car parsed) (cadr parsed) dir) )) -(define-public (make-note paper props log dot-count dir) +(define-public (note-by-number-markup paper props . rest ) "Syntax: \\note #LOG #DOTS #DIR. By using fractional values for DIR, you can obtain longer or shorter stems." (let* ( + (log (car rest)) + (dot-count (cadr rest)) + (dir (caddr rest)) (font (ly:paper-get-font paper (cons '((font-family . music)) props))) (stemlen (max 3 (- log 1))) (headgl @@ -634,6 +642,7 @@ any sort of property supported by @ref{font-interface} and (cons hbracket-markup (list markup?)) (cons bracket-markup (list markup?)) (cons note-markup (list string? number?)) + (cons note-by-number-markup (list number? number? number?)) (cons fraction-markup (list markup? markup?)) (cons column-markup (list markup-list?)) diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index fc3dd63ac1..76b8eb6f2f 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -16,12 +16,9 @@ (let* ((dur (ly:get-mus-property event 'tempo-unit)) (count (ly:get-mus-property event 'metronome-count)) - (note-mark (make-note-markup (ly:duration-log dur) - (ly:duration-dot-count dur) - 1) - ) - ) - + (note-mark (make-note-by-number-markup (ly:duration-log dur) + (ly:duration-dot-count dur) + 1) ) ) (make-line-markup (list note-mark