lilypond-user
[Top][All Lists]
Advanced

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

Re: Unconventional score and unwanted stray staff lines


From: David Bellows
Subject: Re: Unconventional score and unwanted stray staff lines
Date: Sun, 19 May 2019 08:56:02 -0700

Hey Aaron,

Before I respond to the rest of your email, I think it's worth going
over something I didn't emphasize enough in my first email. I've
attached a new pdf with instrument labels this time to make it easier
to follow.

The staves that continue to be printed appear to only happen when the
last note in that staff is an actual printed note. If it's a rest or a
space then the extra staves are not printed. Further experimentation
and it looks like the extra staves are only printed if the final note
is less than a quarter note (!). You can see this in two spots with
Piano 4 and Piano 5 on page 3. I've attached the .ly file as well.
Maybe something to do with the time signature as well?

This looks like a bug maybe?

> I would have thought it fairly trivial* to keep track of bar lines.  You
need only add up the durations of the notes you have emitted ...  Of
course, you might have notes that overlap the bar line,
and perhaps you are leveraging LilyPond's ability to automatically split
notes....  For the purposes of inserting bar checks, you
would skip it since the next note does not start the measure.

I've thought more about it and perhaps it would be fairly easy. I do,
as you mentioned here, use Lilypond's feature to automatically split
notes across bar lines. Skipping where there isn't  natural bar line
seems doable. But I guess my question is whether this would actually
help the situation?

> One thing to consider: if your music is really fluid, perhaps writing
things with \cadenzaOn makes sense.  Here there are no measures, and you
can emit bar lines whenever you see fit.

I use the bar lines mainly for aesthetic reasons. The software will
eventually be online and civilians will be able to use it to generate
audio files and sheet music (and lots of other stuff). I want the
evenly spaced bar lines because I think it looks cooler. And for
algorithms where everything fits neatly into measures then doing this
the default Lilypond way works (ie, I don't want to have to have too
create and maintain too many different printing options).

I think easier for me is to give the user the option to use the "s128"
option before the ending bar line if the printing looks funky and by
default not use it for the algorithms that are designed to fit neatly.

> Then again, it is entirely possible that your intentionally misaligned 
> systems are just
running afoul of some limitation of LilyPond.  I certainly have never
tried pushing this aspect of the software.

That could be.

On Sun, May 19, 2019 at 6:06 AM Aaron Hill <address@hidden> wrote:
>
> On 2019-05-18 10:46 pm, David Bellows wrote:
> >> Maybe use bar checks?
> >
> > Given that a lot of the music isn't generated to fit any particular
> > time signature (ie, the bar lines are often there just to break things
> > up to ease reading), I would get tons of bar check errors. Plus,
> > keeping track of when bars should be inserted in my software seems
> > like it would be a huge chore. Is this something you think would solve
> > the problem?
>
> I would have thought it fairly trivial* to keep track of bar lines.  You
> need only add up the durations of the notes you have emitted and, when
> the running count equals a whole measure, you know there is spot for a
> bar check.  Of course, you might have notes that overlap the bar line,
> and perhaps you are leveraging LilyPond's ability to automatically split
> notes.  In this case, you would see that the durations exceed a whole
> measure by some fraction.  For the purposes of inserting bar checks, you
> would skip it since the next note does not start the measure.
>
> (* Let's assume that 1/128 notes are the shortest duration your program
> generates.  Then each instance of that duration could simply add one to
> a counter.  1/64 notes add two; 1/32 add four; etc.  Depending on how
> many 1/128 notes make up the desired length of a measure, you subtract
> that amount from the running total when it is equal or greater.  And
> anytime the counter is zero, you emit a bar check before the next note.
> Of course the amounts to add get a little more interesting with tuplets
> and unusually scaled durations.  A more general-purpose rational
> representation could be useful.)
>
> I have not checked exactly, but perhaps your final measures on each line
> are not precisely aligned to a whole measure.  You can of course say
> \bar "|." early, but maybe you need to use \partial on the final measure
> as well.  Granted, this would require that your software cache notes
> before writing them so you can tell if you are going to have a short
> measure.
>
> One thing to consider: if your music is really fluid, perhaps writing
> things with \cadenzaOn makes sense.  Here there are no measures, and you
> can emit bar lines whenever you see fit.  (In fact, you *have* to emit
> bar lines if you want the music to be able to break across a lines.)
> But I am unsure if this is strictly speaking necessary to get your setup
> working.
>
> \stopStaff should be helpful to ensure that the StaffSymbol does not run
> past a point; but maybe you need to play around with break-alignment to
> resolve the issue of those pesky extra clefs showing up.  Then again, it
> is entirely possible that your intentionally misaligned systems are just
> running afoul of some limitation of LilyPond.  I certainly have never
> tried pushing this aspect of the software.
>
>
> -- Aaron Hill
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Attachment: test.ly
Description: Text Data

Attachment: test.pdf
Description: Adobe PDF document


reply via email to

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