M5STACK CORE 2 SOUNDS



  • Ladies and gents I have been struggling to work out the best way to convert wav files to C arrays for playing sound using I2S audio output. Has anyone got a clearly documented solution for this. Would have been great in the examples to also include this in future releases. The 2 sounds work fine supplied with the core 2 however no guidance on how one goes about creating their own. All help appreciated. Thanks



  • Hi,

    On the same topic it would really be great adding in the C++ M5Core2.h lib a method to play simple beeps.
    I just need to beep on button press but it looks like I have to load a .C sound file in the Core2 flash memory which is totally overkill.

    If someone has an idea how to play simple beep without loading a file can you please help me?

    Thanks a lot!



  • I came across this post right after posting here:

    https://community.m5stack.com/topic/3179/how-to-generate-a-beep

    The solution suggested by @AgreeDK does perfectly work! (thanks to you!)

    I would however really like M5 people to update the Core2 lib with a simple beep function like on the Core

    Thanks



  • I have written a guide but its for Micropython but it does specify the exact audio specifications.



  • @ajb2k3 As I mentioned in the other post my code is written in C (VSCode + PIO) however I would like to try Micropython for my next project M5Stuff project :)
    Can you please tell me more about your guide? Is it possible to buy it somewhere? is it the same as what is mentioned in your signature: UIFlow handbook? I would be very much interested, thanks!