我正在将乐谱的部分切成节拍中的片段。我正在使用Music21和Lilypond将输出转换为PNG。尽管有一个非常具体的问题,但是我没有只显示摘要只包含休息。如果其余的用注释显示,则可以很好地显示。但是,如果条由休息组成,则图像为空白。我的猜测是,该程序在没有贝司谱号的上下文时不知道将其余的位置放置。 。如果有人可以提供一些很酷的见解! 当我使用上述代码时,请加油,
n = note.Note("C4")
r = note.Rest()
ss = stream.Stream()
ss.append(n)
ss.append(r)
ss.show("lily")
我将获得
然后,当我使用以下代码时,我将获得
r = note.Rest()
ss = stream.Stream()
ss.append(r)
ss.show("lily")
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")
发布评论
评论(1)
Lilypond界面不是那么强,所以更好的是安装MusesCore
输出:
Lilypond interface is not so strong, so better would be to install MuseScore
output: