nybbs2003 / lilypond-Jianpu

Display plugin of Jianpu notation for Lilypond
Apache License 2.0
22 stars 5 forks source link

Cannot hide empty staves #1

Open Dx-Wang opened 5 years ago

Dx-Wang commented 5 years ago

Hello,

I am trying to generate a score with both Jianpu staves and regular staves. I want to hide the all-rests lines of the staves with \RemoveEmptyStaves like

  \layout {
    \context {
      \Staff \RemoveEmptyStaves
      % To use the setting globally, uncomment the following line:
      \override VerticalAxisGroup.remove-first = ##t
    }
    \context {
      \JianpuStaff \RemoveEmptyStaves
      % To use the setting globally, uncomment the following line:
      \override VerticalAxisGroup.remove-first = ##t
    }
  }

It worked for the regular staves, but not for the Jianpu staves. Could anyone help me to find the problem?

Thanks, Dexin

Dx-Wang commented 5 years ago

Here is an example of the problem.

\version "2.18.2"
\language "english"

\include "jianpu10a.ly"

\header {
  title = "Test"
  % Remove default LilyPond tagline
  tagline = ##f
}

\paper {
  #(set-paper-size "letter")
}

\layout {
  \context {
    \Voice
    \consists "Melody_engraver"
    \override Stem #'neutral-direction = #'()
  }

}

global = {
  \key bf \major
%  \numericTimeSignature
  \time 4/4
  \tempo 4=84
}

% \include "include_lyndon-specific.ly"

men =  \relative bf, {
  \clef bass
  bf c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |
  bf c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |
  bf c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |
  bf c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |
  bf c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |

  bf c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |
}

solo = \relative bf' {
  \compressFullBarRests {R1*16} |
  bf4 c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |
  bf c d ef|
  f g a bf |
  bf a g f|
  ef d c bf |

}

\score { 
  \new ChoirStaff <<
    \new JianpuStaff \jianpuMusic { \global \transpose bf bf' {\solo} }
    \new Staff  \new Voice = solo { \global \solo }

    \new JianpuStaff \jianpuMusic { \global \transpose bf bf'' {\men} }
    \new Staff  \new Voice = men { \global \men }
  >>
%  \new Staff { \global \melody }

  \layout {
    \context {
      \Staff \RemoveEmptyStaves
      % To use the setting globally, uncomment the following line:
      \override VerticalAxisGroup.remove-first = ##t
    }
    \context {
      \JianpuStaff \RemoveEmptyStaves
      % To use the setting globally, uncomment the following line:
      \override VerticalAxisGroup.remove-first = ##t
    }
  }

  \midi { }
}