Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I just got this answer from David Kastrup, one of the developers of LilyPond:</p> <hr> <p>The "octave transposition" happens because basically \transpose c c is the same as \absolute (as LilyPond does not apply \relative to transposed music).</p> <p>\absolute is not necessary in connection with \repeat unfold: \repeat unfold knows how to deal with relative music.</p> <p>Version 2.14.2 is awfully old. At any rate, there is currently issue <a href="http://code.google.com/p/lilypond/issues/detail?id=3673" rel="nofollow">http://code.google.com/p/lilypond/issues/detail?id=3673</a> in the LilyPond tracker, and the respective code can be found at <a href="https://codereview.appspot.com/30890043/diff/40001/scm/music-functions.scm" rel="nofollow">https://codereview.appspot.com/30890043/diff/40001/scm/music-functions.scm</a></p> <p>And there we get indeed into Scheme programming. The respective defmacro-public would likely work even in 2.14 though #{ #} might not work properly.</p> <p>With that definition, your double definition would become:</p> <p>double = #(define-music-function (parser location note) (ly:music?) (make-relative (note) note #{ $note $note #}))</p> <p>and would then work in both absolute and relative mode. If the 2.14 #{ #} does not jibe with make-relative, writing (make-sequential-music (list (ly:music-deep-copy note) (ly:music-deep-copy note))) should serve as a Scheme replacement.</p> <p>The original problem becomes easier to understand once you realize that it's just a simple code replacement, so \relative { \double c' } becomes \relative { c' c' } using different octaves. The make-relative macro will to the \relative operation only on a single note, and then paste the results into the music expression.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload