Beispiel #1
0
	def initialize_leds(self):
	  for item in mappings.ledToMIDI:
		self.sent_colour[item] = mappings.colourStrToMIDI("Off")
	  for key in mappings.init_colours[self.map_number]:
	  	self.sent_colour[key] = mappings.init_colours[self.map_number][key]
	  	#wx.CallAfter(Publisher().sendMessage, "midi_out", (key[0], key[1], mappings.init_colours[self.map_number][key]))
		midi_sender.midi_out.send_message((key[0], key[1], mappings.init_colours[self.map_number][key]))
Beispiel #2
0
	def switch_map(self, map_number):
		self.map_number = map_number
		if self.map_number:
			self.client.unregister_all()
			for item in mappings.ledToMIDI:
				self.sent_colour[item] = mappings.colourStrToMIDI("Off")
		else:
			self.initialize_leds()
			self.client.register_all()
			self.client.init_get()