microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
42 stars 23 forks source link

SoundEffect: Create predefined sounds as examples #110

Closed microbit-carlos closed 1 year ago

microbit-carlos commented 2 years ago

We'll like to have two or three predefined SoundEffects that users could use to investigate and modify.

These predefined SoundEffects should be immutable, like the predefined Images. To modify them a copy can be created:

my_copy = audio.SoundEffect.EXAMPLE_1.copy()
my_copy.duration = 2000
audio.play(my_copy)

Of course, they should have descriptive names, not EXAMPLE_n :)

microbit-carlos commented 1 year ago

We haven't had any request for this yet, and we can always add pre-made SoundEffects to the Python Editor sidebar. So we'll close this was "won't implement" for the meantime.