lilypond-devel
[Top][All Lists]
Advanced

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

Re: Another \relative anomoly?


From: David Kastrup
Subject: Re: Another \relative anomoly?
Date: Sat, 22 Oct 2011 19:17:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Peekay Ex <address@hidden> writes:

> David,
>
> Re: the whole \relative discussion.
>
> This may or may not surprise you.
>
> \version "2.15.15"
> \relative c'' {
> f'4 a, a,, f
> \stopStaff
> \startStaff
> f'4 a, a,, f
> \stopStaff
> \startStaff
> f'''4 a, a,, f
> }
>
> Certainly didn't do what I expected it to.

Uh, what did you expect other than that?  That's pretty much the point
of relative mode.  It gets a tiny bit more surprising if you stuff the
sequence f'4 a, a,, f into a (non-relative) variable since the replay
still happens at different octaves: only after passing the sequence
through \relative does it have fixed assigned octaves.  And something
like

\version "2.15.15"
bingo = { f'4 a, a,, f }
{
\bingo
\stopStaff
\startStaff
\relative c'' { \bingo
\stopStaff
\startStaff
\bingo
}
}

might be more startling since text in a variable once getting
interpreted outside, and once inside of relative mode is disconcerting.
So you better tack \relative on right at the definition of \bingo, and
then further \relative will not have an effect on it and it keeps its
pitch.

-- 
David Kastrup



reply via email to

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