Hello,

to work with foot- or end-notes its good to know the current position in music - of course this doesn't make sense for a paragraph of pure text ;-) So I digged for a way to fetch the current position in music - these are only some hints for me to remember and perhaps for you to try:
--snip--
\version "2.12.3"

show = #(define-music-function (parser location name) (string?)
  (make-music 'ApplyContext
    'origin location
    'procedure
    (lambda (c)
            (let*
              ((cbn (ly:context-property c 'currentBarNumber))
               (cbn (if (not (number? cbn)) 0 cbn))
               (cmp (ly:context-property c 'measurePosition)))
              (display name)
              (display (format " Measure ~a at ~a/~a (~a/~a)\n"
                         cbn
                         (ly:moment-main-numerator cmp)
                         (ly:moment-main-denominator cmp)
                         (ly:moment-grace-numerator cmp)
                         (ly:moment-grace-denominator cmp)))
))))


music = #(define-music-function (parser location name) (string?)
  #{
    \relative c' {
\show #$name s1*0 \show #$name c2. \show #$name r4 d \show #$name e \show #$name f
    }
#})

\score {
<<
    \music #"A"
    { s2. \music #"B" }
>>
}
--snip--
This simply prints out the current position in the music. The name string is for looking at the order of processing the music.

I will have another look on this later.

Best regards,
Jan-Peter


On 09.02.2011 22:38, Bertrand Bordage wrote:
Thanks Jan-Peter !

I agree with your idea of using asterisks instead of numbers when annotating scores (but for text, numbers seems more elegant).
For the moment, I will try to do LaTeX-like footnotes for markuplines.

Indeed, this would be a good solution for now :
- A column of footnotes on each page of markuplines
- Endnotes for the musical parts. Maybe without any sign on the score, but with a reference to the score name, the current bar number and the instrument name in the list of endnotes, like in Ricordi's critical notes. This will avoid the parallel music parsing issue. And it looks sooo classy ;-) (or boring)

Then I'll have a deeper look on this parsing issue.

Any help would be welcome :o)

Regards,
Bertrand


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to