lilypond-user
[Top][All Lists]
Advanced

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

Re: Adding durations (for \after)


From: Lukas-Fabian Moser
Subject: Re: Adding durations (for \after)
Date: Fri, 11 Nov 2022 20:20:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

Hi Joel,

Am 11.11.22 um 15:37 schrieb Joel C. Salomon:
But if that can be done from a Scheme function, it’s probably sufficient; no need to tamper with Lilypond grammar.

To use Lucas’s example:
[which was wrong, as I forgot the tied notes, sigh - but that doesn't matter.]

r8 es2.-8 f2 ges8~
8 as2.-8 8

can

    r8 es \duration_subtract{2.}{8} f2 …

be made to work?  (With whatever syntax.)

This seems to be difficult, as it seems a scheme function returning a duration is not accepted in this position:

\version "2.23.5"

test = #
(define-scheme-function () ()
  (ly:make-duration 1 1))

{
  c'\test
}

% this works:
{
  c' $(test)
}

Which is a pity since this makes for a much less convenient syntax: It would look something like

c' $(duration_substract #{ 2. #} #{ 8 #})

As far as I know there's no LilyPond syntax equivalent to $(...) for a LilyPond scheme function...?

Lukas



reply via email to

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