lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \noSpace macro?


From: David Kastrup
Subject: Re: \noSpace macro?
Date: Thu, 30 May 2013 17:44:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> Hi all,
>
> In addition to the \omit and \hide macros (which, by the way, are very nice; 
> thanks!), I would love a \noSpace macro, which says "ignore this grob when 
> calculating spacing, but print it anyway".
>
> Looking at the docs, I would have thought this would work:
>
> whiteFFMarkup = \markup { \whiteout \pad-markup #0.5 \dynamic ff}
> whiteFF = #(make-dynamic-script whiteFFMarkup)
> piano_dynamics = {
>   s2\ff s\ff   | % 21
>   s2.-\tweak #'X-offset #-3 -\tweak #'extra-spacing-width #'(+inf.0 . -inf.0) 
> -\tweak #'extra-spacing-height #'(-inf.0 . +inf.0) \whiteFF s4\p   | % 22

Maybe

\version "2.17.19"
\language "english"

piano_global = { \key d \major }

piano_notes_upper = \relative d'' {
  <d d'>4-. r <e e'>-. r   | % 21
  <fs fs'>2.\fermata fs,4   | % 22
}

whiteFFMarkup = \markup { \whiteout \pad-markup #0.5 \dynamic ff}
whiteFF = #(make-dynamic-script whiteFFMarkup)
piano_dynamics = {
  s2\ff s\ff   | % 21
  s2.-\tweak #'vertical-skylines #f -\tweak #'X-offset #-3
  -\tweak #'extra-spacing-width #empty-interval
  -\tweak #'extra-spacing-height #empty-interval \whiteFF s4\p   | % 22
}

piano_notes_lower = \relative d, {
  \clef bass
  <d d'>4-. r <e e'>-. r   | % 21
  <fs fs'>2.\fermata r4   | % 22
}

\score {
  \new PianoStaff <<
    \new Staff << \piano_global \piano_notes_upper >>
    \new Dynamics \piano_dynamics
    \new Staff << \piano_global \piano_notes_lower >>
  >>
}


-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]