lilypond-user
[Top][All Lists]
Advanced

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

RE: Bar number after volta repeat


From: Klaus Blum
Subject: RE: Bar number after volta repeat
Date: Fri, 6 Mar 2015 09:57:51 -0700 (MST)

Hi Seng, 

sorry, I didn't notice that.  :(

1. All the engravers removed from the \Score context only were added to the
normal \Staff context. I forgot to do the same thing with the \RhythmicStaff
context. Now it works. 

For some reason, the first bar is extremely spread. If you use the
one-line-breaking trick (see \paper section) to control the real need for
horizontal space, there's nothing suspicious. 
Maybe the problem disappears by itself as soon as the instrument parts are
longer than just to bars?

Hello Lilypond fellows, maybe someone with more experience can jump in here? 
:)

2. In your variable "violinIMusic" you have additional "\new Voice" and
"\consists" statements. As they are not necessary, I've taken them out. Now
the beam groups seem to be regular again.

As the code gets pretty long now, I'll also post it as an attachment:
Bar_number_after_volta_repeat.ly
<http://lilypond.1069038.n5.nabble.com/file/n172738/Bar_number_after_volta_repeat.ly>
  
Bar_number_after_volta_repeat.pdf
<http://lilypond.1069038.n5.nabble.com/file/n172738/Bar_number_after_volta_repeat.pdf>
  

...hope this helps.

Cheers, 
Klaus

%
-------------------------------------------------------------------------------------
\version "2.18.2"


#(set-global-staff-size 17)
\paper {
  indent = 3.0\cm  % space for instrumentName
  short-indent = 1.5\cm  % space for shortInstrumentName
  % page-breaking = #ly:one-line-breaking % just for testing the horizontal
spacing...
}

\layout { 
  \context { 
    \Score 
    \remove "Timing_translator" 
    \remove "Default_bar_line_engraver" 
    \remove "Volta_engraver" 
    \remove "Mark_engraver" 
    \remove "Bar_engraver" 
    %\remove "Time_signature_performer"   % optional 
    %\remove "Control_track_performer"    % optional 
    \remove "Tempo_performer" 
    \remove "Repeat_acknowledge_engraver" 
    \remove "Metronome_mark_engraver" 
    %\remove "Parenthesis_engraver"       % optional 
    \remove "Bar_number_engraver" 
  } 
  \context { 
    \Staff 
    \consists "Timing_translator" 
    \consists "Default_bar_line_engraver" 
    % \consists "Ambitus_engraver"          %% addition may be desired 
    \consists "Volta_engraver" 
    \consists "Mark_engraver" 
    \consists "Bar_engraver"                % mostly not required in Staff,
but removed from Score 
    %\consists "Time_signature_performer"  % optional 
    %\consists "Control_track_performer"   % optional 
    \consists "Tempo_performer" 
    \consists "Repeat_acknowledge_engraver" 
    \consists "Metronome_mark_engraver" 
    %\consists "Parenthesis_engraver"      % optional 
    \consists "Bar_number_engraver" 
    % ... and how to show the bar numbers by default in each staff 
    alternativeNumberingStyle = #'numbers-with-letters 
    \override BarNumber.break-visibility = ##(#t #t #t) 
  } 
  \context { 
    \RhythmicStaff 
    \consists "Timing_translator" 
    \consists "Default_bar_line_engraver" 
    % \consists "Ambitus_engraver"          %% addition may be desired 
    \consists "Volta_engraver" 
    \consists "Mark_engraver" 
    \consists "Bar_engraver"                % mostly not required in Staff,
but removed from Score 
    %\consists "Time_signature_performer"  % optional 
    %\consists "Control_track_performer"   % optional 
    \consists "Tempo_performer" 
    \consists "Repeat_acknowledge_engraver" 
    \consists "Metronome_mark_engraver" 
    %\consists "Parenthesis_engraver"      % optional 
    \consists "Bar_number_engraver" 
    \consists "Clef_engraver" % remove this if you don't want to have the
percussion clef
    % ... and how to show the bar numbers by default in each staff 
    alternativeNumberingStyle = #'numbers-with-letters 
    \override BarNumber.break-visibility = ##(#t #t #t) 
  } 
} 
fluteMusic = \relative c' { \key g \major g'1 b }
% Pitches as written on a manuscript for Clarinet in A
% are transposed to concert pitch.
clarinetMusic = \transpose c' a
  \relative c'' { \key bes \major bes1 d }
trumpetMusic = \relative c { \key g \major g''1 b }
% Key signature is often omitted for horns
hornMusic = \transpose c' f
  \relative c { d'1 fis }
percussionMusic = \relative c { \clef percussion \key g \major g1 b }
sopranoMusic = \relative c'' { \key g \major g'1 b }
sopranoLyrics = \lyricmode { Lyr -- ics }
altoIMusic = \relative c' { \key g \major g'1 b }
altoIIMusic = \relative c' { \key g \major g'1 b }
altoILyrics =  \sopranoLyrics
altoIILyrics = \lyricmode { Ah -- ah }
tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b }
tenorLyrics = \sopranoLyrics
pianoRHMusic = \relative c { \key g \major g''1 b }
pianoLHMusic = \relative c { \clef bass \key g \major g1 b }
violinIMusic = \relative c' { \key g \major g'8 b c d e f f e d d g d a b d
f  }
violinIIMusic = \relative c' { \key g \major g'1 b }
violaMusic = \relative c { \clef alto \key g \major g'1 b }
celloMusic = \relative c { \clef bass \key g \major g1 b }
bassMusic = \relative c { \clef "bass_8" \key g \major g,1 \break b }

\score {
  <<
    \new StaffGroup = "StaffGroup_woodwinds" <<
      \new Staff = "Staff_flute" {
        \set Staff.instrumentName = #"Flute"
        % shortInstrumentName, midiInstrument, etc.
        % may be set here as well
        \fluteMusic
      }
      \new Staff = "Staff_clarinet" {
        \set Staff.instrumentName =
        \markup { \concat { "Clarinet in B" \flat } }
        % Declare that written Middle C in the music
        %  to follow sounds a concert B flat, for
        %  output using sounded pitches such as MIDI.
        \transposition bes
        % Print music for a B-flat clarinet
        \transpose bes c' \clarinetMusic
      }
    >>
    \new StaffGroup = "StaffGroup_brass" <<
      \new Staff = "Staff_hornI" {
        \set Staff.instrumentName = #"Horn in F"
        \transposition f
        \transpose f c' \hornMusic
      }
      \new Staff = "Staff_trumpet" {
        \set Staff.instrumentName = #"Trumpet in  C"
        \trumpetMusic
      }
    >>
    \new RhythmicStaff = "RhythmicStaff_percussion" <<
      \set RhythmicStaff.instrumentName = #"Percussion"
      \percussionMusic
    >>
    \new PianoStaff <<
      \set PianoStaff.instrumentName = #"Piano"
      \new Staff { \pianoRHMusic }
      \new Staff { \pianoLHMusic }
    >>
    \new ChoirStaff = "ChoirStaff_choir" <<
      \new Staff = "Staff_soprano" {
        \set Staff.instrumentName = #"Soprano"
        \new Voice = "soprano"
        \sopranoMusic
      }
      \new Lyrics \lyricsto "soprano" { \sopranoLyrics }
      \new GrandStaff = "GrandStaff_altos"
      \with { \accepts Lyrics } <<
        \new Staff = "Staff_altoI"  {
          \set Staff.instrumentName = #"Alto I"
          \new Voice = "altoI"
          \altoIMusic
        }
        \new Lyrics \lyricsto "altoI" { \altoILyrics }
        \new Staff = "Staff_altoII" {
          \set Staff.instrumentName = #"Alto II"
          \new Voice = "altoII"
          \altoIIMusic
        }
        \new Lyrics \lyricsto "altoII" { \altoIILyrics }
      >>
      \new Staff = "Staff_tenor" {
        \set Staff.instrumentName = #"Tenor"
        \new Voice = "tenor"
        \tenorMusic
      }
      \new Lyrics \lyricsto "tenor" { \tenorLyrics }
    >>
    \new StaffGroup = "StaffGroup_strings" <<
      \new GrandStaff = "GrandStaff_violins" <<
        \new Staff = "Staff_violinI" { 
          \set Staff.instrumentName = #"Violin I"
          \violinIMusic
        }
        \new Staff = "Staff_violinII" {
          \set Staff.instrumentName = #"Violin II"
          \violinIIMusic
        }
      >>
      \new Staff = "Staff_viola" {
        \set Staff.instrumentName = #"Viola"
        \violaMusic
      }
      \new Staff = "Staff_cello" {
        \set Staff.instrumentName = #"Cello"
        \celloMusic
      }
      \new Staff = "Staff_bass" {
        \set Staff.instrumentName = #"Double Bass"
        \bassMusic
      }
    >>
  >>
  \layout { }
}
%
-------------------------------------------------------------------------------------




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Bar-number-after-volta-repeat-tp172634p172738.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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