def to_png(self): c = Composition() c.set_author(self.author) c.set_title(self.title) c.add_track(self.track) ly_string = LilyPond.from_Composition(c) #print ly_string LilyPond.to_png(ly_string, self.title)
def sheetmusic(Gnumeric, range_ref, key = "C", upper = 4, lower = 4): ''' Convert the cells to sheet music. ''' left, top, right, bottom = u.parse_range_ref(Gnumeric, range_ref) values = u.range_rendered_text(Gnumeric, left, top, right, bottom, sheet = 1) #Gnumeric.functions['sheet'](range_ref)) t = to_track(values, key, upper, lower) lp = LilyPond.from_Track(t) return LilyPond.to_png(lp, '/tmp/track')