I'm cutting up sections of sheet music into snippets on the beat. I'm using music21 and LilyPond to convert the output into a png. There's a very specific issue though where I get no display of a snippet only containing a rest. If the rest is being displayed with note then it shows fine.. but if the bar consists of a rest and nothing else the image is blank. My guess would be the program doesn't know where to place the rest when there's no context to wether a bass clef - stave is being used.. but I did attempt to providing placement information to the rest through Style.absoluteY module but no joy. If anybody could provide a bit of insight that'd be cool! Cheers
n = note.Note("C4")
r = note.Rest()
ss = stream.Stream()
ss.append(n)
ss.append(r)
ss.show("lily")
When I use the above code I get an output of image of 1/4 note and 1/4 rest
Then, when I use the below code I get an output of blank white box, where there should be a single 1/4 rest
r = note.Rest()
ss = stream.Stream()
ss.append(r)
ss.show("lily")