[Top][All Lists]

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

Re: Unconventional score and unwanted stray staff lines

From: Aaron Hill
Subject: Re: Unconventional score and unwanted stray staff lines
Date: Sun, 19 May 2019 06:04:31 -0700
User-agent: Roundcube Webmail/1.3.8

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

reply via email to

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