lilypond-user
[Top][All Lists]
Advanced

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

Re: Repeated durations: pitches vs rests


From: David Bellows
Subject: Re: Repeated durations: pitches vs rests
Date: Mon, 22 Feb 2021 13:23:43 -0800

Hello David,

> You can also write things like

Ah, that makes complete sense. I can totally see why this feature was
added and how the default behavior would be desired. I had assumed
that this was simply a shortcut similar to leaving out durations (eg,
"c8 d e f g" would all be 8th notes).

For the sake of the curious, below is a more detailed explanation for
why I wanted this other behavior. When converting my audio data to
LilyPond commands, the software goes through a table matching up
seconds in durations to LilyPond durations (tempo is handled
elsewhere), for example:

[.5] = "8",
[.75] = "8."
[1] = "4",
[1.5] = "4.",
...

If the lone duration command applied to an immediately preceding rest,
then I could treat tied rhythms as a single duration command in my
software:

[1.25] = "4~ 16"

This works as expected with pitches but when a rest is automatically
generated then it doesn't.

So why are rests automatically generated for me? If you have two
staves and a melody voice in one staff, my software automatically puts
in the corresponding rests in the other staff. So if the upper staff
is c''16 e''8 g''4 then the lower staff would automatically put in r16
r8 r4 like one might see in, say, Baroque music.

If the lone duration worked as I had expected then generating a "c4~
16" for one staff would result in "r4~ 16" which would be printed as
"r4 r16".

So instead of just adding tied rests to the table above, I have to
code in how to deal with tildes in order to handle tied durations. It
can be done but will just require more work than just adding entries
into a table.

Thanks everyone for your help and explanations,
Dave Bellows
https://www.platonicmusicengine.com

On Mon, Feb 22, 2021 at 12:41 PM David Kastrup <dak@gnu.org> wrote:
>
> David Bellows <davebellows@gmail.com> writes:
>
> > Hi Timothy,
> >
> >> David Kastrup (who probably implemented the feature) comments on the
> >> design decisions here
> >
> > Thanks for that. That is definitely not a use-case I had anticipated
> > though it's nice to see that I'm not alone in wondering about the
> > default behavior. And apparently my solution involving an alternate
> > syntax (adding a ~ (tilde) to a rest to make LilyPond repeat the rest)
> > is probably not worth the effort to implement or maintain.
>
> You can also write things like
>
> \new RhythmicStaff \drummode { tambourine
>   4 4 \tuplet 3/2 { 8 8 8 } r8 8
>   R1*8
>   4 4 r8 8 4
> }
>
> and need to write "tambourine" only once.  If rests would override the
> "tambourine", that would be a lot less convenient.
>
> --
> David Kastrup



reply via email to

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