lilypond-user
[Top][All Lists]
Advanced

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

Frenched score with glissandi


From: Siska Ádám
Subject: Frenched score with glissandi
Date: Thu, 15 Mar 2012 22:05:26 +0100

Dear List,


I'd like to forcefully remove a staff from an orchestral score at a given 
point. Here's the scenario:

There are 6 violas playing in 2 staves (Vle 1-3 in the first and Vle 4-6 in the 
second). From some point, all the violas play the same material, so I'd like to 
remove one of the staves to avoid duplications. However, I can't find out how 
to achieve this. I enabled 'frenched spacing' with \RemoveEmptyStaves, but it 
seems that the hidden notes that end the glissandi (created with \hideNotes) 
will keep the staff 'alive', as in the attached example.

(Note that this example is a minimal extract, it doesn't contain the rest of 
the orchestra, however, there's a dummy timeline and a dummy first page 
inserted, to simulate the actual situation).

Does anybody have an idea about how to activate the frenched spacing in this 
specific case?


Thanks,
Ádám


%%%%%%%%%%%%%%%%%%%
Here's the example:
%%%%%%%%%%%%%%%%%%%


\version "2.14.1"
#(set-default-paper-size "b4")
#(set-global-staff-size 12)

#(define adjust-for-note-head(
  lambda (grob)(
    let* ((refp (ly:grob-system grob))
           (bar-coord (ly:grob-relative-coordinate grob refp X))
           (all (ly:grob-array->list (ly:grob-object refp 'all-elements)))
           (note-heads
             (filter
               (lambda (n)
                 (eq? (assq-ref (ly:grob-property n 'meta) 'name)
                      'NoteColumn))
               all))
           (note-head-coords
             (map
               (lambda (heads)
                 (interval-center (ly:grob-extent heads refp X)))
               note-heads))
           (coords-to-right
             (filter
               (lambda (coord) (< bar-coord coord))
               note-head-coords))
           (closest-coord
             (if (pair? coords-to-right)
                 (apply min
                       (map (lambda (coord) (- coord bar-coord))
                            coords-to-right))
                 0)))
      (set! (ly:grob-property grob 'extra-offset) (cons closest-coord 0))
    )
  )
)

dottedNoteHead = {
  \once \override NoteHead  #'stencil = #ly:text-interface::print
  \once \override NoteHead #'text = \markup { \concat { \musicglyph #"dots.dot" 
" " \musicglyph #"dots.dot" " " \musicglyph #"dots.dot" } }
}

timing = {
  \relative d'' {
    \hideNotes
    \time 8/4 \mark "8" s4*8 \pageBreak
    \time 5/4 \mark "5" s4*5 \noBreak
    \time 5/4 \mark "5" s4*5 \noBreak
    \time 5/4 \mark "5" s4*5 \noBreak
    \time 5/4 \mark "5" s4*5 \noBreak
    \time 8/4 \mark "8" s4*8 \noBreak
    \time 3/4 \mark "3" s4*3 \noBreak
    \time 3/4 \mark "3" s4*3 \noBreak
    \time 3/4 \mark "3" s4*3 \noBreak
    \time 4/4 \mark "4" s4*4 \break
    \time 4/4 \mark "4" s4*4 \noBreak
    \time 5/4 \mark "5" s4*5 \noBreak
    \time 4/4 \mark "4" s4*4 \noBreak
    \time 3/4 \mark "3" s4*3 \noBreak
    \time 4/4 \mark "4" s4*4 \noBreak
    \time 3/4 \mark "3" s4*3 \noBreak
    \time 3/4 \mark "3" s4*3 \noBreak
    \time 3/4 \mark "3" s4*3 \noBreak
    \time 4/4 \mark "4" s4*4 \noBreak
    \time 4/4 \mark "4" s4*4 \noBreak
    \time 3/4 \mark "3" s4*3 \pageBreak
    \time 5/4 \mark "5" s4*5
  \unHideNotes}
}

\score {
  <<
    \new Staff {
      \set Staff.instrumentName = #"Dummy"
      \set Staff.shortInstrumentName = #"Dummy"
      << { \timing } \\ { \repeat unfold 94 { d'4 } } >>
    }
    \new StaffGroup <<
      \new Staff {
        \relative d' {
          \set Staff.instrumentName = \markup { \center-column { \line { 
"Viole" } \line { "1-3" } } }
          \set Staff.shortInstrumentName = \markup { \center-column { \line { 
"Vle." } \line { "1-3" } } }
          \clef alto
          << { d4*49 \glissando \hideNotes d4*4 \unHideNotes } \new Voice { 
\hideNotes d4*13 \once \override Hairpin #'circled-tip = ##f d4*5\< \once 
\override Hairpin #'circled-tip = ##f \once \override TextSpanner 
#'(bound-details left text) = "tremolo" \once \override TextSpanner 
#'(bound-details right text) = "ord." d4*5\mp\>\startTextSpan 
d4*26\ppp\stopTextSpan \unHideNotes } >>
        }
      }
      \new Staff {
        \relative d' {
          \set Staff.instrumentName = \markup { \center-column { \line { 
"Viole" } \line { "4-6" } } }
          \set Staff.shortInstrumentName = \markup { \center-column { \line { 
"Vle." } \line { "4-6" } } }
          \clef alto
          << { \once \override Glissando #'bound-details = #'((right 
(attach-dir . 0) (padding . 1.5))) d4*18 \glissando d8 d d d d \dottedNoteHead 
d8*5 \once \override Glissando #'bound-details = #'((left (attach-dir . 0) 
(padding . 0.0))) \hideNotes d4*42 \glissando d4*4 \unHideNotes } \new Voice { 
\hideNotes d4*13 \once \override Hairpin #'circled-tip = ##f d4*5\< \once 
\override Hairpin #'circled-tip = ##f d4*5\mp\>^\markup{\raise #0.35 
\musicglyph #"noteheads.s2" ~ 60} d4*39\ppp d4*3\> d4*4\! \unHideNotes } >>
        }
      }
    >>
  >>
  \layout {
    \context {
      \Voice
      \remove Forbid_line_break_engraver
    }
    \context {
      \Staff
      \RemoveEmptyStaves
      \remove "Time_signature_engraver"
      \remove Separating_line_group_engraver
      \consists "Mark_engraver"
    }
    \context {
      \Score
      \remove "Bar_number_engraver"
      \remove "Mark_engraver"
      \override SpacingSpanner #'uniform-stretching = ##t
      \override SpacingSpanner #'strict-note-spacing = ##t
      \override SpacingSpanner #'strict-grace-spacing = ##t
      %\override Beam #'breakable = ##t
      \override Beam #'stencil = #point-stencil
      \override BarLine #'transparent = ##t
      \override BarLine #'after-line-breaking = #adjust-for-note-head
      \override SpanBar #'after-line-breaking = #adjust-for-note-head
      \override SpanBar #'glyph-name = #"dashed"
      \override RehearsalMark #'after-line-breaking = #adjust-for-note-head
      \override Glissando #'breakable = ##t
      \override Glissando #'thickness = #5
      \override Glissando #'bound-details = #'((right (attach-dir . 0) (padding 
. 0)) (left (attach-dir . 0) (padding . 1.5)))
      \override Hairpin #'circled-tip = ##t
      \override Stem #'stencil = #point-stencil
      \override TextSpanner #'style = #'line
      \override TextSpanner #'(bound-details right arrow) = ##t
      proportionalNotationDuration = #(ly:make-moment 1 4)
    }
  }
}




reply via email to

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