Esempio n. 1
0
    def run(self):
        import select

        alsaseq.client(appinfo.name, self.num_inports, self.num_outports, True)
        self.start_time = datetime.now()
        alsaseq.start()
        log.debug("ALSA sequencer started")

        alsafd = alsaseq.fd()
        while not self.join_req:
            fds_ready = select.select([alsafd], [], [], 0.1)
            if alsaseq.inputpending():
                raw_event = alsaseq.input()
                new_event = self.create_event(raw_event)
                self.dispatch_event(new_event)
Esempio n. 2
0
    def run(self):
        import select

        alsaseq.client(appinfo.name, self.num_inports, self.num_outports, True)
        self.start_time = datetime.now()
        alsaseq.start()
        log.debug("ALSA sequencer started")

        alsafd = alsaseq.fd()
        while not self.join_req:
            fds_ready = select.select([alsafd], [], [], 0.1)
            if alsaseq.inputpending():
                raw_event = alsaseq.input()
                new_event = self.create_event(raw_event)
                self.dispatch_event(new_event)
        alsaseq.stop()
        alsaseq.close()
Esempio n. 3
0
alsaseq.connectto(1, dest_cliente, 0)
alsaseq.start()
pgmchangevoz1 = alsamidi.pgmchangeevent(0, voz1)
pgmchangevoz2 = alsamidi.pgmchangeevent(1, voz2)
alsaseq.output(pgmchangevoz1)
if voz2:
    alsaseq.output(pgmchangevoz2)

nlibres = 100
import kbhit

kbhit.unbuffer_stdin()
vivo = 1
seq = alsamidi.Seq()
try:
    fd = alsaseq.fd()
    thso = threading.Thread(target=supplyoutput)
    thso.start()
    thri = threading.Thread(target=retrieveinput)
    thri.start()

    seq.read(ruta)
    playback()

    while letra != "q":
        letra = kbhit.getch().decode()
        parsecommand()

except:
    traceback.print_exception(*sys.exc_info())
    kbhit.restore_stdin()
Esempio n. 4
0
alsaseq.connectfrom(0, source_cliente, 0)
alsaseq.connectto(1, dest_cliente, 0)
alsaseq.start()
pgmchangevoz1 = alsamidi.pgmchangeevent(0, voz1)
pgmchangevoz2 = alsamidi.pgmchangeevent(1, voz2)
alsaseq.output(pgmchangevoz1)
if voz2:
    alsaseq.output(pgmchangevoz2)

nlibres = 100
import kbhit
kbhit.unbuffer_stdin()
vivo = 1
seq = alsamidi.Seq()
try:
    fd = alsaseq.fd()
    thso = threading.Thread(target=supplyoutput)
    thso.start()
    thri = threading.Thread(target=retrieveinput)
    thri.start()

    seq.read(ruta)
    playback()

    while letra != 'q':
        letra = kbhit.getch().decode()
        parsecommand()

except:
    traceback.print_exception(*sys.exc_info())
    kbhit.restore_stdin()