[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: overriding voiceOne to add properties to that specific voice context
From: |
David Kastrup |
Subject: |
Re: overriding voiceOne to add properties to that specific voice context |
Date: |
Thu, 20 Aug 2020 15:02:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Lukas-Fabian Moser <lfm@gmx.de> writes:
> Hi Maurits,
>
> Am 20.08.20 um 11:10 schrieb Maurits Lamers:
>> Hi,
>>
>> Great! This is the perfect solution. I had to adjust the
>> (define-scheme-function) call a bit to run also under 2.18:
>>
>> setStructuralVoice = #(define-scheme-function (parser location num)
>> (integer?)
>> (make-apply-context
>> (lambda (context)
>> (ly:context-set-property! context 'structuralVoice (if (> num 0) num
>> '())))))
>>
>> It might need even more tweaks to run under 2.14 which is my target. I know
>> it is a very old version, but there is a large body of Lilypond code my work
>> depends on and that is lilypond 2.14. I am afraid that it would distract the
>> current effort and cost too much time at the moment to convert that body of
>> work to a more recent version of lilypond.
>>
>> So, it will probably end up like this, as I am unsure whether lilypond v20
>> can deal with v18 type calls to define-scheme-function.
>
> [...]
>
> No need for that: When David K. got rid of the need to write out
> parser/location in every function definition five years ago, he also
> added a mechanism that detects and supports old-style usage (starting
> with "parser"). So your above definition works just fine in 2.20/2.21.
>
> Nevertheless, I'd urge you to try and make sure that everything you
> develop will work with current LilyPond versions. Not only in order to
> lower the barrier for developers to help you (or others to make use of
> your additions), but also because LilyPond simply has evolved a great
> deal in the in the nine (!!) years since 2.14.2 was released, and is
> now at the same time much more feature-rich _and_ easier to use.
Well, that's not much of a motivation to upgrade existing documents
(unless you want to add to them). But the typesetting has become quite
a bit better, too.
--
David Kastrup
- overriding voiceOne to add properties to that specific voice context, Maurits Lamers, 2020/08/19
- Re: overriding voiceOne to add properties to that specific voice context, Lukas-Fabian Moser, 2020/08/19
- Re: overriding voiceOne to add properties to that specific voice context, Lukas-Fabian Moser, 2020/08/19
- Re: overriding voiceOne to add properties to that specific voice context, Maurits Lamers, 2020/08/20
- Re: overriding voiceOne to add properties to that specific voice context, David Kastrup, 2020/08/20
- Re: overriding voiceOne to add properties to that specific voice context, Lukas-Fabian Moser, 2020/08/20
- Re: overriding voiceOne to add properties to that specific voice context,
David Kastrup <=
- Re: overriding voiceOne to add properties to that specific voice context, Lukas-Fabian Moser, 2020/08/20
- Re: overriding voiceOne to add properties to that specific voice context, Maurits Lamers, 2020/08/20
- Re: overriding voiceOne to add properties to that specific voice context, David Kastrup, 2020/08/20
- Re: overriding voiceOne to add properties to that specific voice context, Maurits Lamers, 2020/08/20