So here's another one of these somewhat under-cooked
What it does:
- Allow sector-level access to the SD card (both SDSC and SDHC/SDXC should work, but the former hasn't been tested yet)
- Allow partial sector reads and writes (partial writes will overwrite the non-written part of the sector with $FF, not super useful)
- Play signed 16 bit stereo audio from the SD card on the "music channel"
- Play A-law compressed mono audio from the SD card on the "effect channel"
- Play either at up to ~48 kHZ or both together at up to ~32 kHZ (sample rate is specified at startup, failure to keep up is graceful)
- Emit """subcode""" data - the first long (=left/right sample pair) of every music block (256 bytes) is written to Hub - the bottom 8 bits of either sample can be replaced with data without too much distortion...
What it doesn't (yet?):
- Use more than 5 longs of Hub RAM after startup
- Any sort of file-system operation (I think I could hack some version of FSRW onto it... haven't tried yet)
- Play audio from fragmented files
- SD card initialization - the card needs to be ready in SPI mode at startup (I've seen some pure-Spin SD init code somewhere (some version of FSRW also?), might dig that up)
- Properly support cards larger than 512GB (SFX stored above that limit won't work right due to address overflow)
- HiFi sound - aside from the fair amount of sampling jitter, the low speed SD read seems to generate an unusual amount of background noise
NOTE: A new version (v1.0) has been released! Scroll down to find it!
I've attached threw up on MEGA
the object and a quick demo I tossed together - load the provided audio files (and SDDAWR.txt) onto your SD card, push some keys on your serial terminal, be amazed.
(A ZIP without any example audio files has been attached, aswell)