- @event_handler(pygame.MOUSEBUTTONUP)
- def onMouseUp(self, event) :
- self.update(False)
- self.raiseNoteOff()
-
- def raiseNoteOn(self) :
- evt = pygame.event.Event(events.NOTEON, tone=self.tone)
- pygame.event.post(evt)
-
- def raiseNoteOff(self) :
- evt = pygame.event.Event(events.NOTEOFF, tone=self.tone)
- pygame.event.post(evt)
-
-
-
-def hls_to_rgba_8bits(h, l, s, a=1) :
- #convert to rgb ranging from 0 to 255
- rgba = [floor(255 * i) for i in hls_to_rgb(h, l, s) + (a,)]
- return tuple(rgba)