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 11:30:38 -0800

Hello David,

> Why does your software want to emit a lone duration?

To take advantage of the recent addition of this feature to the
LilyPond code. Given how my audio data is converted into LilyPond
syntax, using this shortcut would have made certain kinds of durations
easier for me to code in.

> Does it not know what pitch, or silence, is required at that point? Why is 
> this
information not immediately to hand?

The software and the process are complicated. The audio data is stored
in its own format (frequency, duration in seconds, amplitude between 0
and 1) which corresponds almost directly to what I need in Csound.
Converting that to what LilyPond needs involves a binary search of a
table with the key being durations in seconds and the values as
LilyPond durations. That's already a fairly large table and right now
it has almost no double dotted durations. Adding tied durations would
make it even more tedious.

To make this long story short and leaving out some other crucial
details, the solution for tied rhythms could have been handled with
almost no code if the lone duration feature operated in the manner I
assumed it would, eg r4~ 16 would produce two rest notes. Since it
doesn't work this way, this means I need to code in how to deal with
tied durations. It can be done, but it is more work than I had hoped
for. I'll survive, it just surprised me that the behavior is not what
I expected.

> That's right: Music Notation 101. We all learn to deal with that.

Not sure what your point is.

> Go back and redesign how your software codifies the
music, and how it generates LP code from that, using an absolute pitch
and duration for each note, chord and rest.

Five years in and I'm not going to redo everything just to make this
one thing work easier. The LilyPond part of the software operates well
as it is, it just now needs to deal with an extra problem.

> and a lot more typing for people.

And that's mainly what I was trying to find out. For me, the expected
behavior is that with a lone duration, the rest would be repeated if
it is the object immediately preceding the lone duration. If it turns
out that most people would expect that rest to be ignored and for
LilyPond to keep searching backward till it finds a pitch, then that's
fine. Not what I expected but if I'm in the minority then code
operates as it should. If I were in the majority then it would seem to
be in everyone's best interest if the behavior were changed.

Dave

On Mon, Feb 22, 2021 at 9:36 AM David Wright <lilylis@lionunicorn.co.uk> wrote:
>
> On Mon 22 Feb 2021 at 00:07:56 (-0800), David Bellows wrote:
> >
> > Right, so I'm not asking for two rests to actually be tied. I was just
> > hoping that the behavior of a lone duration value would repeat the
> > rest right before it and not skip back till it finds a note.
>
> Why does your software want to emit a lone duration? Does it not know
> what pitch, or silence, is required at that point? Why is this
> information not immediately to hand?
>
> > For example, instead of {c4 r4 16} resulting in "C, rest, C", it would
> > be "C, rest, rest" with no ties anywhere.
>
> At a stroke, this destroys the documented intent of the isolated
> duration notation:
>
>    "Isolated durations in music sequences now stand for unpitched
>     notes. This may be useful for specifying rhythms to music or
>     scheme functions. When encountered in the final score, the pitches
>     are provided by the preceding note or chord."
>
> Rhythmic sequences, of course, need to be able to include rests,
> and their inclusion shouldn't cause LP to throw away all the pitch
> information that's being duplicated.
>
> > My software can handle all normal durations including dotted ones. But
> > a quarter tied to a 16th can only be notated with a tie. There is no
> > other simple way to notate it which means I need two notes or two
> > rests in my LilyPond file.
>
> That's right: Music Notation 101. We all learn to deal with that.
>
> > I'm sure I can eventually figure out how to make LilyPond's current
> > behavior work with my software, it's just that it will take a lot of
> > work.
>
> No, don't do that. Go back and redesign how your software codifies the
> music, and how it generates LP code from that, using an absolute pitch
> and duration for each note, chord and rest. Short-cuts are for humans.
>
> > If a lone duration would use a previous rest instead of going
> > back to find a note, then it would be much easier for me to implement.
>
> … and a lot more typing for people. (That's ignoring any consideration
> of preexisting LP and scheme code that would need conversion.) Any
> short-cut is a trade-off, \relative being one of the more discussed
> examples on this list, but the benefits of this particular one might
> not be obvious to someone who writes only melodies, for example.
>
> Cheers,
> David.



reply via email to

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