lilypond-user
[Top][All Lists]
Advanced

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

Re: Insipit variation


From: Thomas Morley
Subject: Re: Insipit variation
Date: Sun, 2 Jun 2019 20:51:15 +0200

Am So., 2. Juni 2019 um 18:30 Uhr schrieb Lutenist <address@hidden>:
>
> Dear Simon,
>
> thank you for your reply! I tried a bit longer and came quite close to what
> I wanted, but lack the know-how.
> I have attached my test file.
>
> What I try to replicate is the incipit from
> http://lilypond.org/doc/v2.19/Documentation/snippets/staff-notation#staff-notation-incipit
>
> I did try to use \incipit but there are no barlines!

Well, \incipit uses MensuralStaff. But usually there are no BarLines
MensuralStaff, they are made transparent.
Ofcourse you could do
\revert MensuralStaff.BarLine.transparent
in your `voiceIncipit┬┤.
Alas, you asked for 2/2-time and the notes add up to 5/4, thus you'll
never get a BarLine, unless you insert it manually.

> I would like to have the first three staves, i.e. voiceIncipit, luteIncipit
> and cytherIncipit to be shown to the left of the "normal" music, the
> transcription, which go under voice, luteRight & luteLeft, cytherRight &
> cytherLeft. Ideally the incipit has "System_start_delimiter_engraver"
> removed while the transcription does appears with the line.
>
> Some minor details too: I would like to add the cut-common time "C" into the
> tablature to show rhythm. I also think it would look better if there was a
> little bit more space between the incipit and the full body of music.

Try InstrumentName.padding

> How should I go about doing this?
>
> All the best,
> Gellius

Below I slightly extended our \incipit, too tired to give more
explanations. Though, it may give you a starting point.

\version "2.19.55"

incipit-harm =
#(define-music-function (target-ctx incipit-context incipit-music)
  (string? string? ly:music?)
  (_i "Output @var{incipit-music} before the main staff as an indication of
    its appearance in the original music.")
  #{
    \once \override $target-ctx . InstrumentName.stencil =
      #(lambda (grob)
        (let* ((instrument-name (ly:grob-property grob 'long-text))
               (align-x (ly:grob-property grob 'self-alignment-X 0))
               (align-y (ly:grob-property grob 'self-alignment-Y 0)))
        (set! (ly:grob-property grob 'long-text)
          #{ \markup {
            \score
            {
              \new $incipit-context \with {
                \override InstrumentName.self-alignment-X = #align-x
                \override InstrumentName.self-alignment-Y = #align-y
                instrumentName = #instrument-name
              }
              {
                $incipit-music
              }
              \layout {
                $(ly:grob-layout grob)
                indent-incipit-default = 15\mm
                line-width = #(primitive-eval
                  '(or (false-if-exception indent)
                    indent-incipit-default))
                indent = #(primitive-eval
                           '(or (false-if-exception
                                (- line-width incipit-width))
                            (* 0.5 line-width)))
                ragged-right = ##f
                ragged-last = ##f
                system-count = 1
                \context {
                  \Score
                  \remove "Default_bar_line_engraver"
                }
              }
            }
            }
          #})
          (set! (ly:grob-property grob 'self-alignment-Y) #f)
          (set! (ly:grob-property grob 'self-alignment-X) RIGHT)
          (system-start-text::print grob)))
  #})

voiceIncipit = {
  \autoBeamOff
  \revert MensuralStaff.BarLine.transparent
  \key f \major
  \time 2/2
  \partial 4
  \override NoteHead #'style = #'petrucci
  d''4 g'4. \once \stemUp bes'8  a' g' g''4
}

voice = {
  \key f \major
  \relative c'' {
    d4 | g,4. \once \stemUp bes8  a g g'4 | f g8 a bes4. d,8 | c4 bes d c |
    bes2. \bar "."
  }
}

luteIncipit = {
  \override TimeSignature.style = #'mensural
  \override TimeSignature.X-offset = #-2
  \override TimeSignature.font-size = #3
  \partial 4
  <g' es' es>4 <c g c'>4. es'8 d' c' <c c''> s
}

luteRight = {
  \clef treble
  \key bes \major
  \relative c'{
  \partial 4
  <es g>4 | c4. es8 d c c'4 | bes4 c8 d es4. <es g>8 | f4 r <es g> f |
  es2. \bar "|."
  }
}

luteLeft = {
  \clef bass
  \key bes \major
  \relative c'
  \partial 4
  es4 | <c g>2. c4 | bes2 c4. es8 | bes4 es r bes | <es bes>2. \bar "|."
}

cytherIncipit = {
  % music is not correct but it is done so to render the tablature according
  % to the source
  \partial 4
  f4 <a, c' f c>4. es8 d c <a, c' f c>4
}

cytherRight = {
  \partial 4
  \key f \major
  \relative c'' {
    d4 | <g b, d>4. bes,8 a g <g' b, d>4 | <d fis> g8 a <d, bes'>4. d8 |
    <c f>4 bes d <c f> | <bes d bes'>2. \bar "|."
  }
}

cytherLeft = {
  \partial 4
  \key f \major
  \clef bass
  \relative c {
  r4 | g'2. g4 | a2 g | s1 | s2. \bar "|."
  }
}
\score {
    <<
      \new Staff \with { instrumentName = " " }
        { \incipit-harm "Staff" "MensuralStaff" \voiceIncipit \voice }
      \new PianoStaff \with { instrumentName = " " }
        <<
          \incipit-harm "PianoStaff" "TabStaff"
            {
              \omit TabStaff.Clef
              \set TabStaff.stringTunings = \stringTuning <g, c f a d' g'>
              \set TabStaff.additionalBassStrings = \stringTuning <d, e, f,>
              \luteIncipit
            }
          \new Staff \luteRight
          \new Staff \luteLeft
        >>
      \new PianoStaff \with { instrumentName = " " }
        <<
          \incipit-harm "PianoStaff" "TabStaff"
              {
              \omit TabStaff.Clef
              % tuning is incorrect but it is just to render the tablature
              % according to the source; I would have to set the tuning
              % manuallyper fret because they are diatonically set on the neck,
              % i.e. a  single fret up or down may be a whole tone or a half
              % tone depending on the place
              \set TabStaff.stringTunings = \stringTuning <g, c f a>
              \cytherIncipit
            }
          \new Staff \cytherRight
          \new Staff \cytherLeft
        >>
  >>
  \layout {
    \context {
      \Score
      \remove "System_start_delimiter_engraver"
      tablatureFormat = #fret-letter-tablature-format
      fretLabels = #'("a" "b" "r" "d" "e" "f" "g" "h" "i" "k")
    }
    \context {
      \Staff
      \override InstrumentName.padding = 5
    }
    \context {
      \PianoStaff
      \override InstrumentName.padding = 5
    }
    indent = 8\cm
    incipit-width = 4\cm
  }
}


HTH,
  Harm



reply via email to

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