2017-08-02 21:05 GMT+02:00 Jan-Peter Voigt <[email protected]>:
> Hi Daniel and all others,
>
> you wrote about a critrical edition. There is scholarly:
> https://github.com/openlilylib/scholarly
> where you can add annotations to your score which then can be collected in
> another file.
> If you want to use the EE for tracking, you might use \applyContext #(lambda
> (context) ... ) .
> Of course you can use this function right inside your code.
>
> I am not at my computer right now, so I can not provide an example (yet).
> But perhaps someone else can make use of this idea.
>
> HTH
> Jan-Peter
Thanks David, Jan-Peter.
Probably:
remark =
#(define-music-function (strg)(string?)
#{
\applyContext
#(lambda (ctx)
(let* ((log-file (format #f "~a-remarks.txt" (ly:parser-output-name)))
(port (open-file log-file "a")))
(format port
"\nAt bar ~a, position ~a, (location in the ly-file: ~a)\n\t~a"
(ly:context-property ctx 'currentBarNumber)
(ly:context-property ctx 'measurePosition)
(*location*)
strg)
(close port)))
#})
{
\remark text
c4 d e f
\remark more-text
g a b c
\remark "further text: pitch is d, length 4"
d e f g
}
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user