From: Patrick McCarty Date: Sun, 26 Sep 2010 16:08:14 +0000 (-0700) Subject: Merge remote branch 'origin/release/unstable' X-Git-Tag: release/2.13.35-1~21 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ca5ffa906698b69799dffc2461de29762847a11c;hp=d139648eddd3874a448ef450c530b5534bf77dff;p=lilypond.git Merge remote branch 'origin/release/unstable' Conflicts: Documentation/web/news-front.itexi --- diff --git a/Documentation/changes.tely b/Documentation/changes.tely index 3e60eb5879..c6e1bb4790 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -66,6 +66,10 @@ which scares away people. @end ignore +@item +Tablature staves show fret numbers only by default. To get the +former style, @code{\tabFullNotation} is provided. + @item Funk-style and Walker-style shape notes have been added. @@ -377,6 +381,10 @@ and to add notes to the number or fraction: FretBoards now have a chordChanges property to keep repeated FretBoard objects from being typeset. +@item +The vertical spacing engine has been drastically changed, making +it more flexible and easier to control. + @end itemize diff --git a/Documentation/contributor/doc-work.itexi b/Documentation/contributor/doc-work.itexi index abd8c1654f..53377fa059 100644 --- a/Documentation/contributor/doc-work.itexi +++ b/Documentation/contributor/doc-work.itexi @@ -604,17 +604,20 @@ external url. Use within an @code{@@example ... @@end example}. @item @code{@@code@{@dots{}@}}, @code{@@samp@{@dots{}@}} --- -Use the @code{@@code@{@dots{}@}} command for individual -language-specific tokens (keywords, commands, engravers, scheme -symbols, etc.). Ideally, a single @code{@@code@{@dots{}@}} block -should fit within one line in the PDF output. Use the -@code{@@samp@{@dots{}@}} command when you have a short example of -user input, unless it constitutes an entire @code{@@item} by -itself, in which case @code{@@code@{@dots{}@}} is preferable. -Otherwise, both should only be used when part of a larger sentence -within a paragraph or @code{@@item}. Never use a -@code{@@code@{@dots{}@}} or @code{@@samp@{@dots{}@}} block as a -free-standing paragraph; use @code{@@example} instead. +Use the @code{@@code@{@dots{}@}} command when referring to +individual language-specific tokens (keywords, commands, +engravers, scheme symbols, etc.) in the text. Ideally, a single +@code{@@code@{@dots{}@}} block should fit within one line in the +PDF output. + +Use the @code{@@samp@{@dots{}@}} command when you have a short +example of user input, unless it constitutes an entire +@code{@@item} by itself, in which case @code{@@code@{@dots{}@}} is +preferable. Otherwise, both should only be used when part of a +larger sentence within a paragraph or @code{@@item}. Do not use +@code{@@code@{@dots{}@}} or @code{@@samp@{@dots{}@}} inside an +@code{@@example} block, and do not use either as a free-standing +paragraph; use @code{@@example} instead. A single unindented line in the PDF has space for about 79 fixed-width characters (76 if indented). Within an @code{@@item} @@ -660,8 +663,9 @@ so the example above would be coded as @q{@code{@@q@{@@w@{@@code@{@@bs@{@}relative c''@}@}@}}}. @item -@code{@@command@{@dots{}@}} --- Use for command-line commands (eg. -@samp{@@command@{lilypond-book@}}). +@code{@@command@{@dots{}@}} --- Use when referring to command-line +commands within the text (eg. @samp{@@command@{convert-ly@}}). Do +not use inside an @code{@@example} block. @item @code{@@example} --- Use for examples of program code. Do not add @@ -700,11 +704,14 @@ running into the PDF margin. Each additional level of @code{@@smallexample} line by about 5 columns. @item -@code{@@file@{@dots{}@}} --- Use for filenames and directories. +@code{@@file@{@dots{}@}} --- Use when referring to filenames and +directories in the text. Do not use inside an @code{@@example} +block. @item -@code{@@option@{@dots{}@}} --- Use for options to command-line -commands (eg. @samp{@@option@{--format@}}). +@code{@@option@{@dots{}@}} --- Use when referring to command-line +options in the text (eg. @samp{@@option@{--format@}}). Do not use +inside an @code{@@example} block. @item @code{@@verbatim} --- Prints the block exactly as it appears in @@ -814,7 +821,17 @@ Only use once per subsection per term. backslash (\), you must use @samp{@@bs@{@}}. @item -@code{@@var@{@dots{}@}} --- Use for variables. +@code{@@var@{@dots{}@}} --- Use for metasyntactic variables (such +as @code{@var{foo}}, @code{@var{bar}}, @code{@var{arg1}}, etc.). +In most cases, when the @code{@@var@{@dots{}@}} command appears in +the text (and not in an @code{@@example} block) it should be +wrapped with an appropriate texinfo code-highlighting command +(such as @code{@@code}, @code{@@samp}, @code{@@file}, +@code{@@command}, etc.). For example: +@samp{@@code@{@@var@{foo@}@}}, +@samp{@@file@{@@var@{myfile.ly@}@}}, +@w{@samp{@@samp@{git checkout @@var@{branch@}@}}}, etc. This +improves readability in the PDF and HTML output. @item @code{@@version@{@}} --- Return the current LilyPond version diff --git a/Documentation/contributor/website-work.itexi b/Documentation/contributor/website-work.itexi index 30958a23f3..4921da3a54 100644 --- a/Documentation/contributor/website-work.itexi +++ b/Documentation/contributor/website-work.itexi @@ -88,7 +88,7 @@ security concerns), the @file{Documentation/@/pictures/} and @file{Documentation/@/web/@/ly-examples/} directories are @strong{not} compiled. You need to upload them, and if they ever change, a user in the @code{lilypond} group must upload them to -@file{~graham/@/media} on the host. +@file{~graham/@/lilypond@/media} on the host. Upload latest pictures/ and ly-examples/ (local script): @@ -104,8 +104,8 @@ PICS=$BUILD_DIR/Documentation/pictures/out-www/ EXAMPLES=$BUILD_DIR/Documentation/web/ly-examples/out-www/ cd $BUILD_DIR -rsync -a $PICS graham@lilypond.org:media/pictures -rsync -a $EXAMPLES graham@lilypond.org:ly-examples +rsync -a $PICS graham@lilypond.org:lilypond/media/pictures +rsync -a $EXAMPLES graham@lilypond.org:lilypond/media/ly-examples @end verbatim diff --git a/Documentation/extending/programming-interface.itely b/Documentation/extending/programming-interface.itely index ed3e496991..59364e6ff2 100644 --- a/Documentation/extending/programming-interface.itely +++ b/Documentation/extending/programming-interface.itely @@ -111,7 +111,7 @@ Intermediate substitution functions involve a mix of Scheme code and LilyPond code in the music expression to be returned. Some @code{\override} commands require an argument consisting of -a pair of numbers (called a @code{cons cell} in Scheme). +a pair of numbers (called a @emph{cons cell} in Scheme). The pair can be directly passed into the music function, using a @code{pair?} variable: @@ -401,22 +401,22 @@ New markup commands can be defined using the The arguments are -@table @var -@item command-name +@table @code +@item @var{command-name} the markup command name @item layout the @q{layout} definition. @item props a list of associative lists, containing all active properties. -@item argi +@item @var{argi} @var{i}th command argument -@item argi-type? +@item @var{argi-type?} a type predicate for the i@var{th} argument @end table -If the command uses properties from the @var{props} arguments, the -@code{#:properties} keyword can be used to specify which properties are -used along with their default values. +If the command uses properties from the @code{props} arguments, +the @code{#:properties} keyword can be used to specify which +properties are used along with their default values. Arguments are distinguished according to their type: @itemize @@ -427,17 +427,19 @@ Arguments are distinguished according to their type: @code{list?}, @code{number?}, @code{boolean?}, etc. @end itemize -There is no limitation on the order of arguments (after the standard -@var{layout} and @var{props} arguments). However, markup functions -taking a markup as their last argument are somewhat special as you can -apply them to a markup list, and the result is a markup list where the -markup function (with the specified leading arguments) has been applied -to every element of the original markup list. +There is no limitation on the order of arguments (after the +standard @code{layout} and @code{props} arguments). However, +markup functions taking a markup as their last argument are +somewhat special as you can apply them to a markup list, and the +result is a markup list where the markup function (with the +specified leading arguments) has been applied to every element of +the original markup list. -Since replicating the leading arguments for applying a markup function -to a markup list is cheap mostly for Scheme arguments, you avoid -performance pitfalls by just using Scheme arguments for the leading -arguments of markup functions that take a markup as their last argument. +Since replicating the leading arguments for applying a markup +function to a markup list is cheap mostly for Scheme arguments, +you avoid performance pitfalls by just using Scheme arguments for +the leading arguments of markup functions that take a markup as +their last argument. @node On properties @unnumberedsubsubsec On properties @@ -726,10 +728,10 @@ syntax for this is \applyContext @var{function} @end example -@var{function} should be a Scheme function that takes a single -argument: the context in which the @code{\applyContext} command is -being called. The following code will print the current bar -number on the standard output during the compile: +@code{@var{function}} should be a Scheme function that takes a +single argument: the context in which the @code{\applyContext} +command is being called. The following code will print the +current bar number on the standard output during the compile: @example \applyContext @@ -748,18 +750,19 @@ number on the standard output during the compile: @funindex \applyOutput -The most versatile way of tuning an object is @code{\applyOutput}. Its -syntax is +The most versatile way of tuning an object is @code{\applyOutput} which +works by inserting an event into the specified context +(@rinternals{ApplyOutputEvent}). Its syntax is @example \applyOutput @var{context} @var{proc} @end example @noindent -where @var{proc} is a Scheme function, taking three arguments. +where @code{@var{proc}} is a Scheme function, taking three arguments. -When interpreted, the function @var{proc} is called for every layout -object found in the context @var{context}, with the following -arguments: +When interpreted, the function @code{@var{proc}} is called for +every layout object found in the context @code{@var{context}} at +the current time step, with the following arguments: @itemize @item the layout object itself, @item the context where the layout object was created, and @@ -770,20 +773,20 @@ arguments: In addition, the cause of the layout object, i.e., the music expression or object that was responsible for creating it, is in the object property @code{cause}. For example, for a note head, this is a -@rinternals{NoteHead} event, and for a @rinternals{Stem} object, -this is a @rinternals{NoteHead} object. +@rinternals{NoteHead} event, and for a stem object, +this is a @rinternals{Stem} object. Here is a function to use for @code{\applyOutput}; it blanks -note-heads on the center-line: +note-heads on the center-line and next to it: @lilypond[quote,verbatim,ragged-right] #(define (blanker grob grob-origin context) (if (and (memq 'note-head-interface (ly:grob-interfaces grob)) - (eq? (ly:grob-property grob 'staff-position) 0)) + (< (abs (ly:grob-property grob 'staff-position)) 2)) (set! (ly:grob-property grob 'transparent) #t))) \relative c' { - e4 g8 \applyOutput #'Voice #blanker b d2 + a'4 e8 <<\applyOutput #'Voice #blanker a c d>> b2 } @end lilypond diff --git a/Documentation/fr/web/community.itexi b/Documentation/fr/web/community.itexi index d8063e4cf9..b3f3480826 100644 --- a/Documentation/fr/web/community.itexi +++ b/Documentation/fr/web/community.itexi @@ -1,6 +1,6 @@ @c -*- coding: utf-8; mode: texinfo; documentlanguage : fr -*- @ignore - Translation of GIT committish: 0ab366a101ef8c3439dd8d6ff6c634f70fa5f63b + Translation of GIT committish: 87a9977bbd54e3822338e290716845d8e2e304e3 When revising a translation, copy the HEAD committish of the version that you are working on. For details, see the Contributors' @@ -496,8 +496,9 @@ la liste anglophone et assurerons le suivi. @warning{Il s'agit des versions @emph{instables et de développement}. Si vous avez le moindre doute quant à l'utilisation ou l'installation de -LilyPond, nous vous enjoignons à utiliser le @ref{Téléchargement} et la -lecture des @ref{Manuels} pour la version stable.} +LilyPond, nous vous enjoignons à utiliser le +@ref{Téléchargement,téléchargement de la version stable} et la +lecture des @ref{Manuels,manuels pour la version stable}.} @divEnd diff --git a/Documentation/fr/web/introduction.itexi b/Documentation/fr/web/introduction.itexi index d3b8675a3c..d464da05c7 100644 --- a/Documentation/fr/web/introduction.itexi +++ b/Documentation/fr/web/introduction.itexi @@ -1,7 +1,7 @@ @c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*- @c This file is part of web.texi @ignore - Translation of GIT committish: 0ab366a101ef8c3439dd8d6ff6c634f70fa5f63b + Translation of GIT committish: 87a9977bbd54e3822338e290716845d8e2e304e3 When revising a translation, copy the HEAD committish of the version that you are working on. For details, see the Contributors' @@ -1128,7 +1128,7 @@ svn co http://svn.textmate.org/trunk/Bundles/LilyPond.tmbundle/ @divClass{column-center-top} -@subheading Autres programmes qui exportent du code LilyPond +@subheading Programmes qui exportent du code LilyPond @subsubheading Éditeurs de partition, tablature et MIDI @@ -1160,6 +1160,12 @@ bienvenus. @uref{http://www.volny.cz/smilauer/rumor/rumor.html,Rumor}, un convertisseur monophonique temps-réel MIDI vers LilyPond. +@item +@uref{http://www.holmessoft.co.uk/homepage/software/NWC2LY/index.htm,NW2LY}, +programme en C#, permet de convertir une chanson écrite avec +@uref{http://www.noteworthysoftware.com/, NoteWorthy} au format LilyPond. + + @end itemize @subsubheading Générateurs de code @@ -1167,8 +1173,14 @@ convertisseur monophonique temps-réel MIDI vers LilyPond. @itemize @item -@uref{http://strasheela.sourceforge.net, Strasheela} est un système de -composition musicale @qq{highly expressive constraint-based}. +@uref{http://www.projectabjad.org/,Abjad}, API de contrôle +formaliste de partition pour @uref{http://www.python.org/,Python}, +permet aux compositeurs de gérer du code LilyPond complexe. + +@item +@uref{http://strasheela.sourceforge.net,Strasheela} est un système de +composition musicale basé sur le projet +@uref{http://www.mozart-oz.org/,Mozart/Oz}. @item @uref{http://common-lisp.net/project/fomus/,FOMUS}, bibliothèque LISP diff --git a/Documentation/notation/chords.itely b/Documentation/notation/chords.itely index 4b122bc5bf..581067eb86 100644 --- a/Documentation/notation/chords.itely +++ b/Documentation/notation/chords.itely @@ -477,7 +477,7 @@ Rests passed to a @code{ChordNames} context will cause the g1 c1 } - \new Score \chordmode { + \chordmode { c1 r1 g1 diff --git a/Documentation/notation/simultaneous.itely b/Documentation/notation/simultaneous.itely index 529b588522..f68d592c81 100644 --- a/Documentation/notation/simultaneous.itely +++ b/Documentation/notation/simultaneous.itely @@ -384,6 +384,42 @@ In all but the simplest works it is advisable to create explicit @code{Voice} contexts as explained in @rlearning{Contexts and engravers} and @rlearning{Explicitly instantiating voices}. +@strong{@i{Voice order}} + +When entering multiple voices in the input file, use the following +order: + +@example +Voice 1: highest +Voice 2: lowest +Voice 3: second highest +Voice 4: second lowest +Voice 5: third highest +Voice 6: third lowest +etc. +@end example + +Though this may seem counterintuitive, it simplifies the automatic +layout process. Note that the odd-numbered voices are given +upstems, and the even-numbered voices are given downstems: + +@lilypond[quote,verbatim] +\new Staff << + \time 2/4 + { f''2 } % 1: highest + \\ + { c'2 } % 2: lowest + \\ + { d''2 } % 3: second-highest + \\ + { e'2 } % 4: second-lowest + \\ + { b'2 } % 5: third-highest + \\ + { g'2 } % 6: third-lowest +>> +@end lilypond + @strong{@i{Identical rhythms}} In the special case that we want to typeset parallel pieces of music @@ -600,12 +636,54 @@ then works properly. >> @end lilypond -The @code{\shiftOn}, @code{\shiftOnn}, and @code{\shiftOnnn} -commands specify the degree to which chords of the current voice -should be shifted. The outer voices (normally: voices one and -two) have @code{\shiftOff}, while the inner voices (three and -four) have @code{\shiftOn}. @code{\shiftOnn} and -@code{\shiftOnnn} define further shift levels. +The @code{\shiftOn} command allows (but does not force) the notes +in a voice to be shifted. When @code{\shiftOn} is applied to a +voice, a note or chord in that voice is shifted only if its stem +would otherwise collide with a stem from another voice, and only +if the colliding stems point in the same direction. The +@code{\shiftOff} command prevents this type of shifting from +occuring. + +By default, the outer voices (normally voices one and two) have +@code{\shiftOff} specified, while the inner voices (three and +above) have @code{\shiftOn} specified. When a shift is applied, +voices with upstems (odd-numbered voices) are shifted to the +right, and voices with downstems (even-numbered voices) are +shifted to the left. + +Here is an example to help you visualize how an abbreviated +polyphonic expression would be expanded internally. + +@warning{Note that with three or more voices, the vertical order +of voices in your input file should not be the same as the +vertical order of voices on the staff!} + +@lilypond[quote,verbatim] +\new Staff \relative c'' { + %% abbreviated entry + << + { f2 } % 1: highest + \\ + { g,2 } % 2: lowest + \\ + { d'2 } % 3: upper middle + \\ + { b2 } % 4: lower middle + >> + %% internal expansion of the above + << + \new Voice = "1" { \voiceOne \shiftOff f'2 } + \new Voice = "2" { \voiceTwo \shiftOff g,2 } + \new Voice = "3" { \voiceThree \shiftOn d'2 } % shifts right + \new Voice = "4" { \voiceFour \shiftOn b2 } % shifts left + >> +} +@end lilypond + +Two additional commands, @code{\shiftOnn} and @code{\shiftOnnn} +provide further shift levels which may be specified temporarily to +resolve collisions in complex situations -- see +@rlearning{Real music example}. Notes are only merged if they have opposing stem directions (as they have, for example, in voices one and two by default or when diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index f1ae8ebd14..726f852949 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -1823,21 +1823,62 @@ applying to that character. This can be done with markup. Often a specific font is used for this purpose. @lilypond[quote,verbatim,relative=1] -\override TextScript #'font-family = #'typewriter -\override TextScript #'font-size = #2 \clef "G_8" -c4^\markup Kaspar +c4^\markup \fontsize #1 \smallCaps Kaspar c c c \clef "bass" -a4^\markup Melchior +a4^\markup \fontsize #1 \smallCaps Melchior a a a +\clef "G_8" +c4^\markup \fontsize #1 \smallCaps Kaspar +c c c +@end lilypond + +Alternatively, if there are many character changes, it may be +easier to set up @qq{instrument} definitions for each character at +the top level so that @code{\instrumentSwitch} can be used to +indicate each change. + +@lilypond[quote,verbatim] +\addInstrumentDefinition #"kaspar" + #`((instrumentTransposition . ,(ly:make-pitch -1 0 0)) + (shortInstrumentName . "Kas.") + (clefGlyph . "clefs.G") + (clefOctavation . -7) + (middleCPosition . 1) + (clefPosition . -2) + (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar")) + (midiInstrument . "voice oohs")) + +\addInstrumentDefinition #"melchior" + #`((instrumentTransposition . ,(ly:make-pitch 0 0 0)) + (shortInstrumentName . "Mel.") + (clefGlyph . "clefs.F") + (clefOctavation . 0) + (middleCPosition . 6) + (clefPosition . 2) + (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior")) + (midiInstrument . "voice aahs")) + +\relative c' { + \instrumentSwitch "kaspar" + c4 c c c + \instrumentSwitch "melchior" + a4 a a a + \instrumentSwitch "kaspar" + c4 c c c +} @end lilypond @seealso Notation Reference: @ref{Instrument names}, -@ref{Selecting font and font size}, -@ref{Text}. +@ref{Scheme functions}, +@ref{Text}, +@ref{Text markup commands}. + +Extending LilyPond: +@rextend{Markup construction in Scheme}. @node Musical cues @unnumberedsubsubsec Musical cues diff --git a/Documentation/web/community.itexi b/Documentation/web/community.itexi index d8157d403b..b31ea50a63 100644 --- a/Documentation/web/community.itexi +++ b/Documentation/web/community.itexi @@ -464,10 +464,12 @@ account. @end ifset +@c we normally don't allow named references, but in this case +@c it's good to emphasize the "stable" part. -gp @warning{These are @emph{unstable development} versions. If you have the slightest doubt about how to use or install LilyPond, we -urge you to use the stable @ref{Download}, and read the stable -@ref{Manuals}.} +urge you to use the @ref{Download, stable Download}, and read the +@ref{Manuals, stable Manuals}.} @divEnd diff --git a/Documentation/web/introduction.itexi b/Documentation/web/introduction.itexi index 4211358736..780d09ae68 100644 --- a/Documentation/web/introduction.itexi +++ b/Documentation/web/introduction.itexi @@ -1144,6 +1144,12 @@ welcome, though. @uref{http://www.volny.cz/smilauer/rumor/rumor.html,Rumor}, a realtime monophonic MIDI to LilyPond converter. +@item +@uref{http://www.holmessoft.co.uk/homepage/software/NWC2LY/index.htm, +NW2LY} is a C# program which converts a +@uref{http://www.noteworthysoftware.com/, NoteWorthy} song into +LilyPond. + @end itemize @subsubheading Algorithmic code generators @@ -1162,8 +1168,10 @@ to generate music notation from computer music software environments. @item -@uref{http://strasheela.sourceforge.net,Strasheela}, @qq{a -highly expressive constraint-based music composition system.} +@uref{http://strasheela.sourceforge.net,Strasheela}, an +environment built on top of the +@uref{http://www.mozart-oz.org/, Mozart/Oz} constraint programming +language. @end itemize @divEnd diff --git a/Documentation/web/news-front.itexi b/Documentation/web/news-front.itexi index 9f4ca21b4e..a7f1dc96a6 100644 --- a/Documentation/web/news-front.itexi +++ b/Documentation/web/news-front.itexi @@ -18,7 +18,7 @@ with this version. New features since 2.12.3 are listed in the @ref{Development}. One known regression against 2.12.3 still exist: -@uref{http://code.google.com/p/lilypond/issues/detail?id=1263, +@uref{http://code.google.com/p/lilypond/issues/detail?id=1173, Issue 1173 MetronomeMarks cannot be aligned on a note if a multi-measure rest exists in another voice}, but we expect to find more. If you decide to test 2.13.34, do not be surprised to diff --git a/Documentation/web/server/lilypond.org.htaccess b/Documentation/web/server/lilypond.org.htaccess index 3052dc04de..f403698347 100644 --- a/Documentation/web/server/lilypond.org.htaccess +++ b/Documentation/web/server/lilypond.org.htaccess @@ -1,4 +1,18 @@ # htaccess for root dir of lilypond.org +# ---------------------------------------------------- +# The file comes from git master: +# Documentation/web/server/lilypond.org.htaccess +# +# Please do not edit it directly (unless something +# is critically broken); instead, change it in git +# and then do the: +# update-git.sh +# check-git.sh +# copy-git.sh +# make-website.sh +# as discussed in: +# Contributor 5.2 Uploading and security +# ---------------------------------------------------- RewriteEngine On @@ -10,16 +24,20 @@ RewriteCond %{HTTP_USER_AGENT} httrack [NC] RewriteRule ^.*/source/.*$ /please-respect-robots.txt.html [L] # Permanent top level entry points -- ./doc -RedirectMatch ^/music-glossary /doc/Documentation/user/music-glossary/index -RedirectMatch ^/tutorial /doc/Documentation/user/lilypond-learning/Tutorial +RedirectMatch ^/music-glossary /glossary +RedirectMatch ^/tutorial /learning RedirectMatch ^/documentation/$ /doc # Possibly resurrect this with new web site # This breaks the documentation index with old site # RedirectMatch ^/documentation$ /doc -RedirectMatch ^/bugs http://code.google.com/p/lilypond/issues/list +# +RedirectMatch ^/bugs /bug-reports +#RedirectMatch ^/bugs http://code.google.com/p/lilypond/issues/list RedirectMatch ^/wiki http://wiki.lilynet.net -RedirectMatch ^/authors /doc/Documentation/topdocs/AUTHORS -RedirectMatch ^/news /doc/Documentation/topdocs/NEWS +# the new website already has an /authors +#RedirectMatch ^/authors /doc/Documentation/topdocs/AUTHORS +# the new website has news on the main page +RedirectMatch ^/news / RedirectMatch ^/stable /doc/stable RedirectMatch ^/development /doc/development @@ -45,10 +63,7 @@ RedirectMatch ^/index$ / RewriteEngine on RewriteBase / -SetEnvIf REQUEST_URI .* WEB=/web -## To switch over to the new site, we do not even need to put it in /web -## we could do -# SetEnvIf REQUEST_URI .* WEB=/doc/v2.13/Documentation +SetEnvIf REQUEST_URI .* WEB=/website # Rewrite empty to /web RewriteCond %{REQUEST_URI} ^/*$ @@ -69,14 +84,14 @@ RewriteCond %{REQUEST_URI} !.*/$ RewriteCond %{DOCUMENT_ROOT}%{ENV:WEB}%{REQUEST_URI} -d # ...and does not start with /web RewriteCond %{REQUEST_URI} !^%{ENV:WEB} -RewriteCond %{REQUEST_URI} !^/web +RewriteCond %{REQUEST_URI} !^/website # ...and does not start with /doc$ RewriteCond %{REQUEST_URI} !^/doc$ # ...add trailing slash for [menu] and to avoid /web/ in browser url RewriteRule ^(.+)$ http://%{HTTP_HOST}/$1/ [R,QSA,L] # Request that does not start with /web -RewriteCond %{REQUEST_URI} !^/web +RewriteCond %{REQUEST_URI} !^/website RewriteCond %{REQUEST_URI} !^%{ENV:WEB} # ...and does not start with /doc/ RewriteCond %{REQUEST_URI} !^/doc/ diff --git a/VERSION b/VERSION index 3fd750d506..cbfa6917f7 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=13 -PATCH_LEVEL=34 +PATCH_LEVEL=35 MY_PATCH_LEVEL= VERSION_STABLE=2.12.3 -VERSION_DEVEL=2.13.33 +VERSION_DEVEL=2.13.34 diff --git a/input/regression/auto-beam-partial-grace.ly b/input/regression/auto-beam-partial-grace.ly new file mode 100644 index 0000000000..f80c49edc9 --- /dev/null +++ b/input/regression/auto-beam-partial-grace.ly @@ -0,0 +1,13 @@ +\version "2.13.35" + +\header { + texidoc = "Grace notes at the start of a partial measure do not +break autobeaming." +} + +\relative c' { + \partial 4 + \grace e16 + d8 d + c8 c c c c c c c +} diff --git a/input/regression/display-lily-tests.ly b/input/regression/display-lily-tests.ly index 1d8d0097a9..426b61771b 100644 --- a/input/regression/display-lily-tests.ly +++ b/input/regression/display-lily-tests.ly @@ -223,7 +223,7 @@ stderr of this run." %% \partial \test "" ##[ \partial 2 #] \test "" ##[ \partial 8. #] -\test #"TODO? exotic durations in \\partial" ##[ \partial 4*2/3 #] +\test "" ##[ \partial 4*2/3 #] %% \partcombine \test "" ##[ \partcombine { c e } diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index a79245cf6b..30cbcbb0c6 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -141,9 +141,6 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i) void Fingering_engraver::stop_translation_timestep () { - if (!fingerings_.size ()) - return; - fingerings_.clear (); events_.clear (); } diff --git a/lily/partial-iterator.cc b/lily/partial-iterator.cc new file mode 100644 index 0000000000..2e38056e74 --- /dev/null +++ b/lily/partial-iterator.cc @@ -0,0 +1,56 @@ +/* + This file is part of LilyPond, the GNU music typesetter. + + Copyright (C) 2010 Neil Puttock + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ + +#include "context.hh" +#include "input.hh" +#include "international.hh" +#include "moment.hh" +#include "music.hh" +#include "simple-music-iterator.hh" + +class Partial_iterator : public Simple_music_iterator +{ +public: + DECLARE_SCHEME_CALLBACK (constructor, ()); + protected: + virtual void process (Moment); +}; + +void +Partial_iterator::process (Moment m) +{ + if (Duration *dur + = unsmob_duration (get_music ()->get_property ("partial-duration"))) + { + Context *ctx = get_outlet (); + Moment now = ctx->now_mom (); + if (now.main_part_ > Rational (0)) + get_music ()->origin ()-> + warning (_ ("trying to use \\partial after the start of a piece")); + Moment length = Moment (dur->get_length ()); + now = Moment (0, now.grace_part_); + ctx->set_property ("measurePosition", (now - length).smobbed_copy ()); + } + else + programming_error ("invalid duration in \\partial"); + + Simple_music_iterator::process (m); +} + +IMPLEMENT_CTOR_CALLBACK (Partial_iterator); diff --git a/make/website.make b/make/website.make index 2928f53b06..060ca8b3c9 100644 --- a/make/website.make +++ b/make/website.make @@ -16,8 +16,8 @@ ifeq ($(WEBSITE_ONLY_BUILD),1) top-htaccess=$(trusted-dir)/lilypond.org.htaccess dir-htaccess=$(trusted-dir)/website-dir.htaccess TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html - EXAMPLES=$(HOME)/media/ly-examples/ - PICTURES=$(HOME)/media/pictures + EXAMPLES=$(HOME)/lilypond/media/ly-examples/ + PICTURES=$(HOME)/lilypond/media/pictures else ### for normal git script-dir=$(top-src-dir)/scripts/build/ diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 5dc3f420e7..d6c992e537 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -45,27 +45,19 @@ ;;; using `chain-assoc-get' (more on that below) ;;; ;;; args... -;;; the command arguments. There are restrictions on the -;;; possible arguments for a markup command. -;;; First, arguments are distinguished according to their type: -;;; 1) a markup (or a string), corresponding to type predicate `markup?' -;;; 2) a list of markups, corresponding to type predicate `markup-list?' -;;; 3) any scheme object, corresponding to type predicates such as -;;; `list?', 'number?', 'boolean?', etc. -;;; The supported arrangements of arguments, according to their type, are: -;;; - no argument -;;; - markup -;;; - scheme -;;; - markup, markup -;;; - markup-list -;;; - scheme, scheme -;;; - scheme, markup -;;; - scheme, scheme, markup -;;; - scheme, scheme, markup, markup -;;; - scheme, markup, markup -;;; - scheme, scheme, scheme -;;; This combinations are hard-coded in the lexer and in the parser -;;; (lily/lexer.ll and lily/parser.yy) +;;; the command arguments. +;;; There is no limitation on the order of command arguments. +;;; However, markup functions taking a markup as their last +;;; argument are somewhat special as you can apply them to a +;;; markup list, and the result is a markup list where the +;;; markup function (with the specified leading arguments) has +;;; been applied to every element of the original markup list. +;;; +;;; Since replicating the leading arguments for applying a +;;; markup function to a markup list is cheap mostly for +;;; Scheme arguments, you avoid performance pitfalls by just +;;; using Scheme arguments for the leading arguments of markup +;;; functions that take a markup as their last argument. ;;; ;;; args-signature ;;; the arguments signature, i.e. a list of type predicates which diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm index 03df67ab82..3b896a2450 100644 --- a/scm/define-music-display-methods.scm +++ b/scm/define-music-display-methods.scm @@ -1013,29 +1013,6 @@ Otherwise, return #f." (format #f "\\bar \"~a\"~a" ?bar-type (new-line->lily-string)))) ;;; \partial -(define (duration->moment ly-duration) - (let ((log2 (ly:duration-log ly-duration)) - (dots (ly:duration-dot-count ly-duration)) - (num+den (ly:duration-factor ly-duration))) - (let* ((m (expt 2 (- log2))) - (factor (/ (car num+den) (cdr num+den)))) - (/ (do ((i 0 (1+ i)) - (delta (/ m 2) (/ delta 2))) - ((= i dots) m) - (set! m (+ m delta))) - factor)))) - -(define moment-duration-alist (map (lambda (duration) - (cons (duration->moment duration) - duration)) - (append-map (lambda (log2) - (map (lambda (dots) - (ly:make-duration log2 dots 1 1)) - (list 0 1 2 3))) - (list 0 1 2 3 4)))) - -(define (moment->duration moment) - (assoc-get (- moment) moment-duration-alist)) (define-extra-display-method ContextSpeccedMusic (expr parser) "If `expr' is a partial measure, return \"\\partial ...\". @@ -1046,13 +1023,12 @@ Otherwise, return #f." 'ContextSpeccedMusic context-type 'Timing element (music - 'PropertySet - value ?moment - symbol 'measurePosition)))) - (let ((duration (moment->duration (/ (ly:moment-main-numerator ?moment) - (ly:moment-main-denominator ?moment))))) - (and duration (format #f "\\partial ~a" (duration->lily-string duration - #:force-duration #t)))))) + 'PartialSet + partial-duration ?duration)))) + + (and ?duration + (format #f "\\partial ~a" + (duration->lily-string ?duration #:force-duration #t))))) ;;; ;;; diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm index ebd48794ba..d7b602afe7 100644 --- a/scm/define-music-properties.scm +++ b/scm/define-music-properties.scm @@ -126,6 +126,8 @@ top-level, a page marker object is instanciated instead of a score.") (page-turn-permission ,symbol? "When the music is at top-level, whether to allow, forbid or force a page turn.") (parenthesize ,boolean? "Enclose resulting objects in parentheses?") + (partial-duration ,ly:duration? "The length of a partial measure as a +duration.") (part-combine-status ,symbol? "Change to what kind of state? Options are @code{solo1}, @code{solo2} and @code{unisono}.") (pitch ,ly:pitch? "The pitch of this note.") diff --git a/scm/define-music-types.scm b/scm/define-music-types.scm index 7f4525e001..4b446d72b7 100644 --- a/scm/define-music-types.scm +++ b/scm/define-music-types.scm @@ -349,6 +349,12 @@ Syntax: @code{\\override} [ @var{context} @code{.} ] (types . (general-music break-event page-turn-event event)) )) + (PartialSet + . ((description . "Create an anacrusis or upbeat (partial measure).") + (iterator-ctor . ,ly:partial-iterator::constructor) + (types . (general-music partial-set)) + )) + (PartCombineMusic . ((description . "Combine two parts on a staff, either merged or as separate voices.") diff --git a/scm/ly-syntax-constructors.scm b/scm/ly-syntax-constructors.scm index decc515361..82aee84d0a 100644 --- a/scm/ly-syntax-constructors.scm +++ b/scm/ly-syntax-constructors.scm @@ -248,12 +248,14 @@ into a @code{MultiMeasureTextEvent}." (set! (ly:music-property ev 'label) label) ch)))) -(define-ly-syntax-simple (partial dur) +(define-ly-syntax (partial parser location dur) "Make a partial measure." - (let ((mom (ly:moment-sub ZERO-MOMENT (ly:duration-length dur)))) - ;; We use `descend-to-context' here instead of `context-spec-music' to - ;; ensure \partial still works if the Timing_translator is moved + ;; We use `descend-to-context' here instead of `context-spec-music' to + ;; ensure \partial still works if the Timing_translator is moved (descend-to-context - (context-spec-music (make-property-set 'measurePosition mom) 'Timing) - 'Score))) + (context-spec-music (make-music 'PartialSet + 'origin location + 'partial-duration dur) + 'Timing) + 'Score)) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 4a322b5b50..95587b8670 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -134,7 +134,7 @@ For instance, ((and (not (string? arg)) (markup? arg)) ;; a markup (inner-markup->make-markup arg)) (else ;; scheme arg - arg))) + (music->make-music arg)))) (define (inner-markup->make-markup mrkup) (if (string? mrkup) `(#:simple ,mrkup)