示例#1
0
文件: vxcmidi.py 项目: cwyss/vxc
 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
示例#2
0
文件: ctrllearn.py 项目: cwyss/vxc
 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
示例#3
0
文件: wxtest.py 项目: cwyss/vxc
 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
示例#4
0
文件: viruscontrol.py 项目: cwyss/vxc
def midiinthread():
    while 1:
        cmd = pyrawmidi.read()
        printcmd(cmd)
示例#5
0
文件: printmidicmd.py 项目: cwyss/vxc
#!/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)