Peter Mogensen wrote:
> 
> I'm thinking of features like:
> 
> * Separating score-definition from voice definition, making it easier to
> edit the Lilypond file to build different scores by combining voices in
> different ways.
...
> I think considering to change the current mapping, which is:
>    // Lilypond Voice = Rosegarden Segment
>    // Lilypond Staff = Rosegarden Track
>
> To:
> Rosegarden segment = Lilypond notes
> Rosegarden Track = Lilypond Voice

To be more specific, so people know what I'm about to do, I've attached
a small example of how this could look as output. Please only look at
the structure of the file. There's of course a few things in the file,
like one-line staffs and small tweaks to tremolos I normally use which
RG can't do.

Each RG segment would become a definition as in the
"Note elements" section of the file. This would make it easy to change
which voices are printed in which staffs later. The score definition is
 separated from the rest so you can easily change what is included in
the final printout. In time I would like to include an option to also
print  extracts for different voices (like show), so you wont have to
mess around with muting tracks, exporting, muting other tracks,
exporting .... and so on.

Any comments? (I have probably still a lot to learn about Lilypond)


Peter

\version "2.6.3"
\header {
% 
http://lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Creating-titles.html
    title = "Template"
    subtitle = "subtitle"
    composer = "Traditional"
    arranger = "Arranger"
    enteredby = "I typed this"
    maintainerEmail = "[EMAIL PROTECTED]"
    meter = "moderato"
}

\paper {
% 
http://lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Global-layout.html
  linewidth = 16.0 \cm
  #(set-paper-size "a4")
  raggedlastbottom = ##t
  raggedbottom = ##t
  betweensystempadding = 1.0\cm 
  betweensystemspace = 0.30\in
  leftmargin = 2\cm
}

#(set-global-staff-size 14)

\layout {
% http://lists.gnu.org/archive/html/lilypond-user/2004-11/msg00660.html
% http://lists.gnu.org/archive/html/bug-lilypond/2005-04/msg00147.html

  \context { \RemoveEmptyStaffContext }

}

%%%%%%%%%%%%% Helper definitions %%%%%%%%%%%%%
slip = \drummode {
   \once \override Stem #'stroke-style = #"grace" \grace sn8 
}

%%%%%%%%%%%%%%%% General %%%%%%%%%%%%%%%%%%%%%

globaltime = {
  \time 2/2
}

%%%%%%%%%%%%%% Rehearsal marks %%%%%%%%%%%%%%%

globalinfo = {
  s1*2 \bar "|:" \mark \default 
  s1*4 \bar "||" \mark \markup { \musicglyph #"scripts.segno" } 
  s1*4 \bar ":|" \mark \markup { \italic "Fine" }
  s1*2 \bar "|."
  \override Score.RehearsalMark #'direction = #-1
  \override Score.RehearsalMark #'self-alignment-X = #right
  \override Score.RehearsalMark #'padding = #3
  \override Score.RehearsalMark #'break-visibility = #begin-of-line-invisible
  \mark \markup { \italic "D.S. al Fine"}
}

%%%%%%%%%%%%% Note elements %%%%%%%%%%%%%%%%%%

melodinotes = \relative c' {
  c1
  e1
  g4 a b c
  g4 a b c
  g4 a b c
  g4 a b c
  e4 d c b
  e4 d c b
  e4 d c b
  e4 d c b
  e2 d2
  c1
}

andenstemme = \relative c' {
  c1
  c1
  c1
  c1
  c1
  c1
  c1
  c1
  c1
  c1
  c1
  c1
}

drumnotes = \drummode {
  \dynamicUp
  sn1:32~\<
  sn1:32\!
  sn4:16~ sn4 \slip sn  sn 
  \slip sn sn sn sn8 sn

  sn4:16~ sn4 \slip sn  sn 
  \slip sn sn sn sn8 sn

  sn4:16~ sn4 \slip sn  sn 
  \slip sn sn sn sn8 sn

  sn4:16~ sn4 \slip sn  sn 
  \slip sn sn sn sn8 sn
  
  sn2:32~-> sn2:32~->
  sn2:32~-> sn4-> r 
}

%%%%%%%%%%%%%%%% Voices %%%%%%%%%%%%%%%%%%%%%%

melodivoice = \context Voice = "M" {
  \clef treble
  \key c \major
  \melodinotes
}

andenvoice = \new Voice {
  \clef treble
  \key c \major
  \andenstemme
}

drumvoice = \context DrumVoice = "D" {
  \override Voice.DynamicLineSpanner #'padding = #2
  \drumnotes
}

%%%%%%%%%%%%%%%% Staffs %%%%%%%%%%%%%%%%%%%%%%

melodistaff = \context Staff = "M" <<
  \set Staff.instrument = "Melodi"
  \set Staff.instr = "Mel"
  \melodivoice
  \andenvoice
  \globalinfo
>>

andenstaff = \new Staff <<
  \set Staff.instrument = "2. stemme"
  \set Staff.instr = "2"
  \andenvoice
  \globalinfo
>>

drumstaff = \context DrumStaff = "D"
\with {
  \override StemTremolo #'beam-thickness = #0.3
  \override StemTremolo #'beam-width = #1.5   
  \override StaffSymbol #'line-count = #1
  \override BarLine #'bar-size = #4
} <<
  \set Staff.minimumVerticalExtent = #'(-5 . 9)
  \set Staff.instrument = "Tromme"
  \set Staff.instr = "Tr"
  \drumvoice
  \globalinfo
>>



%%%%%%%%%%%%%%%%%%%%% Score %%%%%%%%%%%%%%%%%%%
\book {
% 
http://lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Multiple-movements.html
  \score {
    \header {
      piece = "Partitur"
    }
    <<
      \globaltime
      \new StaffGroup <<
        \melodistaff
        \drumstaff
      >>
    >>
  }
  \score {
    \header {
      piece = "2. stemme"
      breakbefore = ##t
    }
    <<
      \andenstaff
    >>
  }

}

Reply via email to