]> git.donarmstrong.com Git - lilypond.git/commit - scm/music-functions.scm
Issue 3673: Make make-relative able to deal with music rather than just pitches
authorDavid Kastrup <dak@gnu.org>
Fri, 22 Nov 2013 08:54:26 +0000 (09:54 +0100)
committerDavid Kastrup <dak@gnu.org>
Sun, 1 Dec 2013 11:54:23 +0000 (12:54 +0100)
commit98a32d16cb94dea47813d166542e7bee57accd84
treeaf868bc0ba8ab2b9136570945139ccfb14a93140
parent15b9d5a33fe02826075a651e96ae21d2ae66a680
Issue 3673: Make make-relative able to deal with music rather than just pitches

The old behavior of make-relative was too cumbersome to use in many
cases.

This variant allows, for example:

withOctave =
  (ly:music?)
  (make-relative
   (music) music
   #{ \context Bottom << $music \transpose c c' $music >> #}))

\relative
\new Staff \withOctave {
  \partial 4. c'8 e g |
  c2 e,4 g |
  c,8 c' b a <g d'> <f c'> <e b'> <d a'> |
  <c g'>1 | \bar "|."
}
scm/music-functions.scm