lilypond-user
[Top][All Lists]
Advanced

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

Re: Adding durations (for \after)


From: Jean Abou Samra
Subject: Re: Adding durations (for \after)
Date: Fri, 11 Nov 2022 00:40:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

Le 11/11/2022 à 00:14, Lukas-Fabian Moser a écrit :
Well, duration-or-music? already exists and it's used by \skip.
Ah, my bad, I didn't think of looking whether it might already exist. I'm surprised that such an either-/or type predicate doesn't wreak havoc with the parser.




It is something David spent a lot of time on, AFAIK. In this situation
where the parser has several possible interpretations, it tries the
variants (in this case, duration and music) until it finds on that
matches the predicate.



However, this makes for the slight oddity that \skip 4 ... does not set the
default duration for the following music, whereas \skip {4} does.

Which reminds me: Making the current parser default duration scheme-accessible is a long-standing project of mine. This might creating well-behaved music functions a little easier.




Sounds interesting, although I'm not sure how you would use it
from a function, since the parser has already advanced to read
all arguments when the function is called.



I think this might actually be quite useful - but maybe the (not easily implemented) "minus" operation might be even better. I had to think of the last piece of Schumann's /Dichterliebe/ op. 48:Of course, we could just ask Schumann to finally sit down and learn a bit about the basic rules of notation :-), but I'd love to be able to do something like (with \language deutsch)

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

etc. Obviously, "2.-8" would need to use a different operator symbol, not -, for the reason you gave.



Well, in my mind, the "+" operator was more intended for cases
where you don't care about the log and dot count, just the length,
although it is true that one could apply it to cases similar to
the one you show.

Basically I was thinking about arranger.ly, which (ab)uses Scheme
syntax to provide a convenient way to denote positions in the
music.

https://github.com/gilles-th/arranger.ly/blob/master/DOC/arrangerDoc-en.pdf

Apart from the car of the position list, which is the bar number,
the cdr can look like this, with a transcription in my notation:

  '(4 8)    <->   4 + 8
  '(4 8.)   <->   4 + 8.
  '(4 8.2)  <->   4 + 8..

This feels both clever and ... let's say hacky, but it makes me
wonder if LilyPond would benefit from supporting this kind of thing
without this kind of trick.

A music expression does work. But it's not quite the same, as we
are seeing with the problem that if 4 in \after 4 is a duration,
it's inconsistent with { ... } in that it doesn't set the default
duration, but if it's music, it catches articulations after it.

A "minu" operator could *also* be useful when you don't care about
the length, and in fact arranger.ly also supports negative numbers,
like

  '(1 -16)  <->  2...

But I don't know what syntax to pick for that, or if it's essential
to have one or if "+" alone is already useful enough on its own.
1`16 is the best I could find, but it's not wonderfully mnemonic.
I think the reason why I can feel like it's a difference is the
set difference operator \ which is a bar in the same direction
as ` if you squint at it, but I doubt others will have that feeling ...

Gilles, as the author of arranger.ly, maybe you have thoughts on this?

Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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