Audio icon indicating copy to clipboard operation
Audio copied to clipboard

Allow play_sd_raw to stream 22050 samples at 44100 for more polyphony

Open bwhitman opened this issue 9 years ago • 4 comments

I love play_sd_raw but want more than a few notes of polyphony in a sample player. So I added a new optional parameter to AudioPlaySdRaw.play(filename, bool halfSR); if it is true the raw files on the SD card are assumed to be at 22050Hz and played back at 44100 by simply doubling each sample. This lets me easily have around 6-7 notes at once from an SD card.

bwhitman avatar Sep 04 '16 12:09 bwhitman

If you get a better SD card you'll get 6 or 7 at once anyway - but I like the idea, it's a quick and dirty way of doubling polyphony without resorting to a slow-burning ram chip

Pensive avatar Sep 04 '16 13:09 Pensive

@Pensive i have the exact one recommended on this page and only get 2-3 simultaneous 44K RAW files before it glitches, sadly: https://www.pjrc.com/store/teensy3_audio.html

With this patch i can do 6 no problem and maybe 7 before glitching.

bwhitman avatar Sep 04 '16 18:09 bwhitman

I get 6 without problems or patches, with a high-quality sd-card. But hey, some more would be great. But simply doubling the samples is not good..

FrankBoesing avatar Sep 04 '16 20:09 FrankBoesing

@Pensive @FrankBoesing can you link me your actual microSD card that you are using? I started a thread on the PJRC forums for it: https://forum.pjrc.com/threads/36730-Best-microSD-card-for-reading?p=114323#post114323

bwhitman avatar Sep 05 '16 11:09 bwhitman