def play_all_notes(self): if self.q_status == self.QSTATUS_NO: return s = r"\staff{" for n in self.m_question: s = s + " " + n s = s + "}" utils.play_music(s, self.get_int('config/default_bpm'), self.get_int('config/preferred_instrument'), self.get_int('config/preferred_instrument_volume'))
def f(w, start, end, self=self): try: utils.play_music(self.m_t.m_P.get_music(), self.m_t.m_P.get_tempo(), cfg.get_int('config/preferred_instrument'), cfg.get_int('config/preferred_instrument_volume'), start, end) except Exception, e: if not self.standard_exception_handler(e, soundcard.synth.stop): raise
def f(w, start, end, self=self): try: utils.play_music( self.m_t.m_P.get_music(), self.m_t.m_P.get_tempo(), cfg.get_int('config/preferred_instrument'), cfg.get_int('config/preferred_instrument_volume'), start, end) except Exception, e: if not self.standard_exception_handler(e, soundcard.synth.stop): raise
def play_midi_test_sound(self): try: utils.play_music(r""" \staff\relative c{ c16 e g c e, g c e g, c e g c4 } \staff{ c4 e g8 e c4 } """, 130, 0, 100) # Here we are only cathing exceptions we know the MidiFileSynth # can raise. Maybe we should catch something from the Sequencer # synths too? except osutils.BinaryBaseException, e: solfege.win.display_error_message2(e.msg1, e.msg2)
def play_midi_test_sound(self): try: utils.play_music( r""" \staff\relative c{ c16 e g c e, g c e g, c e g c4 } \staff{ c4 e g8 e c4 } """, 130, 0, 100) # Here we are only cathing exceptions we know the MidiFileSynth # can raise. Maybe we should catch something from the Sequencer # synths too? except osutils.BinaryBaseException, e: solfege.win.display_error_message2(e.msg1, e.msg2)
def on_play(self, _o): t = self.m_buf.get_text(self.m_buf.get_start_iter(), self.m_buf.get_end_iter(), True) self.save(t) utils.play_music(t, (120, 4), 0, 100)
def play_sad_sound(self): utils.play_music(r"\staff\relative c'{<c,,8 cis>", 80, 58, cfg.get_int('config/preferred_instrument_volume'))
def play_happy_sound(self): utils.play_music(r"\staff\relative c'{c16 e g a}", 180, 8, cfg.get_int('config/preferred_instrument_volume'))