Re: repeats, nested repeats and alternatives

2007-09-07 Thread Mats Bengtsson



Neil Puttock wrote:

Hi Yota,

On 9/6/07, *yota moteuchi* <[EMAIL PROTECTED] 
> wrote:



Here, magically, the second alternative bar vanished... why ?!


You can't put overrides (or anything else) between the bracketed 
sections of \alternative; just put the bar number override inside the 
second alternative.

Well, you can, but what your code
\alternative {
   { e f e f }
   \set Score.currentBarNumber = #2
   { e f e b}

means is that the first alternative is { e f e f }, your second 
alternative is

\set Score.currentBarNumber = #2 and your third alternative is { e f e b}.
Read section "Music expressions explained" to understand why.

Also, regarding the bar numbering, the typesetting practice varies from 
score to
score. I've seen many scores where the two alternatives are counted as 
separate

measures.


3) Collapsing alternatives
>This is more a suggestion than a question but when dealing with big 
orchestral parts, the >\alternative tag is very painful to maintain. 
Indeed, in some case, trumpets have the same >alternatives bars ( i.e. 
alternative 1. and 2. are duplicates) and should/might be collapsed into 
>one bar. While in the conductor it have to remain expanded (because 
flutes have different >altenatives).
>Could this automatic collapsing (and numbering) be implemeted easily 
or obtained via a

>tweak?


One solution is to define your own music function (or rather use two 
alternative
implementations of the same function), which takes two arguments, the 
main part
of the repeat and the alternative. Here's an example. Note that both 
\score blocks

are identical.

\version "2.10.0"
% Definition to use in the individual parts:
repeatSameAlt =
#(define-music-function (parser location repeatbody alternative) 
(ly:music? ly:music?)

#{
 \repeat volta 2 {$repeatbody $alternative }
#})


\score{
 \relative c''{
   \time 3/4
   c c c
   \repeatSameAlt { d d d } { g g g }
 }
}

% Definition to use in the conductors score:
repeatSameAlt =
#(define-music-function (parser location repeatbody alternative) 
(ly:music? ly:music?)

#{
 \repeat volta 2 $repeatbody \alternative{{ $alternative }{ $alternative }}
#})


\score{
 \relative c''{
   \time 3/4
   c c c
   \repeatSameAlt { d d d } { g g g }
 }
}



   /Mats


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: repeats, nested repeats and alternatives

2007-09-06 Thread Neil Puttock
Hi Yota,

On 9/6/07, yota moteuchi <[EMAIL PROTECTED]> wrote:
>
>
> Here, magically, the second alternative bar vanished... why ?!


You can't put overrides (or anything else) between the bracketed sections of
\alternative; just put the bar number override inside the second
alternative.

The problem here is obviously the spanner, far too long. While \set
> Staff.voltaSpannerDuration = #(ly:make-moment 4 4) don't change anything
> (and I don't know why !)


If you check the program reference, you'll see that the Volta_engraver lives
in the Score context. Therefore your override should be changed to \set
Score.voltaSpannerDuration = #(ly:make-moment 4 4).

The documentation is incorrect here - the Volta_engraver used to live in the
Staff context, but the example in section 6.7.2 hasn't been changed yet
(I've requested a correction for this).

By the way, you'll get a warning (LilyPond doesn't like ending volta
spanners early) when you use this override, but it can be ignored.

Regards,
Neil
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: repeats, nested repeats and alternatives

2007-09-06 Thread yota moteuchi
did I forget something like an attachment


test.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


repeats, nested repeats and alternatives

2007-09-06 Thread yota moteuchi
Dear Mailing list

I have a bunch of questions about the repeat syntax I'll like to submit to
you.
\version "2.11.28"

1) About numbering
here is a ordinar situation of repeat volta with an alternative :

\repeat "volta" 2 {
a b c b
}
\alternative {
{ e f e f }
{ e f e b}
}
c a e f
\break
d e a g
f e f a
e e g d

(the resulting output is the first staff of the joined pdf)
A problem is raised by the numbering of the measures... the first
alternative shouldn't be counted but it is... so I corrected it manually

\repeat "volta" 2 {
a b c b
}
\alternative {
{ e f e f }
\set Score.currentBarNumber = #2
{ e f e b}
}
c a e f
\break
d e a g
f e f a
e e g d

(the resulting output is the second staff of the joined pdf)
Here, magically, the second alternative bar vanished... why ?!

2) About nested repeats
In the Hungarian March of Berlioz, there is many repeats and once in the
piece the second alternative continues a during few measures which are
themselves repeated. Here is a simplified example :

\set Staff.voltaSpannerDuration = #(ly:make-moment 4 4)
\repeat "volta" 2 {
a b c b
}
\alternative {
{ e f e f }
{ \repeat "volta" 2 {
e f e b
c a e f
\break
d e a g
f e f a
e e g d
}
}
}

(the resulting output is the third staff of the joined pdf)
The problem here is obviously the spanner, far too long. While \set
Staff.voltaSpannerDuration = #(ly:make-moment 4 4) don't change anything
(and I don't know why !)

3) Collapsing alternatives
This is more a suggestion than a question but when dealing with big
orchestral parts, the \alternative tag is very painful to maintain. Indeed,
in some case, trumpets have the same alternatives bars (i.e. alternative 1.
and 2. are duplicates) and should/might be collapsed into one bar. While in
the conductor it have to remain expanded (because flutes have different
altenatives).
Could this automatic collapsing (and numbering) be implemeted easily or
obtained via a tweak ?

Yota
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user