Sound Effects#
Sound effects can be triggered by sending an event:
def on_button_pressed(self, event, signal):
signal(PlaySound(sound=ppb.Sound('toot.ogg')))
The following sound formats are supported:
Additionally, MIDI may be supported.
Note
As is usual with assets, you should instantiate your ppb.Sound
as soon as possible, such as at the class level.