lilypond-user
[Top][All Lists]
Advanced

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

Re: Proposed new available and recommended behavior of \relative


From: David Kastrup
Subject: Re: Proposed new available and recommended behavior of \relative
Date: Sun, 10 Mar 2013 10:06:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Wim van Dommelen <address@hidden> writes:

> Agree, we should have an easy way to switch from absolute to relative
> (Yes, everthing inside \relative { } is relative, all other is
> absolute, I know), like: \absolute: from here on everything is
> absolute like \clef bass tells me: from here on display everything in
> the bass clef.

Barely tongue-in-cheek:

absolute =
#(define-music-function (parser location music) (ly:music?)
   (make-music 'TransposedMusic 'element music))

When placed inside of a \relative block, \relative will route around
this music.  It stays in absolute pitch and does not even touch the
reference pitch of \relative.  This might be somewhat useful in
connection with music variables:

melody = \absolute { c'4 e' g' c' }

\relative f { c''4. g'8 c,2 \melody d4 e f c }


If you wrote just

melody = { c'4 e' g' c' }

here, things would go rather haywire.

-- 
David Kastrup




reply via email to

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