From ff933f126892a79441b5b1541a95369095df91dd Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 28 Jul 2013 13:36:38 +0200 Subject: [PATCH] Let several Documentation/snippets use \fermata markup --- ...ove-and-below-the-same-barline-method-1.ly | 47 ++++ .../snippets/new/keyboard-headword.ly | 242 ++++++++++++++++++ .../snippets/new/unfretted-headword.ly | 229 +++++++++++++++++ 3 files changed, 518 insertions(+) create mode 100644 Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly create mode 100644 Documentation/snippets/new/keyboard-headword.ly create mode 100644 Documentation/snippets/new/unfretted-headword.ly diff --git a/Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly b/Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly new file mode 100644 index 0000000000..d83c178bcc --- /dev/null +++ b/Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly @@ -0,0 +1,47 @@ +\version "2.17.24" + +\header { + lsrtags = "editorial-annotations, expressive-marks, staff-notation, tweaks-and-overrides" + + texidoc = " +This method prints two 'rehearsal marks', one on top of the other. It +shifts the lower rehearsal mark below the staff and then adds padding +above it in order to place the upper rehearsal mark above the staff. + +By adjusting the extra-offset and baseline-skip values you can increase +or decrease the overall space between the rehearsal mark and the staff. + +Because nearly every type of glyph or string can be made to behave like +a rehearsal mark it is possible to centre those above and below a bar +line. + +Adding the appropriate 'break visibility' as shown in snippet 1 will +allow you to position two marks at the end of a line as well. + +Note: Method 1 is less complex than Method 2 but does not really allow +for fine tuning of placement of one of the rehearsal marks without +affecting the other. It may also give some problems with vertical +spacing, since using @code{extra-offset} does not change the bounding +box of the mark from its original value. + + + +" + doctitle = "How to print two rehearsal marks above and below the same barline (method 1)" +} + +\relative c'{ + c d e f | + \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5) + \once \override Score.RehearsalMark.baseline-skip = #9 + \mark \markup \center-column { \circle 1 \box A } + g f e d | + \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5) + \once \override Score.RehearsalMark.baseline-skip = #9 + \mark \markup \center-column { \flat { \bold \small \italic Fine. } } + g f e d | + \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5) + \once \override Score.RehearsalMark.baseline-skip = #9 + \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible + \mark \markup \center-column { \fermata \box z } +} diff --git a/Documentation/snippets/new/keyboard-headword.ly b/Documentation/snippets/new/keyboard-headword.ly new file mode 100644 index 0000000000..cb2af25e9a --- /dev/null +++ b/Documentation/snippets/new/keyboard-headword.ly @@ -0,0 +1,242 @@ +\version "2.17.24" + +\header { + lsrtags = "headword" + + texidoc = " +Keyboard headword + +" + doctitle = "Keyboard headword" +} +% M. Ravel, Sonatine (1905) +% First movement +\include "english.ly" + +\layout { + \context { + \Score + \remove "Bar_number_engraver" + } +} + +fermataLong = \markup { + \override #'(direction . 1) + \override #'(baseline-skip . 2) { + \dir-column { + \fermata + \text \italic \center-align long + } + } +} + +\new PianoStaff << + \set PianoStaff.connectArpeggios = ##t + \new Staff { + \time 2/4 + \key fs \major + << + \new Voice { + \voiceOne + fs''8 ( ^\markup { + \override #'(baseline-skip . 2.4) \column { + \line \bold { Un peu retenu } + \line \italic { très expressif } + } + } + es''16 + cs''16 + as'4 ) + | + fs''8 ( + es''16 + cs''16 + as'4 ) + | + fs''8 ( + es''16 + cs''16 + as'8 + cs''8 ) + | + } + \new Voice { + \voiceTwo + gs'8\rest \ppp + fs'4 ( + es'8 ) + | + gs'8\rest + fs'4 ( + es'8 ) + | + gs'8\rest + fs'4 ( + es'8 ) + | + } + >> + \clef bass + 4 ( ^ \markup \bold { Rall. } + \override Script.stencil = #(lambda (grob) + (grob-interpret-markup grob fermataLong)) + 8 ) \fermata + \noBeam + \clef treble + \slurUp + \once \override Hairpin.to-barline = ##f + 8 ( \pp \> + | + 4. \! ) ^\markup \bold { a Tempo } + \slurUp + 8 ^\( \> + | + 4. \! \) + << + \new Voice { + \voiceOne + 8 ( + | + cs'8 ^\markup \bold { Rallentando } + b16 + cs'16 + d'8 + e'16 + fs'16 + | + 4. ) + s8 + | + r8 + 4 \arpeggio + e''16 ( ^\markup \bold { Lent } + fs''16 + | + \voiceTwo + 2 ) + | + } + \new Voice { + \voiceTwo + s8 + | + 4 \< + 4 \> + | + s4. \! + \slurUp + \once \override Script.direction = #UP + 8 ( \accent + | + 4. ) + \once \override Hairpin.to-barline = ##f + 8 \ppp \> + | + s8 \! + \stemDown + \once \override Script.direction = #UP + \ottava #1 + \voiceOne + \once \override PianoStaff.Arpeggio.padding = #0.8 + 4. \arpeggio \fermata + \ottava #0 + \bar "|." + } + >> + } + \new Staff << + \set Staff.pedalSustainStyle = #'bracket + \key fs \major + \clef bass + \new Voice { + \voiceOne + ds'4 \tenuto + cs'4 \tenuto + | + ds'4 \tenuto + cs'4 \tenuto + | + ds'4 \tenuto + cs'4 \tenuto + | + s8 + \clef treble + 8 [ + \clef bass + 8 \fermata ] + s8 + | + fs8\rest + \clef treble + 4 \tenuto + s8 + | + fs8\rest + \clef treble + 4 \tenuto + s8 + | + s2 + | + ds8\rest + \clef treble + 4 + \clef bass + s8 + | + s8 + \clef treble + 4 \arpeggio + \clef bass + s8 + | + s8 + \clef treble + 4. \arpeggio \fermata + | + } + \new Voice { + \voiceTwo + ds'8 [ ( + < ds bs >8 + cs'8 + < ds as >8 ] ) + | + ds'8 [ ( + < ds bs >8 + cs'8 + < ds as >8 ] ) + | + ds'8 [ ( + < ds bs >8 + cs'8 + < ds as >8 ] ) + | + \once \override Script.outside-staff-priority = #100 + \once \override TextScript.outside-staff-priority = #500 + 4. \fermata _\markup \italic { ped. } + 8 ( + | + 4. ) \sustainOn + \clef bass + 8 \( \sustainOff + | + 4. \) \sustainOn + \clef bass + 8 ( \sustainOff + | + 4 + 4 + | + 4. ) \sustainOn + 8 ( \sustainOff + | + 4. ) \sustainOn + \slurUp + 8 ( \sustainOff \sustainOn + | + 2 ) \sustainOff \sustainOn + | + } + >> +>> diff --git a/Documentation/snippets/new/unfretted-headword.ly b/Documentation/snippets/new/unfretted-headword.ly new file mode 100644 index 0000000000..f166db5894 --- /dev/null +++ b/Documentation/snippets/new/unfretted-headword.ly @@ -0,0 +1,229 @@ +\version "2.17.24" + +\header { + lsrtags = "headword" + + texidoc = " +Unfretted headword + +" + doctitle = "Unfretted headword" +} +% #!lilypond lcp-extract.ly -*- coding: utf-8; -*- + +%%% +%%% les-cinq-pieds: +%%% extract for the lilypond documentaton project +%%% + +%% Title: Les cinq pieds +%% Composer: David Séverin +%% Date: Juillet 2007 +%% Instrument: Violon Solo +%% Dedication: A mon épouse Lívia De Souza Vidal +%% Additional: avec l'aide de Krzysztof Wagenaar + +%% Statement: + +%% Here by, I, the composer, agree that this extract of my composition +%% be in the public domain and can be part of, used and presented in +%% the LilyPond Documention Project. + +%% Statement Date: Octber the 9th, 2008 + + +%%% +%%% Abbreviations +%%% + +db = \markup { \musicglyph #"scripts.downbow" } +dub = \markup { \line { \musicglyph #"scripts.downbow" " " \musicglyph #"scripts.upbow" } } +dubetc = \markup { \line { \musicglyph #"scripts.downbow" " " \musicglyph #"scripts.upbow" "..." } } + +ub = \markup { \musicglyph #"scripts.upbow" } +udb = \markup { \line { \musicglyph #"scripts.upbow" " " \musicglyph #"scripts.downbow" } } +udbetc = \markup { \line { \musicglyph #"scripts.upbow" " " \musicglyph #"scripts.downbow" "..." } } + +accel = \markup \tiny \italic \bold "accel..." +ritar = \markup \tiny \italic \bold "ritar..." + +ignore = \override NoteColumn.ignore-collision = ##t + + +%% +%% Strings +%% + +svib = \markup \small "s. vib." +pvib = \markup \small "p. vib." +mvib = \markup \small "m. vib." +sulp = \markup \small "s.p." +norm = \markup \small "n." + +quatre = \markup \teeny "IV" + + +%% +%% Shifting Notes +%% + +shift = \once \override NoteColumn.force-hshift = #0.9 +shifta = \once \override NoteColumn.force-hshift = #1.2 +shiftb = \once \override NoteColumn.force-hshift = #1.4 + + +%% +%% Hairpin +%% + +% aniente = "a niente" +aniente = \once \override Hairpin.circled-tip = ##t + + +%% +%% Tuplets +%% + +tupletbp = \once \override Staff.TupletBracket.padding = #2.25 + + +%% +%% Flag [Note Head - Stem] +%% + +noflag = \once \override Flag.style = #'no-flag + +%%% +%%% Functions +%%% + +#(define-markup-command (colmark layout props args) + (markup-list?) + (let ((entries (cons (list '(baseline-skip . 2.3)) props) + )) + (interpret-markup layout entries + (make-column-markup + (map (lambda (arg) + (markup arg)) + (reverse args)))))) + + +%%% +%%% Instruments +%%% + +ViolinSolo = \relative c' { + + \voiceOne + + \set Score.markFormatter = #format-mark-box-numbers + \override Score.VoltaBracket.font-name = #"sans" + \override Score.VoltaBracket.extra-offset = #'(0 . 1) + \override SpacingSpanner.uniform-stretching = ##t + + + %% Measure 1 + \time 25/8 + \mark \default + r2 ^\markup \colmark { \italic "fatigué" " " \bold "lentement"} r4 r r8 + << + { \shift d2 \glissando ^\markup \colmark { \quatre \dubetc \svib } \shifta e1 } \\ + { d2 \open \mf \< ~ \aniente d1 \! \> r4 r ^\markup \colmark { " " \fermata } \! } + >> + + + %% Measure 2 + \time 7/4 + \set Score.repeatCommands = #'((volta "1) n. 2) s.p.")) + << + { \shift d2 \glissando ^\markup \colmark { \quatre \udbetc } \shifta e1 } \\ + { d2 \open \mf \< ~ d1 \! \> ~ d4 ^\markup \colmark { " " \fermata } \! } + >> + \set Score.repeatCommands = #'((volta #f)) + + + %% Measure 3 + \time 15/4 + << + { \shift d2 \glissando ^\markup \colmark { \quatre \dubetc \pvib \norm } \shifta e1 \glissando d2 } \\ + { d2 \open \mf \< ~ d1 ~ d2 \ff ~ d1 \> ~ d2 ^\markup \colmark { " " " " \svib } ~ d4 \pp} + >> + \break + + %% Measure 4 + \time 4/4 + \stemUp + \tupletDown + \tuplet 3/2 { d4 ^\markup \colmark { \quatre \db \accel } d d } + \tuplet 3/2 { d4 ^\markup \colmark { " " \db " " \sulp } d d } + + + + %% Measure 5 + \time 5/4 + \tupletbp \tuplet 3/2 { d8 \mf \< ^\markup \colmark { \quatre \db \norm } d _\open d } + \tupletbp \tuplet 3/2 { d8 ^\markup \colmark { " " \db \sulp } d _\open d } + \tupletbp \tuplet 3/2 { d16 ^\markup \colmark { " " \db \norm } d _\open d d d _\open d } + d2 \ff ^\markup \colmark { " " \pvib } \> + + + %% Measure 6 + \time 5/8 + \once \override Beam.grow-direction = #RIGHT % \featherDurations #(ly:make-moment 2/3) + { d16 \staccato + [ d \staccato d \staccato d \staccato d \staccato d \staccato d \staccato d \staccato d \staccato d \staccato] + } + \break + + + %% Measure 7 + \time 7/4 + \tupletbp \tuplet 3/2 { d16 ^\markup \colmark { \quatre } d _\open d d d _\open d } + \tupletbp \tuplet 3/2 { d8 ^\markup \colmark { " " \db } d _\open d } + \tupletbp \tuplet 3/2 { d8 ^\markup \colmark { " " \db " " \sulp } d _\open d } + \tuplet 3/2 { d4 ^\markup \colmark { \quatre \db \ritar \norm } d d } + \tuplet 3/2 { d4 ^\markup \colmark { " " \db " " \sulp } d d \ppp ~ } + + + %% Measure 8 + d4 ^\markup \colmark { " " " " \pvib \norm } + deh2 d dih \< + + + %% Measure 9 + << + { \shift d2 \glissando ^\markup \colmark { \quatre } \shifta e1 } \\ + { d2 \open ~ d1 ^\markup \colmark { " " " " \mvib } } + >> + \breathe r4 \! + +} + + +%%% +%%% Score +%%% + +\score { + + << + \relative c' << + \new Staff \ViolinSolo + >> + + \override Score.Rest.transparent = ##t + \set Score.defaultBarType = "-" + >> + + \layout { + indent = 0.0 + \context { + \Staff + \remove "Time_signature_engraver" + } + \context { + \Score + \remove "Bar_number_engraver" + } + } +} -- 2.39.5