from MidiDeviceReader import *


myDevice = MidiDeviceReader("LPK25")
myDevice.readFlow()

# si la methode close n'a pas ete appellee en interne, il faut l'appeller!!
myDevice.close()
Exemplo n.º 2
0


try:
    # creating the key map reader, in charge of reading the
    # instruction from the .setting file
    kmr = KeyMapReader()
    kmr.setMapFileName("input/config.map")
    kmr.processMapFile()

    # creating the command interpreter
    ci = CommandInterpreter()
    # giving the key-argument map to the command interpreter:
    ci.setKeyArgumentMap(  kmr.getKeyArgumentMap() )



    mdr = MidiDeviceReader()
    mdr.setCommandInterpreter(ci)
    mdr.readFlow()

    # creating the serial matrix reader, in charge of catching
    # the messages from the tangible matrix
    #smr = SerialMatrixReader()
    #smr.setCommandInterpreter(ci)
    #smr.readFlow()

except KeyboardInterrupt:
    mdr.close()
    exit()