Hey Thomas, > Maybe throw \RemoveEmptyStaves away.
That works for this example but when I incorporate that back into the original issue (https://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00263.html) it results in the stray staves being printed which is what lead to this whole problem in the first place. Because these examples are all part of the same music generating algorithm, I don't think I'm going to be able to come up with a rule for when to include \RemoveEmptyStaves and when not to. On Sun, Dec 1, 2019 at 1:20 AM Thomas Morley <thomasmorle...@gmail.com> wrote: > > Am Sa., 30. Nov. 2019 um 23:19 Uhr schrieb David Bellows > <davebell...@gmail.com>: > > > > Hello everyone, I started this thread back in May and as far as I can > > tell the main problem has not been added to the tracker. > > Yep. > > > > As I was playing around with my software (summary: a program that > > generates music and then automatically generates Lilypond files where > > the Lilypond file is compiled without any human interaction so it has > > to be able to handle some crazy, crazy stuff), I discovered a > > situation that is not properly handled by the workaround. I fear that > > fixing this will require a workaround for the workaround which feels > > like a bad thing. But since I don't understand what's going on and I > > don't understand the relationship between the minimal working examples > > supplied by others and my original example, I have no idea if the new > > problem is part of the original issue, part of the workaround, an > > entirely separate issue that happens to be rearing its ugly head here. > > > > As you'll see, the problem is incorporating a score that is > > entirely/mostly rests into the previous workaround. Problems result. > > > > So, I'm not sure what my next step should be. > > > > Anyway, I've attached a Lilypond file. There are three different ways > > to compile it, you just comment out the options you don't want. I've > > attached the three resulting pdfs. I apologize for any extraneous code > > and the way it is structured as I've kept it as close to my original > > form as possible. > > > > Thanks for any additional help, > > Dave Bellows > > Your first example is ok. there's no need for a line-break. > Same for the second one: You use \RemoveEmptyStaves, thus the second > line of rests is deleted. > Consequently your third example (with notes) works as expected. > > Maybe throw \RemoveEmptyStaves away. > > > Cheers, > Harm