From 98501fa67c6d1c546ac0531724bae8f46c9970b2 Mon Sep 17 00:00:00 2001 From: hanwen Date: Mon, 30 Jun 2003 13:18:44 +0000 Subject: [PATCH] * python/lilylib.py (make_ps_images): bugfixes. * input/regression/volta-multi-staff.ly: new file. * Documentation/user/macros.itexi: refcommands, refcommand macros. * Documentation/user/tutorial.itely (Piano staffs): new section. (Setting variables): new section (Fine tuning layout): new section * input/just-friends.ly (Subject): remove file. Superseeded by input/test/chords-without-melody.ly * ly/property-init.ly: add all commands to refman. * scm/define-translator-properties.scm: remove graceAccidentalSpace, graceAlignPosition, keyOctaviation * mf/parmesan-custodes.mf (dir_down): remove underscore from glyph name. Underscores botch up PS output. * scm/define-translator-properties.scm: remove textNonEmpty (beatLength): change from oneBeat. (repeatCommands): remove regularSpacingDelta * lily/timing-engraver.cc (start_translation_timestep): change barNonAuto to automaticBars --- ChangeLog | 26 ++++ Documentation/user/macros.itexi | 13 ++ Documentation/user/music-glossary.tely | 82 +++++----- Documentation/user/preface.itely | 2 +- Documentation/user/refman.itely | 197 ++++++++++++++++++++++++- Documentation/user/tutorial.itely | 149 ++++++++++++++++--- input/just-friends.ly | 79 ---------- input/regression/volta-multi-staff.ly | 27 ++++ input/test/slur-attachment-override.ly | 5 + lily/collision-engraver.cc | 3 +- lily/timing-engraver.cc | 2 +- ly/property-init.ly | 36 ++--- mf/parmesan-custodes.mf | 6 +- python/lilylib.py | 4 +- scm/define-translator-properties.scm | 67 ++++----- 15 files changed, 487 insertions(+), 211 deletions(-) delete mode 100644 input/just-friends.ly create mode 100644 input/regression/volta-multi-staff.ly diff --git a/ChangeLog b/ChangeLog index 93d1468f6a..ccbddc92b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,31 @@ 2003-06-30 Han-Wen Nienhuys + * python/lilylib.py (make_ps_images): bugfixes. + + * input/regression/volta-multi-staff.ly: new file. + + * Documentation/user/macros.itexi: refcommands, refcommand macros. + + * Documentation/user/tutorial.itely (Piano staffs): new section. + (Setting variables): new section + (Fine tuning layout): new section + + * input/just-friends.ly (Subject): remove file. Superseeded by + input/test/chords-without-melody.ly + + * ly/property-init.ly: add all commands to refman. + + * scm/define-translator-properties.scm: remove + graceAccidentalSpace, graceAlignPosition, keyOctaviation + + * mf/parmesan-custodes.mf (dir_down): remove underscore from glyph + name. Underscores botch up PS output. + + * scm/define-translator-properties.scm: remove + textNonEmpty + (beatLength): change from oneBeat. + (repeatCommands): remove regularSpacingDelta + * scripts/convert-ly.py (FatalConversionError.conv): conversion rule for automaticBars. diff --git a/Documentation/user/macros.itexi b/Documentation/user/macros.itexi index ea010f304f..aae87bb73f 100644 --- a/Documentation/user/macros.itexi +++ b/Documentation/user/macros.itexi @@ -146,6 +146,19 @@ internals document, @internalsref{\NAME\} @noindent @end macro +@macro refcommands +@noindent +@strong{Predefined commands} + +@noindent +@end macro + + +@macro refcommand{WHAT} +@cindex @code{\WHAT\} +@code{\WHAT\} +@end macro + @macro syntax @noindent @strong{Syntax} diff --git a/Documentation/user/music-glossary.tely b/Documentation/user/music-glossary.tely index 6915a66930..923d97a85a 100644 --- a/Documentation/user/music-glossary.tely +++ b/Documentation/user/music-glossary.tely @@ -171,7 +171,7 @@ flat lowers it by a whole tone. A natural cancels the effect of a previous accidental. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Voice.TextScript \set #'font-style = #'large \addlyrics \context Staff \notes\relative c'' { @@ -281,7 +281,7 @@ FI: luonnollinen molliasteikko, N: ?. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { a1 b c d e f g a } @end lilypond @@ -530,7 +530,7 @@ Line connecting a series of notes (shorter than a quarter note). The number of beams determine the note value of the connected notes. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Voice.TextScript \set #'font-style = #'large \notes\relative c'' { [g8_"1/8" g g g] s16 @@ -635,7 +635,7 @@ N: ?. in pre-1650 music. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { g\breve } @end lilypond @@ -665,7 +665,7 @@ Clef symbol indicating the position of the central C. Used on all note lines. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.Clef \override #'full-size-change = ##t \property Score.LyricText \set #'font-style = #'large \addlyrics @@ -764,7 +764,7 @@ third above the lower notes to define their quality as major or minor. Such chords are denoted open chords @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Voice.TextScript \set #'font-style = #'large \addlyrics \context Staff \notes\relative c'' { @@ -796,7 +796,7 @@ N: ?. A scale consisting of all 11 @aref{semitone}s. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c' { c1 cis d dis e f fis g gis a ais b c } @end lilypond @@ -1167,7 +1167,7 @@ The church modes are used in gregorial chant and pre baroque early music but also to some extent in newer jazz music. @lilypond[13pt,notime,linewidth=110mm] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1182,7 +1182,7 @@ also to some extent in newer jazz music. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1197,7 +1197,7 @@ also to some extent in newer jazz music. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1211,7 +1211,7 @@ also to some extent in newer jazz music. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1226,7 +1226,7 @@ also to some extent in newer jazz music. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1240,7 +1240,7 @@ also to some extent in newer jazz music. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1260,7 +1260,7 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and 7th tone. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1275,7 +1275,7 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1290,7 +1290,7 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1305,7 +1305,7 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1651,7 +1651,7 @@ Two notes, intervals, or scales are enharmonic if they have different names but equal pitch. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \addlyrics \context Staff \notes\relative c'' { @@ -1722,7 +1722,7 @@ symbol indicates playing an octave lower (for example on double bass @aref{strings}). @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Staff.Clef \override #'full-size-change = ##t \property Score.LyricText \set #'font-style = #'large \addlyrics @@ -1815,7 +1815,7 @@ less than a quarter note. The number of flags determines the @aref{note value}. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \notes\relative c'' { g8_"1/8" s8 @@ -1899,7 +1899,7 @@ dominant (D, the chord on the fifth note). Other are considered to be variants of the base chords. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -1938,7 +1938,7 @@ indicates playing or singing an octave lower (most tenor parts in choral scores are notated like that). @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Staff.Clef \set #'full-size-change = ##t \property Score.LyricText \set #'font-style = #'large \addlyrics @@ -2096,7 +2096,7 @@ Tones sounding simultaneously. Two note harmonies fall into the categories Consonances: @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \context Voice \notes\relative c'' { <>1_"unisone " s @@ -2112,7 +2112,7 @@ Consonances: Dissonances: @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \context Voice \notes\relative c'' { <>1_"second " s s @@ -2155,7 +2155,7 @@ because they consist of three @aref{whole tone}s. The addition of such two forms an octave. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -2176,7 +2176,7 @@ of such two forms an octave. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -2197,7 +2197,7 @@ of such two forms an octave. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large \property Score.TextScript \set #'font-style = #'large \addlyrics @@ -2231,7 +2231,7 @@ N: ?. The difference between an interval and an octave. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \context Staff \notes\relative c'' { << g a >>1_"second " s s << g' a, >>_"seventh " s s \bar "||" @@ -2325,7 +2325,7 @@ N: ?. A ledger line is an extension of the staff. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { a,1 s c'' } @end lilypond @@ -2345,7 +2345,7 @@ unlike @emph{leggiero} or @emph{non-legato} (b), @emph{portato} (c) and @aref{staccato} (d). @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \addlyrics \context Staff \notes\relative c'' { c4( d )e \bar "||" @@ -2420,7 +2420,7 @@ Note value: double length of @aref{breve}. @aref{note value}. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { \property Voice.NoteHead \set #'style = #'mensural g\longa @@ -2622,7 +2622,7 @@ N: ?. First C below the 440 Hz A. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Staff.Clef \set #'full-size-change = ##t \notes\relative c' { \clef bass c1 s @@ -2846,7 +2846,7 @@ but sometimes (mostly in pre baroque music) the double length note value @lilypond[13pt,notime] \property Score.TextScript \set #'font-style = #'large -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { \property Voice.NoteHead \override #'style = #'mensural g\longa_"longa" g\breve_"breve" @@ -2857,7 +2857,7 @@ but sometimes (mostly in pre baroque music) the double length note value @lilypond[13pt,notime] \property Score.TextScript \set #'font-style = #'large -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { r\longa_"longa" r\breve_"breve" r1_"1/1" r2_"1/2" r4_"1/4" s16 r8_"1/8" s16 @@ -3226,7 +3226,7 @@ N: ?. with the same @aref{key signature}. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \notes\relative c' { \key es \major @@ -3236,7 +3236,7 @@ with the same @aref{key signature}. @end lilypond @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \notes\relative c' { \key es \major @@ -3354,7 +3354,7 @@ roots of chords. The most important are degrees I = tonic (T), IV = sub@-do@-mi@-nant (S) and V = dominant (D). @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.LyricText \set #'font-style = #'large %\property Lyrics.minVerticalAlign = #8 \addlyrics @@ -3418,7 +3418,7 @@ semitone. An octave may be divided into 12@w{ }semitones. @aref{interval}, @aref{chromatic scale}. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { g1 gis s a bes s b! c } @end lilypond @@ -3671,7 +3671,7 @@ whole note. @aref{beam}. @lilypond[13pt,notime] \property Score.autoBeaming = ##f -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \notes\relative c'' { g2_"1/2" g' s16 @@ -3999,7 +3999,7 @@ connects two succesive notes of the same pitch, and which has the function of uniting them into a single sound equal to the combined durations. @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \notes\relative c'' { g2 ~ g4. } @end lilypond @@ -4110,7 +4110,7 @@ a @aref{chord}, usually in the distance of a third (@aref{interval}). @lilypond[13pt,notime] -\property Score.barNonAuto = ##t +\property Score.automaticBars = ##f \property Score.TextScript \set #'font-style = #'large \notes\relative c' { e2:32_"a" diff --git a/Documentation/user/preface.itely b/Documentation/user/preface.itely index 653dd0668e..55717cb341 100644 --- a/Documentation/user/preface.itely +++ b/Documentation/user/preface.itely @@ -27,7 +27,7 @@ Special thanks for version 1.8 go out to Juergen Reuter for lots of work on the ancient notation engine, and to Amy Zapf for pushing us to rewrite the chord name support -[wie meer?] +@c TODO [wie meer?] Han-Wen and Jan, Utrecht/Eindhoven, April/May 2003 diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 6cb8210c4a..cfa40c7745 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -55,6 +55,7 @@ * Rests:: * Skips:: * Durations:: +* Stems:: * Ties:: * Tuplets:: * Easy Notation note heads :: @@ -149,8 +150,24 @@ The verbose syntax for pitch specification is \pitch @var{scmpitch} @end example + where @var{scmpitch} is a Scheme object of the @code{Pitch} type. +@refcommands + +Dots are normally moved up to avoid staff lines, except in polyphonic +situations. The following commands may be used to force a particular +direction manually. + +@refcommand dotsUp +@refcommand dotsDown +@refcommand dotsBoth + +Notes can be hidden and unhidden with the following commands. + +@refcommand hideNotes +@refcommand unHideNotes + @seealso @@ -338,6 +355,20 @@ Dot placement for chords is not perfect. In some cases, dots overlap: <>4. @end lilypond +@node Stems +@subsection Stems + +Whenever a note is found, a +@internalsref{Stem} object is created automatically. For whole notes +and rests, stem objects are also created, but in those cases, the stem +is invisible. + +@refcommands + +@refcommand \stemUp +@refcommand \stemDown +@refcommand \stemBoth + @node Ties @subsection Ties @@ -368,6 +399,14 @@ exactly the same concept. If you need to tie notes over bars, it may be easier to use automatic note splitting (See @ref{Automatic note splitting}). +@refcommands + + +@refcommand tieUp +@refcommand tieDown +@refcommand tieBoth +@refcommand tieDotted +@refcommand tieSolid @seealso @@ -436,6 +475,13 @@ instead. @cindex @code{tupletNumberFormatFunction} @cindex tuplet formatting + +@refcommands + +@refcommand tupletUp +@refcommand tupletDown +@refcommand tupletBoth + @seealso @seeinternals{TupletBracket}, @seeinternals{TimeScaledMusic}. @@ -956,6 +1002,12 @@ music (e.g. cadenzas), this is not desirable. By setting @code{Score.timing} to false, this automatic timing can be switched off. + +@refcommands + +@refcommand cadenzaOn +@refcommand cadenzaOff + @node Bar lines @subsection Bar lines @cindex Bar lines @@ -1088,10 +1140,34 @@ Similarly, you can merge half note heads with eighth notes, by setting LilyPond also vertically shifts rests that are opposite of a stem. + @lilypond[singleline,fragment,verbatim] \context Voice < c''4 \\ r4 > @end lilypond + +@refcommands + + + +@refcommand oneVoice +@refcommand voiceOne +@refcommand voiceTwo +@refcommand voiceThree +@refcommand voiceFour + +The following commands specify in what chords of the current voice +should be shifted: the outer voice has @code{\shiftOff}, and the inner +voices have @code{\shiftOn}, @code{\shiftOnn}, etc. + + +@refcommand shiftOn +@refcommand shiftOnn +@refcommand shiftOnnn +@refcommand shiftOff + + + @seealso The objects responsible for resolving collisions are @@ -1296,6 +1372,11 @@ For melodies that have lyrics, you may want to switch off automatic beaming. This is done by setting @code{Voice.autoBeaming} to @code{#f}. +@refcommands + +@refcommand autoBeamOff +@refcommand autoBeamOn + @refbugs @@ -1507,6 +1588,19 @@ voices in the same staff share accidentals, but staves do not. @end table +@refcommands + +@refcommand defaultAccidentals +@refcommand voiceAccidentals +@refcommand modernAccidentals +@refcommand modernCautionaries +@refcommand modernVoiceAccidentals +@refcommand modernVoiceCautionaries +@refcommand pianoAccidentals +@refcommand pianoCautionaries +@refcommand noResetKey +@refcommand forgetAccidentals + @seealso @internalsref{Accidental_engraver}, @internalsref{Accidental}, @@ -1595,6 +1689,15 @@ stems might look better: d,32-( d'4 d8..-) @end lilypond +@refcommands + + +@refcommand slurUp +@refcommand slurDown +@refcommand slurBoth +@refcommand slurDotted +@refcommand slurSolid + @seealso @seeinternals{Slur}, @internalsref{SlurEvent}. @@ -1632,6 +1735,12 @@ should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth} will only affect normal slurs and not phrasing slurs. +@refcommands + +@refcommand phrasingSlurUp +@refcommand phrasingSlurDown +@refcommand phrasingSlurBoth + @seealso See also @internalsref{PhrasingSlur}, @@ -1818,6 +1927,13 @@ using @code{^} and @code{_}. @lilypondfile[notexidoc]{script-chart.ly} + +@refcommands + +@refcommand scriptUp +@refcommand scriptDown +@refcommand scriptBoth + @seealso @internalsref{ScriptEvent}, @internalsref{Script}. @@ -2155,6 +2271,15 @@ You can also supply your own texts: @cindex diminuendo + +@refcommands + +@refcommand dynamicUp +@refcommand dynamicDown +@refcommand dynamicBoth + +@cindex direction, of dynamics + @seealso @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, @@ -2166,12 +2291,7 @@ handled by the @internalsref{DynamicLineSpanner} object. If you want to adjust padding or vertical direction of the dynamics, you must set properties for the @internalsref{DynamicLineSpanner} -object. Predefined variables to set the vertical direction are -@code{\dynamicUp} and @code{\dynamicDown}. - -@cindex direction, of dynamics -@cindex @code{\dynamicDown} -@cindex @code{\dynamicUp} +object. @node Repeats @@ -2940,6 +3060,10 @@ arpeggiate the chord. To draw these brackets, set the <>-\arpeggio @end lilypond +@refcommands + +@refcommand arpeggioBracket +@refcommand arpeggio @refbugs @@ -2974,6 +3098,11 @@ can be printed automatically. This is enabled if the property The associated object is @internalsref{VoiceFollower}. +@refcommands + +@refcommand showStaffSwitch +@refcommand hideStaffSwitch + @node Vocal music @section Vocal music @@ -3660,6 +3789,12 @@ in lower case for the base note. @end table +@refcommands + +@refcommand germanChords +@refcommand semiGermanChords + + @seealso @inputfileref{input/regression,chord-name-major7.ly}, @@ -6524,6 +6659,7 @@ affecting a whole set of objects. Second, you can select one specific object, and set a object property in that object. @menu +* Predefined variables:: * Tuning objects :: * Applyoutput:: * Outputproperty:: @@ -6531,6 +6667,43 @@ object, and set a object property in that object. * Text markup:: @end menu +@node Predefined variables +@subsection Predefined variables + + + +slurUp +slurDown +slurBoth + +slurDotted +slurSolid + +phrasingSlurUp +phrasingSlurDown +phrasingSlurBoth + +shiftOn +shiftOnn +shiftOnnn +shiftOff + + +dynamicUp +dynamicDown +dynamicBoth + +scriptUp +scriptDown +scriptBoth + +dotsUp +dotsDown +dotsBoth + + + + @node Tuning objects @subsection Tuning objects @@ -6820,7 +6993,13 @@ to override default setting, which are always present. For example: @cindex @code{font-style} +@refcommands +The following commands set @code{fontSize} for the current voice. + +@refcommand tiny +@refcommand small +@refcommand normalsize @refbugs @@ -7344,6 +7523,7 @@ the @file{.tex} output to instruct @TeX{} where to break pages. This is done by setting the @code{between-systems-strings} on the @internalsref{NonMusicalPaperColumn} where the system is broken. An example is shown in @inputfileref{input/regression,between-systems.ly}. +The predefined command @code{\newpage} also does this. @cindex paper size @cindex page size @@ -7365,6 +7545,11 @@ will set the paper variables @code{hsize} and @code{vsize} (used by Lilypond and @code{ly2dvi}) +@refcommands + +@refcommand newpage + + @seealso @ref{Invoking ly2dvi}, diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 8bf2376cf3..c964919210 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -23,8 +23,9 @@ * Titling :: * Single staff polyphony :: * Piano staffs:: +* Setting variables:: +* Fine tuning layout:: * Organising larger pieces:: -* Fine tuning a piece:: * An orchestral part:: * Integrating text and music:: Integrating text and music @end menu @@ -868,7 +869,7 @@ line}. It is entered as two underscores, i.e., \times 2/3 { f g g } \times 2/3 { g4-( a2-) } %% ugh, this is to deal with bugs in the extender implementation - \blankNotes + \hideNotes c8 } \context Lyrics \lyrics { I want to break free __ } @@ -1116,6 +1117,121 @@ More information on formatting piano music is in @ref{Piano music}. @node Setting variables @section Setting variables +When the music is converted from notes to print, it is interpreted +from left-to-right order, similar to what happens when we read +music. During this step, context-sensitive information, such as the +accidentals to print, and where barlines must be placed, are stored in +variables. These variables are called @emph{translation properties}. +The properties can also be manipulated from input files: for example, +@example +\property Staff.autoBeaming = ##f +@end example +sets the property named @code{autoBeaming} in the current staff to +@code{##f} which means `false'. This property controls whether beams +are printed automatically: +@lilypond[relative 1,fragment,verbatim] + c8 c c c + \property Staff.autoBeaming = ##f + c8 c c c +@end lilypond + +@noindent +LilyPond includes a built-in programming language, namely, a dialect +of Scheme. The argument to @code{\property}, @code{##f}, is an +expression in that language. The first hash-mark signals that a piece +of Scheme code follows. The second hash character is part of the +boolean value true (@code{#t}). Values of other types may be +entered as follows +@itemize @bullet +@item a string, enclosed in double quotes, for example +@example + \property Staff.instrument = #"French Horn" +@end example +@item a boolean: either @code{#t} or @code{#f}, for true and false +respectively, e.g. +@example + \property Voice.autoBeaming = ##f + \property Score.skipBars = ##t +@end example + +@item a number +@example + \property Score.currentBarNumber = #20 +@end example + +@item a symbol, which is introduced by a quote character, +@example + \property Staff.crescendoSpanner = #'dashed-line +@end example + +@item a pair, which is also introduced by a quote character. +The following statements set properties to the pairs (-7.5, 6) and +(3, 4) respectively. + +@example + \property Staff.minimumVerticalExtent = #'(-7.5 . 6) + \property Staff.timeSignatureFraction = #'(3 . 4) +@end example + + +@end itemize + +There are many different properties, and not all of them are listed in +this manual. However, the internal documentation lists them all in the +@internalsref{All translation properties}, and almost all properties +are demonstrated in one of the +@ifhtml +@uref{../../../input/test/out-www/collated-files.html,tips-and-tricks} +@end ifhtml +@ifnothtml +tips-and-tricks +@end ifnothtml +examples. + + +@node Fine tuning layout +@section Fine tuning layout + +Sometimes it is necessary to change music layout by hand. When music +is formatted, layout objects are created for each symbol. For +example, every clef and every note head is represented by a layout +object. These layout objects also carry variables, which +we call @emph{layout properties}. By changing these variables, we can +alter the look of a formatted score. + +@lilypond[verbatim,relative 0] + c4 + \property Voice.Stem \override #'thickness = #3.0 + c4 c4 c4 +@end lilypond + +@noindent +In the example shown here, the layout property @code{thickness} (a +symbol) is set to 3 in the @code{Stem} layout objects of the current +Voice. As a result, the notes following @code{\property} have thicker +stems. + +In most cases of manual overrides, only a single object must be +changed. This can be achieved by prefix @code{\once} to the +@code{\property} statement, i.e., + +@example + \once \property Voice.Stem \set #'thickness = #3.0 +@end example + +@lilypond[relative 0] + c4 + \once \property Voice.Stem \set #'thickness = #3.0 + c4 c4 c4 +@end lilypond + +@noindent +Some overrides are so common that predefined commands are provided as +a short cut. For example, @code{\slurUp} and @code{\stemDown}. These +commands are described in the @ref{Notation manual}. + + + @node Organising larger pieces @@ -1123,23 +1239,8 @@ More information on formatting piano music is in @ref{Piano music}. TODO: discuss identifiers, p&c, . -@separate -@example -\version "1.5.72" -@end example -Lilypond and its language are still under development, and -occasionally details of the syntax are changed. The @code{version} -fragment indicates which LilyPond version the input file was written -for. When you compile this file, the version number will be -checked. When the file is too old, a warning is issued. The version -number is also used by the @code{convert-ly} program (See -@ref{Invoking convert-ly}), which updates the file to the latest -version automatically. - -@node Fine tuning a piece -@section Fine tuning a piece In this section we show some ways to fine tune the final output of a piece. We do so using a single measure of a moderately complex piano @@ -1204,7 +1305,7 @@ internals document. This is a set of HTML pages which should be included if you installed a binary distribution. [TODO: revise for new site.] These HTML pages are also available on the web: go to the LilyPond website, click ``Documentation: Index'' on the side bar, look -in the ``Information for uses'' section, and click on ``Documentation +in the ``Information for users'' section, and click on ``Documentation of internals.'' You might want to bookmark either the HTML files on your disk, or the @@ -1407,6 +1508,18 @@ TODO: \markup, mmrest, transposing, cue notes, identifiers?. +@separate +@example +\version "1.5.72" +@end example +Lilypond and its language are still under development, and +occasionally details of the syntax are changed. The @code{version} +fragment indicates which LilyPond version the input file was written +for. When you compile this file, the version number will be +checked. When the file is too old, a warning is issued. The version +number is also used by the @code{convert-ly} program (See +@ref{Invoking convert-ly}), which updates the file to the latest +version automatically. @node Integrating text and music @section Integrating text and music diff --git a/input/just-friends.ly b/input/just-friends.ly deleted file mode 100644 index b6a8eb4d29..0000000000 --- a/input/just-friends.ly +++ /dev/null @@ -1,79 +0,0 @@ -\version "1.7.18" -\header { - filename = "just-friends.ly" - title = "Just Friends" - description = "Jazz chords example with bar lines" - opus = "" - source = "mutex@gmd.de" - composer = "" - enteredby = "jcn" - copyright = "Public Domain" -} - -%{ -In response to - -Message-Id: <19990206153950.A7474@gil.physik.rwth-aachen.de> -Date: Sat, 6 Feb 1999 15:39:50 +0100 -From: Christoph Kukulies -Subject: chord bars - -I was looking out for a FAQ on the www.gmd.de/Misc/Music page but didn't -find any so bear with me when asking a FAQ question: - -I want to generate some sheets that contain only the chords (changes) -of a certain tune (Jazz, Real Book, for example), like - - Just Friends - -[...] - -%} - -%{ - -FIXME - -This should (and once used to) look like: - - | Fmaj7 | Fmaj7 | F7 | Bes7 | - -but all bar lines (note bar line at line start) are now gone. - -%} - -\score{ - \context ChordNames \chords{ - \property Score.barAtLineStart = 1 - \repeat volta 2 { - f1:maj f:maj f:7 bes:7 - c:maj c:maj es es - d:7 g:7 b2:7/fis e:7 a1:7\break - d:7 d:7 d:7 g2:7 ges:7 - - f1:maj f1:maj f:7 bes:7 - c:maj c:maj es es - d:7 g:7 b2:7/fis e:7 a1:7\break - d:7 d2:7 g:7 c1:6 g2:7 c:7 - } - } - \paper{ - indent = 0.0\mm - linewidth = 120.0\mm - \translator{ - \ChordNamesContext - barNonAuto = ##f - - % added - barAuto = ##t - defaultBarType = #"|" - Bar \override #'bar-size = #4 - %ChordName \override #'word-space = #3 - - \consists Bar_engraver - \consists "Volta_engraver" - } - } -} - - diff --git a/input/regression/volta-multi-staff.ly b/input/regression/volta-multi-staff.ly new file mode 100644 index 0000000000..c0a3c0c2f7 --- /dev/null +++ b/input/regression/volta-multi-staff.ly @@ -0,0 +1,27 @@ +\header { + + texidoc = "By setting @code{voltaOnThisStaff}, repeats can be put on more staffs in a score." + +} +\version "1.7.22" + + +vmus = \notes { \repeat volta 2 c1 \alternative { d e } } + +\score { + + \notes \relative c'' < + \context StaffGroup = SGA < + \context Staff \vmus + \context Staff = SB \vmus + > + \context StaffGroup = SGB < + \context Staff =SC < + \property Staff.voltaOnThisStaff = ##t + \vmus > + \context Staff = SD \vmus + > + > + + \paper { raggedright = ##t } +} diff --git a/input/test/slur-attachment-override.ly b/input/test/slur-attachment-override.ly index fcac5a2eea..75b08033f5 100644 --- a/input/test/slur-attachment-override.ly +++ b/input/test/slur-attachment-override.ly @@ -5,6 +5,11 @@ texidoc="@cindex Slur Attachment Override In some cases you may want to set slur attachments by hand. " } + +%% +%% except that both slurs are stem <-> stem. +%% + fragment = \notes { \property Voice.autoBeaming = ##f \property Voice.Stem \set #'direction = #1 diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index c1c08fd3bd..ede88e3af2 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -15,7 +15,8 @@ /* collect Note_column, and as soon as there are 2 or more, put them in a collision object. */ -class Collision_engraver : public Engraver { +class Collision_engraver : public Engraver +{ Item * col_; Link_array note_columns_; diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index b289b95239..be0fa1aef6 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -95,5 +95,5 @@ ENTER_DESCRIPTION (Timing_engraver, /* creats*/ "", /* accepts */ "", /* acks */ "", -/* reads */ "timeSignatureFraction automaticBars whichBar barAlways defaultBarType skipBars timing oneBeat measureLength measurePosition currentBarNumber", +/* reads */ "timeSignatureFraction automaticBars whichBar barAlways defaultBarType skipBars timing measureLength measurePosition currentBarNumber", /* write */ ""); diff --git a/ly/property-init.ly b/ly/property-init.ly index 6946a6d981..b13f712c37 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -10,6 +10,11 @@ slurUp = \property Voice.Slur \set #'direction = #1 slurDown = \property Voice.Slur \set #'direction = #-1 slurBoth = \property Voice.Slur \revert #'direction +% There's also dash, but setting dash period/length should be fixed. +slurDotted = \property Voice.Slur \set #'dashed = #1 +slurSolid = \property Voice.Slur \revert #'dashed + + phrasingSlurUp = \property Voice.PhrasingSlur \set #'direction = #1 phrasingSlurDown = \property Voice.PhrasingSlur \set #'direction = #-1 phrasingSlurBoth = \property Voice.PhrasingSlur \revert #'direction @@ -23,6 +28,10 @@ tieUp = \property Voice.Tie \set #'direction = #1 tieDown = \property Voice.Tie \set #'direction = #-1 tieBoth = \property Voice.Tie \revert #'direction +tieDotted = \property Voice.Tie \set #'dashed = #1 +tieSolid = \property Voice.Tie \revert #'dashed + + dynamicUp = { \property Voice.DynamicText \set #'direction = #1 \property Voice.DynamicLineSpanner \set #'direction = #1 @@ -53,16 +62,9 @@ dotsUp = \property Voice.Dots \set #'direction = #1 dotsDown = \property Voice.Dots \set #'direction = #-1 dotsBoth = \property Voice.Dots \revert #'direction -% why doubly? -tupletUp = { - \property Voice.TupletBracket \set #'direction = #1 -} -tupletDown = { - \property Voice.TupletBracket \set #'direction = #-1 -} -tupletBoth = { - \property Voice.TupletBracket \revert #'direction -} +tupletUp = \property Voice.TupletBracket \set #'direction = #1 +tupletDown = \property Voice.TupletBracket \set #'direction = #-1 +tupletBoth = \property Voice.TupletBracket \revert #'direction cadenzaOn = \property Timing.timing = ##f cadenzaOff = { @@ -85,12 +87,6 @@ voiceTwo = #(context-spec-music (make-voice-props-set 1) "Voice") voiceThree =#(context-spec-music (make-voice-props-set 2) "Voice") voiceFour = #(context-spec-music (make-voice-props-set 3) "Voice") -% There's also dash, but setting dash period/length should be fixed. -slurDotted = \property Voice.Slur \set #'dashed = #1 -slurSolid = \property Voice.Slur \revert #'dashed -tieDotted = \property Voice.Tie \set #'dashed = #1 -tieSolid = \property Voice.Tie \revert #'dashed - tiny = \property Voice.fontSize= #-2 @@ -98,18 +94,10 @@ tiny = small = \property Voice.fontSize= #-1 - normalsize = { \property Voice.fontSize= #0 } -normalkey = { - \property Staff.keyOctaviation = ##f -} - -specialkey = { - \property Staff.keyOctaviation = ##t -} % End the incipit and print a ``normal line start''. endincipit = \notes{ diff --git a/mf/parmesan-custodes.mf b/mf/parmesan-custodes.mf index b4a0be94a0..047ba69f5c 100644 --- a/mf/parmesan-custodes.mf +++ b/mf/parmesan-custodes.mf @@ -154,15 +154,15 @@ def custos_medicaea(expr verbose_name, internal_name, ly_name, enddef; % custos medicaea, stem up, between staff lines -custos_medicaea("Custos Med.", "medicaea-u0", "medicaea_u0", +custos_medicaea("Custos Med.", "medicaea-u0", "medicaeau0", dir_up, between_staff_lines); % custos medicaea, stem up, on staff line -custos_medicaea("Custos Med.", "medicaea-u1", "medicaea_u1", +custos_medicaea("Custos Med.", "medicaea-u1", "medicaeau1", dir_up, on_staff_line); % custos medicaea, stem up, anywhere -custos_medicaea("Custos Med.", "medicaea-u2", "medicaea_u2", +custos_medicaea("Custos Med.", "medicaea-u2", "medicaeau2", dir_up, anywhere); % custos medicaea, stem down, between staff lines diff --git a/python/lilylib.py b/python/lilylib.py index 996277fb22..e3ae7917ba 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -402,10 +402,10 @@ def make_ps_images (ps_name, resolution = 90): ## have better algorithm for deciding when to crop page, ## and when to show full page - single_page = re.search ('^%%Pages: 1', open (ps_name).read (1024)) + multi_page = re.search ('^%%Pages: ', open (ps_name).read (1024)) cmd = '' - if single_page: + if multi_page == None: bbox = get_bbox (ps_name) trans_ps = ps_name + '.trans.ps' output_file = re.sub (r'\.e?ps', '.png', ps_name) diff --git a/scm/define-translator-properties.scm b/scm/define-translator-properties.scm index ebaf47bc07..ea31420b18 100644 --- a/scm/define-translator-properties.scm +++ b/scm/define-translator-properties.scm @@ -86,13 +86,20 @@ the previous note on the same pitch in any octave. The value has same meaning as same-octave. @end table ") +(translator-property-description 'autoBeaming boolean? "If set to true +then beams are generated automatically.") (translator-property-description 'autoCautionaries list? "List similar to autoAccidentals, but it controls cautionary accidentals rather than normal ones. Both lists are tried, and the one giving the most accidentals wins. In case of draw, a normal accidental is typeset. ") - +(translator-property-description 'automaticBars boolean? " If set to true then bar lines will not be printed + automatically; they must be explicitly created with @code{bar} + keywords. Unlike with the @code{cadenza} keyword, measures are + still counted. Bar generation will resume according to that + count if this property is set to zero. +") (translator-property-description 'automaticPhrasing boolean? " If set, the @ref{Lyric_phrasing_engraver} will match note heads of context called Voice X to syllables from LyricsVoice called @@ -104,24 +111,21 @@ file @file{lyrics-multi-stanza.ly}. set, \\addlyrics will assume that beams, slurs and ties signal melismata, and align lyrics accordingly. ") +(translator-property-description 'allowBeamBreak boolean? + "If true allow line breaks during beams.") (translator-property-description 'barAlways boolean? "If set to true a bar line is drawn after each note. ") (translator-property-description 'barCheckSynchronize boolean? "If true then reset measurePosition when finding a barcheck. Turn off when using barchecks in polyphonic music.") -(translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed - automatically; they must be explicitly created with @code{bar} - keywords. Unlike with the @code{cadenza} keyword, measures are - still counted. Bar generation will resume according to that - count if this property is set to zero. -") (translator-property-description 'barNumberVisibility procedure? "Procedure that takes an int and returns whether the corresponding bar number should be printed") (translator-property-description 'bassFigureFormatFunction procedure? "DOCME") (translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set") (translator-property-description 'beatLength ly:moment? "The length of one beat in this time signature.") (translator-property-description 'beatGrouping list? "List of beatgroups. Eg. in 5/8 time #(list 2 3).") + (translator-property-description 'breakAlignOrder list? "Defines the order in which prefatory matter (clefs, key signatures) appears, eg. this puts the key signatures after the bar lines: @@ -175,7 +179,6 @@ into one staff.") 'chordNameSeparator markup? "The markup object used to separate parts of a chord name.") - (translator-property-description 'chordChanges boolean? "Only show changes in chords scheme?") (translator-property-description 'clefGlyph string? "Name of the symbol within the music font") (translator-property-description 'clefOctavation integer? "Add @@ -234,8 +237,6 @@ Do nothing. ") (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clef changes.") - - (translator-property-description 'explicitKeySignatureVisibility procedure? "visibility-lambda function for explicit Key changes; \override of #'break-visibility will set the visibility for normal @@ -257,14 +258,14 @@ another non-natural. "Used to set the relative size of all grobs in a context. This is done using the @code{Font_size_engraver}.") -(translator-property-description 'allowBeamBreak boolean? - "If true allow line breaks during beams.") +(translator-property-description 'fingerHorizontalDirection integer? + "If set, put the middle fingerings to +the side of the note head. Use LEFT, RIGHT or unset.") (translator-property-description 'forceClef boolean? "Show clef symbol, even if it hasn't changed. Only active for the first clef after the property is set, not for the full staff.") -(translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental") -(translator-property-description 'graceAlignPosition ly:dir? "put the grace note before or after the main note?") -(translator-property-description 'highStringOne boolean? "Whether the 1st string is the string with -highest pitch on the instrument (used by the automatic string selector).") +(translator-property-description 'highStringOne boolean? "Whether the +1st string is the string with highest pitch on the instrument (used by +the automatic string selector).") (translator-property-description 'instr markup? "see @code{instrument}") (translator-property-description 'instrument markup? " If @code{Instrument_name_engraver} @cindex Instrument_name_engraver @@ -297,7 +298,7 @@ signature at this point in the measure. The format is the same as for keySignat the major7 be formatted in a chord name?") (translator-property-description 'measureLength ly:moment? "Length of one measure in the current time signature last?") -(translator-property-description 'measurePosition ly:moment? " How much +(translator-property-description 'measurePosition ly:moment? "How much of the current measure (measured in whole notes) have we had. This can be set manually to create incomplete measures (anacrusis, upbeat), the start of the music. @@ -318,10 +319,7 @@ auto string-selecting mechanism selects the highest string with a fret not less than minimumFret") (translator-property-description 'minimumVerticalExtent number-pair? "minimum vertical extent, same format as VerticalExtent") -(translator-property-description 'autoBeaming boolean? "If set to true -then beams are generated automatically.") (translator-property-description 'noDirection boolean? "Don't set directions by a2-engraver when part-combining.") -(translator-property-description 'oneBeat ly:moment? " How long does one beat in the current time signature last?") (translator-property-description 'originalCentralCPosition integer? "Used for temporary overriding central C in octavation brackets. ") @@ -334,9 +332,11 @@ this is done with the pedal.") (translator-property-description 'pedalUnaCordaStrings list? "see pedalSustainStrings.") (translator-property-description 'pedalSostenutoStrings list? "see pedalSustainStrings.") -(translator-property-description 'phrasingPunctuation string? "") -(translator-property-description 'rehearsalMark number-or-string? "") -(translator-property-description 'regularSpacingDelta ly:moment? "TODO") +(translator-property-description 'phrasingPunctuation string? + "A string of characters that are considered +lyric punctuation") +(translator-property-description 'rehearsalMark number-or-string? "The +last rehearsal mark printed.") (translator-property-description 'repeatCommands list? "This property is read to find any command of the form (volta . X), where X is a string or #f") (translator-property-description 'scriptDefinitions list? " Description of scripts. This is used by Script_engraver for typesetting note-super/subscripts. See @file{scm/script.scm} for more information @@ -350,11 +350,7 @@ than this number of measures, no number is printed. ") scripts left or right of note heads. Support for this is limited. Accidentals will collide with scripts. ") -(translator-property-description 'fingerHorizontalDirection integer? - "If set, put the middle fingerings to -the side of the note head. Use LEFT, RIGHT or unset.") - -(translator-property-description 'skipBars boolean? " Set to true to +(translator-property-description 'skipBars boolean? "If set to true, then skip the empty bars that are produced by multimeasure notes and rests. These bars will not appear on the printed output. If not set (the default) multimeasure notes and rests expand into their full length, @@ -403,11 +399,6 @@ positions - by only drawing one beam over the beat.") "Function formatting a tab notehead; it takes a string number, a list of string tunings and Pitch object. It returns the text as a string.") -(translator-property-description 'textNonEmpty boolean? " If set -to true then text placed above or below the staff is not assumed to -have zero width. @code{\fatText} and @code{\emptyText} are predefined -settings. -.") (translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set.") (translator-property-description 'timeSignatureFraction number-pair? " pair of numbers, signifying the time signature. For example #'(4 . 4) is a 4/4time signature.") @@ -420,12 +411,15 @@ Switch off for cadenzas.") (translator-property-description 'tupletNumberFormatFunction procedure? "Function taking a music as input, producing a string. This function is called to determine the text to print on a tuplet bracket.") + +;; remove this? (translator-property-description 'tupletInvisible boolean? " If set to true, tuplet bracket creation is switched off entirely. This has the same effect as setting both @code{tupletNumberVisibility} and @code{tupletBracketVisibility} to @code{#f}, but as this does not even create any grobs, this setting uses less memory and time.") + (translator-property-description 'tupletSpannerDuration ly:moment? " Normally a tuplet bracket is as wide as the @code{ imes} expression that gave rise to it. By setting this @@ -435,7 +429,7 @@ property, you can make brackets last shorter. Example @@lilypond[verbatim,fragment] context Voice imes 2/3 @{ property Voice.tupletSpannerDuration = #(ly:make-moment 1 4) - [c8 c c] [c c c] + c-[8 c c-] c-[ c c-] @} @@end lilypond @end example @@ -465,7 +459,10 @@ and therefore only work in contexts which contain an ") (translator-property-description 'voltaOnThisStaff boolean? - "Normally, volta brackets are put only on the topmost staff. Setting this variable to true, will force a bracket to be on this staff as well.") + "Normally, volta brackets are put only on the topmost staff. Setting +this variable to true, will force a bracket to be on this staff as +well.") + (translator-property-description 'voltaSpannerDuration ly:moment? "maximum duration of the volta bracket. Set to a duration to control the size of the brackets printed by -- 2.39.5