Instrument name as staff lines

Revision as of 22:48, 26 October 2025 by Jean Abou Samra (talk | contribs) (Import snippet from LSR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Instrument name as staff lines

\version "2.24.0"

%%http://lsr.di.unimi.it/LSR/Item?id=981
% Credits: PPS, March 2015.

\paper {
  indent = 25
}

\header {
  opus = \markup \fontsize #4 "BWV 1009"
  piece = \markup \fontsize #4 "Suite 3"
  %{ %% alternative font:
  opus = \markup 
          \override #'(font-name . "Purisa bold")
          \concat {
            \fontsize #5  "BWV"
            \hspace #1
            \fontsize #7 "1009"
          } 
  piece = \markup 
          \override #'(font-name . "Purisa bold")
          \concat {
            \fontsize #5  "Suite"
            \hspace #.6
            \fontsize #7 "3"
          }
  %}
}

prelude = \markup
  \score { 
    { 
      \textLengthOn
      s1
      -\tweak extra-offset #'(-1 . -4.4) 
      ^\markup \concat { 
        \fontsize #4 
        \scale #'(0.99 . 1.32)
        "Prélude" 
       %{ %% alternative font:
          -\tweak extra-offset #'(-1 . -4.5) 
          ^\markup \concat { 
            \fontsize #4 
            \scale #'(0.82 . 1.3)
            \override #'(font-name . "Purisa bold")
            "Pr�lude" 
       %}
      } 
    }
    \layout { 
      indent = 0
      \context {
        \Score
        \omit Clef
        \omit TimeSignature
        \omit BarLine
      }
    }
  }
  
\score {
  \new Staff 
  \relative c' {
    \tempo "(Presto)"
    \clef F
    \time 3/4
    c8 b16 a g f e d c g e g |
    c,4~ c16 d e f g a b c   |
    d c b a g a b c d e f d  |
    \break
    e f e d c d e f g a b c |
    d c b a g a b c d e f d |
    e f e d c c b a g f e d |
  }
  \layout {
    \context {
      \Staff
      instrumentName = \markup { \prelude }
      \override InstrumentName.self-alignment-X = #RIGHT
      \override InstrumentName.self-alignment-Y = ##f
      \override InstrumentName.padding = #-.2
    }
  }
}

\paper { tagline = ##f }