def create_midi_config(self):
it, page_vbox = self.new_page_box(None, _("Instruments"))
vbox, category_vbox = gu.hig_category_vbox(_("Tempo"))
page_vbox.pack_start(vbox, False, False, 0)
sizegroup = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
tempo_hbox = Gtk.Box(spacing=6)
self.g_default_bpm = gu.nSpinButton('config', 'default_bpm',
Gtk.Adjustment(self.get_int('config/default_bpm'), 10, 500, 1, 10))
self.g_arpeggio_bpm = gu.nSpinButton('config', 'arpeggio_bpm',
Gtk.Adjustment(self.get_int('config/arpeggio_bpm'), 10, 500, 1, 10))
for text, widget in [(_("_Default:") ,self.g_default_bpm),
(_("A_rpeggio:") ,self.g_arpeggio_bpm)]:
label = Gtk.Label(_("BPM"))
tempo_hbox.pack_start(
gu.hig_label_widget(text, [widget, label], None),
False, False, 0)
label.set_tooltip_text(_("Beats per minute"))
category_vbox.pack_start(tempo_hbox, False, False, 0)
box, category_vbox = gu.hig_category_vbox(_("Preferred Instrument"))
page_vbox.pack_start(box, False, False, 0)
self.g_instrsel = nInstrumentSelector('config',
'preferred_instrument', None)
category_vbox.pack_start(self.g_instrsel, False, False, 0)
box, category_vbox = gu.hig_category_vbox(_("Chord Instruments"))
page_vbox.pack_start(box, False, False, 0)
self.g_instrument_configurator \
= InstrumentConfigurator("config", 3,
_("Use different instruments for chords and harmonic intervals"))
category_vbox.pack_start(self.g_instrument_configurator, False, False, 0)
vbox, category_box = gu.hig_category_vbox(_("Percussion Instruments"))
page_vbox.pack_start(vbox, False, False, 0)
category_box.pack_start(gu.hig_label_widget(
_("Count in:"),
gu.PercussionNameButton("config", "countin_perc", "Claves"),
sizegroup, True, True), True, True, 0)
category_box.pack_start(gu.hig_label_widget(
_("Rhythm:"),
gu.PercussionNameButton("config", "rhythm_perc", "Side Stick"),
sizegroup, True, True), False, False, 0)
评论列表
文章目录