[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: music function to be included somewhere in scm/*

From: Alexander Kobel
Subject: Re: music function to be included somewhere in scm/*
Date: Fri, 16 Dec 2016 15:38:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 2016-12-16 15:20, Urs Liska wrote:
Am 16. Dezember 2016 15:11:59 MEZ, schrieb David Nalesnik <address@hidden>:
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

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

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...)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]