Am 02.09.18 um 21:21 schrieb Torsten Hämmerle:
How about using ly:context-property-where-defined?
As in:


%%%%%%%%%%%%%%%
\version "2.19.82"

increaseBarNumber =
#(define-music-function (par loc addm) (integer?)
    (make-apply-context
     (lambda (context)
       (let* ((where (ly:context-property-where-defined context
'currentBarNumber))
              (cbn (ly:context-property where 'currentBarNumber)))
         (ly:context-set-property! where 'currentBarNumber (+ addm cbn))))))

Again what learned ;)

But does this have any advantage over ly:context-find 'Score/'Timing/'whatever if I already know that the context property I want to change lives in Score/Timing/whatever?

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to