From: Han-Wen Nienhuys Date: Fri, 16 Jan 2004 21:58:11 +0000 (+0000) Subject: * input/regression/note-head-harmonic.ly: new file. X-Git-Tag: release/2.1.23~228 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=569f6d76cb725b6d99b4239719d453fdf232b9ab;p=lilypond.git * input/regression/note-head-harmonic.ly: new file. * Documentation/user/internals.itely (Technical manual): explain difference between music, translation, layout. * mf/parmesan-heads.mf (overdone_heads): add 0harmonic head. * Documentation/user/refman.itely (Fermatas): document \lyricsto --- diff --git a/ChangeLog b/ChangeLog index 8d09aece72..4c01448fe7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2004-01-16 Han-Wen Nienhuys + * input/regression/note-head-harmonic.ly: new file. + + * Documentation/user/internals.itely (Technical manual): explain + difference between music, translation, layout. + + * mf/parmesan-heads.mf (overdone_heads): add 0harmonic head. + * scm/output-ascii-script.scm (bracket): rounding bfs. * scripts/convert-ly.py (conv): add \include "paper" rule. @@ -24,9 +31,8 @@ * lily/system.cc (post_processing): move uniquify_list () to dumping molecule stage. - * ly/engraver-init.ly (AncientRemoveEmptyStaffContext): set - barCheckSynchronize to #f. Warning: this will mess up scores that - use barchecks to shorten measures. + * ly/engraver-init.ly: set barCheckSynchronize to #f. Warning: + this will mess up scores that use barchecks to shorten measures. * mf/feta-bolletjes.mf (overdone_heads): make note heads rounder at 20pt too. diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index bdb6407484..15e0f5b439 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -18,7 +18,7 @@ Version 2.1.9 @itemize @bullet @item Default staff sizes are now scalable. There are two new mechanisms for -setting staff sizes is, both demonstrated in this fragment +setting staff sizes is. Both are demonstrated in this fragment: @example #(set-staff-size 15) @@ -27,6 +27,7 @@ setting staff sizes is, both demonstrated in this fragment @} @end example + @noindent Both have the same effect on the global layout of a piece. Similarly, the paper size may be changed as follows @@ -35,6 +36,15 @@ piece. Similarly, the paper size may be changed as follows #(set-paper-size "a4") @end example + +@item + Warnings for bar check errors are more cleverly printed. This +makes barCheckSynchronize superfluous. barCheckSynchronize 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 frantic graphic impression. diff --git a/Documentation/user/internals.itely b/Documentation/user/internals.itely index edb79eb3f6..75b8ec4338 100644 --- a/Documentation/user/internals.itely +++ b/Documentation/user/internals.itely @@ -11,18 +11,88 @@ @chapter Technical manual -When LilyPond is run, it reads an input file which is parsed. During -parsing, Music objects are created. This music is interpreted, which -is done by contexts, that produce graphical objects. This section -discusses details of these three concepts, and how they are glued -together with the embedded Scheme interpreter. +When LilyPond is run, it reads music from a file, translates that into +notation, and outputs the result to a file. The most important steps +are the first three. Consequently, there are three important basic +concepts within LilyPond: music, translation and layout. The +following diagram illustrates the concepts, and list the terminology +associated with each step. + + +@verbatim + + +-------------+ Translation +----------+ + | | | | + | Music | ------------------> | Layout | + | | | | + +-------------+ +----------+ + + +Syntax: c4 \context \set #'padding = + \property + +Objects: Music expressions Contexts Layout object + Engravers (aka. Grob) + +Example objects: NoteEvent Voice NoteHead + Note_heads_engraver + +Example properties: #'pitch keySignature #'line-count + +User applications: none various tuning layout + +@end verbatim + +The objects passed around in LilyPond have @emph{properties}, +variables that can contain many different types of information. Users +can set these variables, to modify the default behavior. Since there +are three different main concepts, there are also three types of +properties: + +@cindex properties +@cindex concepts, main +@cindex context +@cindex music expressions +@cindex layout +@cindex grob + + +@table @b +@item Music properties +These are used internally, and most users will not see or use them. + +They use Scheme style naming: @code{pitch}, @code{tremolo-type}. + +@item Translation properties +These influence the translation process, and most users will encounter them +regularly. For example, beaming behavior is tuned with +@code{autoBeamSettings}. + +These use mixed-caps naming: @code{autoBeamSettings}, +@code{ignoreMelismata}. + + +@item Layout properties +These are internally used in the formatting process. Consequently, to +tune formatting details, it is necessary to adjust these +properties. For example, some objects may be moved around vertically +by setting their @code{padding} property. + +These properties use Scheme-style naming: @code{c0-position}, +@code{break-align-symbol}. + +@end table + +This chapter discusses details of the three concepts in more detail, +and explains how they are glued together in LilyPond with the embedded +Scheme interpreter. @menu -* Interpretation context:: -* Scheme integration:: -* Music storage format:: -* Lexical details:: -* Output details:: +* Interpretation context:: +* Scheme integration:: +* Music storage format:: +* Lexical details:: +* Output details:: @end menu @@ -30,14 +100,14 @@ together with the embedded Scheme interpreter. @section Interpretation context @menu -* Creating contexts:: -* Default contexts:: -* Context properties:: -* Context evaluation:: -* Defining contexts:: -* Changing contexts locally:: -* Engravers and performers:: -* Defining new contexts:: +* Creating contexts:: +* Default contexts:: +* Context properties:: +* Context evaluation:: +* Defining contexts:: +* Changing contexts locally:: +* Engravers and performers:: +* Defining new contexts:: @end menu @@ -182,7 +252,7 @@ contained contexts. This means that a property valid for the If you do not wish to specify the name of the context in the @code{\property}-expression itself, you can refer to the abstract context name, @code{Current}. The @code{Current} context is the latest -used context. This will typically mean the @internalsref{Thread} context, +used context. This will typically mean the @internalsref{Thread} context, but you can force another context with the @code{\property}-command. Hence the expressions @@ -209,7 +279,7 @@ Properties can be unset using the following statement. @end example @cindex properties, unsetting -@cindex @code{\unset} +@cindex @code{\unset} @noindent This removes the definition of @var{propname} in @var{contextname}. If @@ -291,7 +361,7 @@ referencing that variable. 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 +music can be interpreted in a changed context by using the following syntax @example \with @{ @@ -342,7 +412,7 @@ objects, and the @code{Skip_event_swallow_translator} only swallows @cindex plug-in An existing context definition can be changed by adding or removing an -engraver. The syntax for these operations is +engraver. The syntax for these operations is @example \consists @var{engravername} \remove @var{engravername} @@ -416,7 +486,7 @@ engravers. Engravers that group context objects into axis groups or alignments need to be at the end of the list. @code{\consistsend} insures that engravers stay at the end even if a user adds or removes engravers. - + @item @code{\accepts} @var{contextname}: This context can contains @var{contextname} contexts. The first @code{\accepts} is created as a default context when events (e.g. notes @@ -460,10 +530,10 @@ When it is installed, the following link should take you to its manual @end ifinfo @menu -* Inline Scheme:: -* Input variables and Scheme:: -* Scheme datatypes:: -* Assignments:: +* Inline Scheme:: +* Input variables and Scheme:: +* Scheme datatypes:: +* Assignments:: @end menu @node Inline Scheme @@ -508,7 +578,7 @@ Both variables and scoping are implemented in the GUILE module system. An anonymous Scheme module is attached to each scope. An assignment of the form @example - traLaLa = \notes @{ c'4 d'4 @} + traLaLa = \notes @{ c'4 d'4 @} @end example @noindent @@ -524,7 +594,7 @@ imported in a @code{\score} by means of a second variable @code{twice}: @example traLaLa = \notes @{ c'4 d'4 @} - + #(define newLa (map ly:music-deep-copy (list traLaLa traLaLa))) #(define twice @@ -553,7 +623,7 @@ written as Scheme is used to glue together different program modules. To aid this glue function, many LilyPond specific object types can be passed as -Scheme value. +Scheme value. The following list are all LilyPond specific types, that can exist during parsing: @@ -576,11 +646,11 @@ During a run, transient objects are also created and destroyed. @table @code @item Grob: short for `Graphical object'. -@item Scheme_hash_table +@item Scheme_hash_table @item Music_iterator @item Molecule: Device-independent page output object, -including dimensions. +including dimensions. @item Syllable_group @@ -643,7 +713,7 @@ always be the first item in a block. @} @end example - + @node Music storage format @section Music storage format @@ -652,12 +722,12 @@ Music in LilyPond is entered as music expressions. This section discusses different types of music expressions, and explains how information is stored internally. This internal storage is accessible through the Scheme interpreter, so music expressions may be -manipulated using Scheme functions. +manipulated using Scheme functions. @menu -* Music expressions:: -* Internal music representation:: -* Manipulating music expressions:: +* Music expressions:: +* Internal music representation:: +* Manipulating music expressions:: @end menu @node Music expressions @@ -670,9 +740,9 @@ enclosing a list of expressions in @code{\sequential @{ @}} or @code{<< >>}. In the following example, a compound expression is formed out of the quarter note @code{c} and a quarter note @code{d}: -@example -\sequential @{ c4 d4 @} -@end example +@example +\sequential @{ c4 d4 @} +@end example @cindex Sequential music @cindex @code{\sequential} @@ -756,11 +826,11 @@ expressions}. @item `type' or interface: Each music name has several `types' or interface, - for example, a note is an @code{event}, but it is also a @code{note-event}, + for example, a note is an @code{event}, but it is also a @code{note-event}, a @code{rhythmic-event} and a @code{melodic-event}. All classes of music are listed in the internals manual, under - @internalsref{Music classes}. + @internalsref{Music classes}. @item C++ object: Each music object is represented by a C++ object. For technical reasons, different music objects may be represented by different C++ @@ -790,8 +860,8 @@ and @internalsref{GraceMusic} has its single argument in @subsection Manipulating music expressions Music objects and their properties can be accessed and manipulated -directly, through the @code{\apply} mechanism. -The syntax for @code{\apply} is +directly, through the @code{\apply} mechanism. +The syntax for @code{\apply} is @example \apply #@var{func} @var{music} @end example @@ -843,7 +913,7 @@ children. ; recurse (if (ly:music? child) (reverse-music child)) (map reverse-music reversed) - + music)) @end example diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 724dd4adde..c8bd6b2f17 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1145,6 +1145,7 @@ c4 \bar ":|" c \bar ".|" c \bar ".|." c +\bar ":|:" c \bar "|." c \bar ":" c @end lilypond @@ -7498,6 +7499,7 @@ naming, and are manipulated using @code{\property}: @example \property Context.propertyName = @var{value} @end example + Layout properties are use Scheme style variable naming, i.e. lower case words separated with dashes. They are symbols, and should always be quoted using @code{#'}. For example, this could be an imaginary @@ -7506,6 +7508,11 @@ layout property name: #'layout-property-name @end example +@seealso + +The introduction of the @ref{Technical manual} gives a more in-depth +treatment of the difference between translation and layout. + @menu * Tuning objects:: * Constructing a tweak:: @@ -7528,7 +7535,7 @@ for @internalsref{Stem}: @example (thickness . 1.3) - (beamed-lengths . (0.0 2.5 2.0 1.5)) + (beamed-lengths . (3.5 3.5 3.5 4.5 5.0)) (Y-extent-callback . ,Stem::height) @var{...} @end example diff --git a/input/regression/note-head-harmonic.ly b/input/regression/note-head-harmonic.ly new file mode 100644 index 0000000000..9b6fd12fb2 --- /dev/null +++ b/input/regression/note-head-harmonic.ly @@ -0,0 +1,23 @@ +\header +{ + texidoc = " The handling of stems for harmonic notes must be + completely identical to normal note heads." +} + +\version "2.1.9" + +\score { + \context Voice \notes { + << { c''4 } + \new Thread { + \property Thread.NoteHead \set #'style = #'harmonic + f''4 + } + >> + } + + \paper { + linewidth = 50.0\mm + indent = 0.0\mm + } +} diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index 28c03c601a..abe8f80e3d 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -133,16 +133,16 @@ violoncello = \notes \relative c' { >> >> \paper { - \paperSixteen - indent=100.0\mm - linewidth=150.0\mm - \translator { - \RemoveEmptyStaffContext - } - \translator { - \OrchestralScoreContext - TimeSignature \override #'style = #'C - } + \paperSixteen + indent=100.0\mm + linewidth=150.0\mm + \translator { + \RemoveEmptyStaffContext + } + \translator { + \OrchestralScoreContext + TimeSignature \override #'style = #'C + } } } diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index a622b8b44a..07ade93713 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -65,6 +65,8 @@ melismaEnd = \property Staff.melismaBusy = ##f \include "engraver-init.ly" } +#(set-paper-size "a4") + %{ @@ -107,7 +109,6 @@ paperTwentysix = \paper { } \paper { \paperTwenty } -#(set-paper-size "a4") \include "dynamic-scripts-init.ly" \include "spanners-init.ly" diff --git a/mf/parmesan-heads.mf b/mf/parmesan-heads.mf index b103001515..ac4b99d0cd 100644 --- a/mf/parmesan-heads.mf +++ b/mf/parmesan-heads.mf @@ -183,6 +183,13 @@ fet_beginchar("Neo-mensural open head","0neo_mensural","neomensuralsemibrevishea draw_neo_mensural_open_head (staff_space#); fet_endchar; +fet_beginchar("Harmonic notehead (Neo-mensural open)","0harmonic","harmonichead") + draw_neo_mensural_open_head (staff_space#); + charwx := head_width#; + charwy := 0; +fet_endchar; + + fet_beginchar("Neo-mensural open head","1neo_mensural","neomensuralminimahead") draw_neo_mensural_open_head (staff_space#); fet_endchar; diff --git a/scm/output-lib.scm b/scm/output-lib.scm index bbe6742cb4..3ca97b267a 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -144,7 +144,7 @@ (define-public (find-notehead-symbol duration style) (case style ((xcircle) "2xcircle") - ((harmonic) "0neo_mensural") + ((harmonic) "0harmonic") ((baroque) ;; Oops, I actually would not call this "baroque", but, for ;; backwards compatibility to 1.4, this is supposed to take