Peter Mogensen wrote:
> So how would notation-export figure out how to generate repeat-notation,
> if only some tracks have repeats?
> I would say that it should only generate repeat-notation,if all the
> tracks marked for export to a given score share repeats. Else it should
> expand all repeats (an option could allow to expand everything anyway).
... or maybe just export as the example Lilypond file I've attached.
The sample simulates two tracks.
Track1: Melody, 1 segment, no repeats
Track2: Chorus. 3 segments. Segment 2 is repeated one time.
The resulting export prints a nice score and an extract with the correct
repeats.
Peter
\version "2.6.3"
\header {
title = "Template"
subtitle = "subtitle"
composer = "Traditional"
arranger = "Arranger"
enteredby = "I typed this"
maintainerEmail = "[EMAIL PROTECTED]"
meter = "moderato"
}
\paper {
linewidth = 16.0 \cm
#(set-paper-size "a4")
raggedlastbottom = ##t
raggedbottom = ##t
betweensystempadding = 1.0\cm
betweensystemspace = 0.30\in
leftmargin = 2\cm
scoreTitleMarkup = \markup {
\fill-line {
\fromproperty #'header:instrument
}
}
}
#(set-global-staff-size 14)
\layout {
\context { \RemoveEmptyStaffContext }
}
%%%%%%%%%%%%% Helper definitions %%%%%%%%%%%%%
slip = \drummode {
\once \override Stem #'stroke-style = #"grace" \grace sn8
}
%%%%%%%%%%%%%%%% General %%%%%%%%%%%%%%%%%%%%%
globaltime = {
\time 2/2
}
%%%%%%%%%%%%%% Rehearsal marks %%%%%%%%%%%%%%%
globalinfo = {
s1*2 \mark \default
\repeat "volta" 2 {s1*4 } \mark \default
s1*2
}
%%%%% Note elements / Rosegarden segments %%%%%%%%%
melodysegment = \relative c' {
% one segment , no repeats
c'4 c c c
e e e e
g,4 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
}
% A track with repeated segments
segmentA = \relative c' {
c1
c1
}
segmentB = \relative c' {
\repeat "volta" 2 {
d1
d1
d1
d1
}
}
segmentC = \relative c' {
e1
e1
}
%%%%%% Voices / Rosegarden Tracks %%%%%%%%
melodyvoice = \new Voice {
\clef treble
\key c \major
\melodysegment
}
% This RG track has 3 segments.
secondvoice = \new Voice {
\clef treble
\key c \major
\segmentA
\segmentB
\segmentC
}
%%%%%%%%%%%%%%%% Staffs %%%%%%%%%%%%%%%%%%%%%%
% Since "melodysegment" has no repeats. Other tracks are unfolded.
melodystaff = \new Staff <<
\set Staff.instrument = "Melodi"
\set Staff.instr = "Mel"
\melodyvoice
\unfoldRepeats { \secondvoice }
\unfoldRepeats { \globalinfo }
>>
secondstaff = \new Staff <<
\set Staff.instrument = "2. stemme"
\set Staff.instr = "2"
\secondvoice
\globalinfo
>>
%%%%%%%%%%%%%%%%%%%%% Score %%%%%%%%%%%%%%%%%%%
\book {
\score {
\header {
instrument = "Partitur"
}
<<
\globaltime
\new StaffGroup <<
\melodystaff
>>
>>
}
\score {
\header {
instrument = "2. stemme"
breakbefore = ##t
}
<<
\secondstaff
>>
}
}