============= Sound Effects ============= Sound effects can be triggered by sending an event: .. code-block:: python def on_button_pressed(self, event, signal): signal(PlaySound(sound=ppb.Sound('toot.ogg'))) The following sound formats are supported: * `OGG `_ (with both `Vorbis `_ and `Opus `_) * `FLAC `_ * `MP3 `_ * `WAV `_ * `AIFF `_ * `MOD `_ * VOC Additionally, MIDI *may* be supported. .. note:: As is usual with assets, you should instantiate your :py:class:`ppb.Sound` as soon as possible, such as at the class level. Reference --------- .. autoclass:: ppb.events.PlaySound :members: :noindex: .. autoclass:: ppb.Sound The asset to use for sounds. A variety of file formats are supported.