Wim van Dommelen <m...@wimvd.nl> 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


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to