Last active
July 29, 2020 10:06
-
-
Save Warwolt/6bfa4ec869c518d268fc7da8bc815748 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def light_up_element(self, element_name, color): | |
""" | |
Send a midi message to light up an element. | |
element_name: the name of the element to light up | |
color: a string 'red', 'orange', or 'green' | |
""" | |
status = MIDI_NOTE_ON_STATUS + MIDI_CHANNEL_NUM | |
note = self._element_color_to_midi[element_name][color] | |
velocity = 127 | |
self._c_instance.send_midi((status, note, velocity)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment