def show_music(self):
self.clear_stacking_frame()
md = mpd.MusicDisplayer()
self.g_source.pack_start(md, True, True, 0)
md.show()
md.display(r"\staff{ \clef %s < %s >}" % (
mpd.select_clef(self.m_t.m_P.get_music_as_notename_string('music')),
self.m_t.m_P.get_music_as_notename_string('music')), 20)
# display the notenames on the buttons with octave info
v = self.m_t.m_P.get_music_as_notename_list('music')
v.sort(mpd.compare_notenames)
for n in v:
b = Gtk.Button(mpd.MusicalPitch.new_from_notename(n).get_user_octave_notename())
b.get_children()[0].set_use_markup(1)
b.show()
self.g_answer.pack_end(b, False, False, 0)
评论列表
文章目录