[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text listing output in .txt file
From: |
Thomas Morley |
Subject: |
Re: Text listing output in .txt file |
Date: |
Wed, 2 Aug 2017 21:43:03 +0200 |
2017-08-02 21:05 GMT+02:00 Jan-Peter Voigt <address@hidden>:
> 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
- Re: Text listing output in .txt file, (continued)
- Re: Text listing output in .txt file, Jan-Peter Voigt, 2017/08/02
- Re: Text listing output in .txt file, David Kastrup, 2017/08/02
- Re: Text listing output in .txt file, Thomas Morley, 2017/08/02
- Re: Text listing output in .txt file, David Kastrup, 2017/08/02
- Re: Text listing output in .txt file, Thomas Morley, 2017/08/02
- Re: Text listing output in .txt file, Daniel SanmartĂn Nieto, 2017/08/02
- Re: Text listing output in .txt file, Thomas Morley, 2017/08/02
- Re: Text listing output in .txt file,
Thomas Morley <=
- Re: Text listing output in .txt file, David Kastrup, 2017/08/02
Re: Text listing output in .txt file, mskala, 2017/08/03