Hi there,
I am very new to DaisySP, trying to switch over from Teensy. I am currently completely failing at playing back a sound stored on the SD card inserted into the Daisy Pod card reader and using DaisyDuino.
After two days of searching, there seems to be nothing in terms of documentation on how to get this done. Also I sadly can’t find anything related to playing back wav files in the provided examples in the IDE. Is there a library I need to add in my code? WavPlayer.h is not recognised when compiling.
Is there a kind soul out there who could just provide me with a few sample lines of code to get “example.wav” (48Khz/16bit) to playback at startup.
Thanks a bunch!
Hello @AdrianS!
There unfortunately isn’t a DaisyDuino example for playing back audio from the SD card like the WavPlayer code for C++ in VS Code. There could be a STM32-compatible Arduino library out there for playing back audio.
Hi Takumi!
Thank you very much for your answer which stopped me running in circles. It is a pity that this is not directly supported in DaisyDuino, I would consider playback form an SD card as core functionality.
Anyway, I gave Visual Studio a try and successfully loaded the WavPlayer example on the Pod. However there’s an issue with the playback (clicks and pitched down), which I assume has to do with sampling frequency and potentially bit rate.
Do you have an idea what sampling frequency and bit rate WavPlayer expects to play correctly (my Wav file is at 48/16)? Also is there a simple way to set those ?
Thanks!
wavplayer.h says to use MONO .wav file.
Wow, I didn’t see that one coming. Does this equate to: only Mono wav files can be played back from the SD card in general on the Daisy hardware? 
No - it means code for stereo hasn’t been written.
EDIT: Where did you find an example program for wavplayer? Presumably,
seed/WavPlayer ?
That’s right, I found it in Seed/WavPlayer. I am really surprised this is not something that comes as “stock”.
There could be a STM32-compatible Arduino library out there for playing back audio.
@Takumi_Ogata, I tried to look into your suggestions to find an Arduino library. I found “STM32SD.h”, “FatFs.h” but unfortunately not getting anywhere from there - too many hoops to jump through with too little coding know-how. I still have a hard time believing sample playback is not working out of the box, this seems so fundamental. I am afraid Teensy is calling me back (for that specific project).