Exemple #1
0
 def threadfunc(self):
     while True:
         msg = pyrawmidi.read()
         if self.threadid!=thread.get_ident():
             break
         midimsg = MidiMsg(msg)
         self.gui.postEvent(midimsg)
     self.terminated = True
Exemple #2
0
 def threadfunc(self):
     self.running = True
     while True:
         msg = pyrawmidi.read()
         if not self.run:
             break
         if not self.analyse(msg):
             printcmd(msg)
     self.running = False
Exemple #3
0
 def threadfunc(self):
     self.running = True
     while True:
         cmd = pyrawmidi.read()
         if not self.run:
             break
         if cmd[0]==0xB0 and cmd[1]==0x11:
             self.frame.postsliderval(cmd[1], cmd[2])
         else:
             printcmd(cmd)
     self.running = False
Exemple #4
0
def midiinthread():
    while 1:
        cmd = pyrawmidi.read()
        printcmd(cmd)
Exemple #5
0
#!/usr/bin/env python

import pyrawmidi

def printcmd(cmd):
    for b in cmd:
        print "%02X " % b ,
    print

pyrawmidi.open("hw:1,0,1")

while 1:
    cmd = pyrawmidi.read()
    printcmd(cmd)