lilypond-devel
[Top][All Lists]

## Re: Should \partial accept music instead of duration?

 From: Christopher Heckman Subject: Re: Should \partial accept music instead of duration? Date: Sun, 20 Mar 2022 15:59:22 -0700

On Sun, Mar 20, 2022 at 1:26 AM Christopher Heckman
<christopher.heckman@asu.edu> wrote:
>
> On Sun, Mar 20, 2022 at 12:44 AM <lilypond-devel-request@gnu.org> wrote:
> >
> > Date: Sun, 20 Mar 2022 07:23:30 +0000 (UTC)
> > From: Werner LEMBERG <wl@gnu.org>
> > [...]
> > > Fair point, though the intention here would be that backwards
> > > compatibility would only need to exist for a time.  A warning could
> > > be issued whenever a user applies the older syntax; this would
> > > inform the user of the impending breaking change while still
> > > allowing existing code to compile.  When it is convenient, a future
> > > release would only support music as the argument.
> >
> > What about providing a new command \upbeat and moving \partial
> > into oblivion?  Compare this to \tuplet vs. \times.
> >
> >
> >     Werner
>
> ... Or you could use the brand new command \upbeat when music follows,
> keep \partial, and you don't have to worry about backwards
> compatibility.

This also seems to be a lot of trouble, because it seems like you
could define a one-line scheme music function and put it in your .ly
file. Something like this ought to work. (I might not have the syntax
100% correct.)

partialMusic =
#(define-music-function (parser location music) (ly:music?)
(let * (musicDur (ly:music-property music 'duration))
(#{ \partial $musicDur$music #})
))

--- Christopher Heckman