Esempio n. 1
0
        map(msg.append, args)
        self.client.send(msg)

print "looking for a monome..."
host, port = find_any_monome()
print "found!"

r = Renoise(('localhost', 8800))
m = Monome((host, port))
m.start()

def mycallback(x, y, s):
    m.led_set(x, y, s)
    if s == 1:
        r.note_on(-1, -1, x*8+y, 127)
    else:
        r.note_off(-1, -1, x*8+y)

m.grid_key = mycallback

m.led_all(0)
try:
    while True:
        for i in range(8):
            time.sleep(1.0/20)
except KeyboardInterrupt:
    r.panic()
    m.led_all(0)
    m.close()