lilypond-user
[Top][All Lists]
Advanced

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

Re: Including notes in rhythm indications


From: Thomas Morley
Subject: Re: Including notes in rhythm indications
Date: Sun, 29 Jan 2012 21:12:09 +0100

Hi Brent,

2012/1/29 Brent Annable <address@hidden>:
> Hey Harm,
>
> What I mean is that I'm producing both a score and parts, and if this
> indication is in a rehearsal mark, doesn't that mean that the mark will need
> to be included in the music for each separate part?

Yes, you should do so.

> And if I do that, won't
> the indication appear 4 times in the score?

No.

> What I would like is for the
> indication to appear once at the start of the score and once at the start of
> each part. What would be the easiest way to do that?

That's the intended functionality of a RehearsalMark.

See:

\version "2.14.2"

rhythmMarkStaffReduce = #-3
rhythmMarkLabelFontSize = #-2

rhythmMark = #(define-music-function (parser location label musicI musicII )
        (string? ly:music? ly:music?)
   #{
      \mark \markup {
        \line \vcenter {
          \combine                     % 1st column in line
            \italic \fontsize #rhythmMarkLabelFontSize $label
            \transparent \italic \fontsize #rhythmMarkLabelFontSize f
                % This fakes a uniform baseline (ie. create common
anchor for vcenter)

          \score {                     % 2nd column in line
            \new Staff \with {
              fontSize = #rhythmMarkStaffReduce
              \override StaffSymbol #'staff-space = #(magstep
rhythmMarkStaffReduce)
              \override StaffSymbol #'line-count = #0
              \override VerticalAxisGroup #'Y-extent = #'(0 . 0)  % td
%!              \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) %RV
            }

            \relative { \stemUp $musicI }

            \layout {
              ragged-right= ##t
              indent = 0
              \context {
                \Staff
                \remove "Clef_engraver"
                \remove "Time_signature_engraver" }
            } % layout

          } % 1st Score end

          \hspace #-0.1                % 3rd column in line

                                       % 4th column in line
          \italic \fontsize #rhythmMarkStaffReduce "="

          \score {                     % 5th column in line

            \new Staff \with {
              fontSize = #rhythmMarkStaffReduce
              \override StaffSymbol #'staff-space = #(magstep
rhythmMarkStaffReduce)
              \override StaffSymbol #'line-count = #0
              \override VerticalAxisGroup #'Y-extent = #'(0 . 0)  % td
%!              \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) %RV
            }

            \relative { \stemUp $musicII }

            \layout {
              ragged-right= ##t
              indent = 0
              \context {
                \Staff
                \remove "Clef_engraver"
                \remove "Time_signature_engraver" }
            } % layout end

          } % 2nd Score end

        } % line end
      } % markup end
   #})

rhyMarkIIEighths = {
  % \override Score.SpacingSpanner #'common-shortest-duration =
#(ly:make-moment 1 4) % tight
  \override Score.SpacingSpanner #'common-shortest-duration =
#(ly:make-moment 3 16) % even
  b'8[ b8]
}

markTextLengthOn = {
  \override Score.RehearsalMark #'extra-spacing-width = #'(0 . 0)
  \override Score.RehearsalMark #'extra-spacing-height = #'(0 . 0)
}

markStart = {
        \markTextLengthOn
        \once \override Score.RehearsalMark #'self-alignment-X = #LEFT
        \rhythmMark #"Heavy four-beat swing" \rhyMarkIIEighths
\rhyMarkIIEighths
}

partOne = \relative c' {
        \markStart
        c'1
        \mark \default
        b
}
partTwo = \relative c' {
        \markStart
        g'1
        \mark \default
        g
}
partThree = \relative c' {
        \markStart
        e1
        \mark \default
        d
}
partFour = \relative c' {
        \markStart
        c1
        \mark \default
        g'
}

\header {
        dedication = "à Brent"
        title = "My piece"
        composer = "Me"
        piece = \markup \bold "Part"

}

\score {
        \new Staff \with { instrumentName = "I" } \partOne
}
\score {
        \new Staff \with { instrumentName = "II" } \partTwo
}
\score {
        \new Staff \with { instrumentName = "III" } \partThree
}
\score {
        \new Staff \with { instrumentName = "IV" } \partFour
}
\score {
        \new StaffGroup <<
        \new Staff \with { instrumentName = "I" } \partOne
        \new Staff \with { instrumentName = "II" } \partTwo
        \new Staff \with { instrumentName = "III" } \partThree
        \new Staff \with { instrumentName = "IV" } \partFour
        >>
        \header {
                piece = \markup \bold "Score"
        }
}

HTH,
  Harm



reply via email to

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