On 2016-12-16 15:20, Urs Liska wrote:
Am 16. Dezember 2016 15:11:59 MEZ, schrieb David Nalesnik
<david.nales...@gmail.com>:
On Fri, Dec 16, 2016 at 8:07 AM, Knut Petersen [...]
(define-public (forceExtender)
(once (overrideProperty '(LyricExtender force-extender) #t)))
into scm/music-functions.scm, lilypond does know \forceExtender ...
but it complains about a "non-music expression" if it is used ...
Ah, this one. You explicitly have to create a music function. Maybe
https://scheme-book.ursliska.de/scheme/music-function-primer.html
helps you?
Oh, that looks nice... I need to spend some time on that one.
But you can say
(define forceExtender (define-musi-function ...
(define forceExtender
(define-music-function () ()
(once (overrideProperty '(LyricExtender force-extender) #t))))
should work, yes. But I think David's suggestion is even easier and
recommended. Note that
fgrep define-music-function scm/*
gives a pretty short list of 4 hits, and 2 of which are in the
definition of define-music-function itself. And
fgrep define-music-function ly/* | wc -l
shows a count of 131...
If you are defining a music function, do it in
ly/music-functions-init.ly,
In a .ly file (which is processed with all the syntactic sugar that
Lilypond has to offer) you can simply write
forceExtender = \once \override LyricExtender.force-extender = ##t
and that's it.
By the way, for the sake of consistency with other commands (except,
maybe, \hideNotes and \unHideNotes): My preferred choice of names would be
forcedExtendersOn = \override LyricExtender.force-extender = ##t
forcedExtendersOff = \override LyricExtender.force-extender = ##f
and a user can prefix a \once if necessary. (Unless someone comes up
with an apt antonym of "force" here - free, release, permit don't sound
sound...)
Cheers,
Alexander
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel