On Sep 29, 7:16, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote:
> I typed in a four part tune and found that the time signature had to
> be declared in each part. This seems strange because the time stuff
> is handled by the score context, so I should only have to declare one
> time signature for the music, it seems. The following version
> works,
>
> Could you send a faulty example?
The version I sent before was faulty. It gave a warning message.
Here it is again:
\score{
\type StaffGroup < \time 3/2;
\type Staff=treble \notes \relative c''{
r1 d2 | f4 f4 g2 f2 | d4 d4 c2 b2 | a4 [a8 g] a2 c2 |
f4 d4 e2 \bar "|:"; r2| r1. | r1 e2 | f4 [f8 e8] d2 c4()d4 |
e4 [e8 d8] c2 c4()e4 | d4 b a2 d2 | b4 [b8 c8] d2 c4()b |
a4 [a8 b] c2 d4.()c8 | b4 a4 a1 }
\type Staff=alto \notes \relative c'{
r1 d2 | a'4 a g2 a | f4 f e2 d | d4 d f2 f2 | a4 g4 a2 \bar "|:"; r2 |
r1 d,4()f | g [g8 f] g2 a4()g | a4 [a8 g8] a2 d,4()f | a4 a e2 e4()c |
f4 d4 e2 d2 | g4 a4 g2 f4()g | a4 [a8 g8] f2 g4.()f8 | d4 c d1 }
\type Staff=tenor \notes\relative a { \clef "G_8"; r1 a2 |
d4 d d2 c2 | a4 a a2 g2 | a4 [a8 b8] c2 a2 | c4 b4 a2 \bar "|:"; a2 |
d4 [d8 c8] d2 a4()c | d [d8 c8] d2 d4()c | d4 [d8 c8] d2 a4()b |
c4 [c8 b] a2 c4()a | a4 g4 c2 a2 | g4 a4 b2 a4()c |
d d a2 g4.()f8 | g4 a4 <d1 d,1> }
\type Staff = bass \notes\relative a, { \clef bass; r1 a2|
d4 d4 <g,2 g'2> <a2 a'2> | d4 d <a2 a'2> <g2 g'2> |
d'4 d <c2 f2> <a2 a'2> | <f4 f'4> <g4 g'4><a2 a'2> \bar "|:"; <a2 a'2>|
d4 d4 d2 d2 | <g,4 g'4> <g4 g'4> <g2 g'2> <a4~ a'4><c4 e4> |
d4 d4 d2 d2 | a4 a a2 a4()c | d4 <g,4 g'4> <a2 a'2> d2 |
<g,4 g'4> d'4 g2 f4()e | d4 [d8 c] d2 c4.~ <a8 d8> |
<g4 g'4><a4 a'4> d1 }
>
\paper{indent=0.0}
\midi{\tempo 2 = 60;}
}
The following version gives no warning, but it prints an extra empty
staff line.
\score{
\notes {\time 3/2; \type StaffGroup <
\type Staff=treble \notes \relative c''{
r1 d2 | f4 f4 g2 f2 | d4 d4 c2 b2 | a4 [a8 g] a2 c2 |
f4 d4 e2 \bar "|:"; r2| r1. | r1 e2 | f4 [f8 e8] d2 c4()d4 |
e4 [e8 d8] c2 c4()e4 | d4 b a2 d2 | b4 [b8 c8] d2 c4()b |
a4 [a8 b] c2 d4.()c8 | b4 a4 a1 }
\type Staff=alto \notes \relative c'{
r1 d2 | a'4 a g2 a | f4 f e2 d | d4 d f2 f2 | a4 g4 a2 \bar "|:"; r2 |
r1 d,4()f | g [g8 f] g2 a4()g | a4 [a8 g8] a2 d,4()f | a4 a e2 e4()c |
f4 d4 e2 d2 | g4 a4 g2 f4()g | a4 [a8 g8] f2 g4.()f8 | d4 c d1 }
\type Staff=tenor \notes\relative a { \clef "G_8"; r1 a2 |
d4 d d2 c2 | a4 a a2 g2 | a4 [a8 b8] c2 a2 | c4 b4 a2 \bar "|:"; a2 |
d4 [d8 c8] d2 a4()c | d [d8 c8] d2 d4()c | d4 [d8 c8] d2 a4()b |
c4 [c8 b] a2 c4()a | a4 g4 c2 a2 | g4 a4 b2 a4()c |
d d a2 g4.()f8 | g4 a4 <d1 d,1> }
\type Staff = bass \notes\relative a, { \clef bass; r1 a2|
d4 d4 <g,2 g'2> <a2 a'2> | d4 d <a2 a'2> <g2 g'2> |
d'4 d <c2 f2> <a2 a'2> | <f4 f'4> <g4 g'4><a2 a'2> \bar "|:"; <a2 a'2>|
d4 d4 d2 d2 | <g,4 g'4> <g4 g'4> <g2 g'2> <a4~ a'4><c4 e4> |
d4 d4 d2 d2 | a4 a a2 a4()c | d4 <g,4 g'4> <a2 a'2> d2 |
<g,4 g'4> d'4 g2 f4()e | d4 [d8 c] d2 c4.~ <a8 d8> |
<g4 g'4><a4 a'4> d1 }
>}
\paper{indent=0.0}
\midi{\tempo 2 = 60;}
}
This version also produces an extra staff line:
\score{
\type StaffGroup \notes{ \time 3/2;
<
\type Staff=treble \notes \relative c''{ \time 6/8;
r1 d2 | f4 f4 g2 f2 | d4 d4 c2 b2 | a4 [a8 g] a2 c2 |
f4 d4 e2 \bar "|:"; r2| r1. | r1 e2 | f4 [f8 e8] d2 c4()d4 |
e4 [e8 d8] c2 c4()e4 | d4 b a2 d2 | b4 [b8 c8] d2 c4()b |
a4 [a8 b] c2 d4.()c8 | b4 a4 a1 }
\type Staff=alto \notes \relative c'{ \time 3/2;
r1 d2 | a'4 a g2 a | f4 f e2 d | d4 d f2 f2 | a4 g4 a2 \bar "|:"; r2 |
r1 d,4()f | g [g8 f] g2 a4()g | a4 [a8 g8] a2 d,4()f | a4 a e2 e4()c |
f4 d4 e2 d2 | g4 a4 g2 f4()g | a4 [a8 g8] f2 g4.()f8 | d4 c d1 }
\type Staff=tenor \notes\relative a { \time 4/4;\clef "G_8"; r1 a2 |
d4 d d2 c2 | a4 a a2 g2 | a4 [a8 b8] c2 a2 | c4 b4 a2 \bar "|:"; a2 |
d4 [d8 c8] d2 a4()c | d [d8 c8] d2 d4()c | d4 [d8 c8] d2 a4()b |
c4 [c8 b] a2 c4()a | a4 g4 c2 a2 | g4 a4 b2 a4()c |
d d a2 g4.()f8 | g4 a4 <d1 d,1> }
\type Staff = bass \notes\relative a, {\clef bass; \time 4/4;r1 a2|
d4 d4 <g,2 g'2> <a2 a'2> | d4 d <a2 a'2> <g2 g'2> |
d'4 d <c2 f2> <a2 a'2> | <f4 f'4> <g4 g'4><a2 a'2> \bar "|:"; <a2 a'2>|
d4 d4 d2 d2 | <g,4 g'4> <g4 g'4> <g2 g'2> <a4~ a'4><c4 e4> |
d4 d4 d2 d2 | a4 a a2 a4()c | d4 <g,4 g'4> <a2 a'2> d2 |
<g,4 g'4> d'4 g2 f4()e | d4 [d8 c] d2 c4.~ <a8 d8> |
<g4 g'4><a4 a'4> d1 }
>}
\paper{indent=0.0}
\midi{\tempo 2 = 60;}
}
>
>
> I noticed that \relative and \transpose interact in an odd way.
>
> Yup. Correct. \relative applies a transformation on the information
> that follows it. \transpose does too. The two are not commutative
>
> If you do \transpose first, then the names and octaves are all
> different up. \relative will give weird effects.
>
> Of course, the simple solution is to avoid using \transpose inside
> \relative, but it might be desireable to do one of two things: change
> the behavior so that it makes some kind of sense, or print a warning
> message of some sort. One place where this could be particularly
> surprising is inside .fly files where there is an implicit \relative.
> If you use \transpose inside a .fly file, you'll see the weird
> behaviors.
>
>
> I could make \relative not look `inside' a \transpose.
So if you did \relative \transpose MUSIC then the MUSIC would be read
without any relative behavior?
> Then you would
> have to do
>
> \transpose \relative
>
> inside a .fly file for useful behaviour. How would you like that?
You already DO have to do \transpose \relative inside a .fly file for
useful behavior, so this would be no loss.
One disadvantage of printing a warning as Mats suggested is that
you'll always see the warning if you use "\transpose \relative" inside
a .fly file.