-
Notifications
You must be signed in to change notification settings - Fork 2
Rawwaves from Files
Phil Schatzmann edited this page Jul 7, 2024
·
12 revisions
This library uses some prerecorded sounds that can be found in the rawwaves directory.
By default these sounds are loaded from progmem and there is no need for any files. You can however still use the file based approach e.g. on an ESP32:
- Make sure that files are stored on SD in the /rawwaves directory
- In ArdConfig.h make sure that we used #define STK_USE_FILES. In PlatformIO this can be handled more elegantly!
- Initialize SDMMC in the setup()
if(!SD_MMC.begin("/sdcard", true)){ // 1-bit mode
LOGE("Could not open SD_MMC");
return;
}
- Double check that the generated file names are prefixed with "/sdcard/rawwaves/"
- If you use an AudioKit: all switches must be switched on
WARNING: Please note that you can only load information from files after the SD_MMC.begin() has been executed: Therefore you can't define Instruments that rely on files as global variables!