Beispiel #1
0
 def __receive(self, input, msg):
     # Filter message if it does not belong to the configured MIDI channel
     if msg.getChannel() != self.channel:
         return
     Logger.debug("[%s] Received message: %s" % (self.name, MidiEngine.dump_msg(msg)))
     # Dispatch received message
     if self.receive:
         self.receive(self, msg)
Beispiel #2
0
 def send(self, msg):
     # Override MIDI channel
     msg.setChannel(self.channel)
     Logger.debug("[%s] Sending message: %s" % (self.name, MidiEngine.dump_msg(msg)))
     if self.output:
         self.output.send(msg)