How to calculate proper data size for oopsy data load from SD card

Hello all,

This may sound like a very basic question but I am wondering how I calculate the proper number to put in the data _wav NUMBER portion for the loading from an SD card.

Currently I have a number of 44.1, mono files that I would like to load from an SD card and I am not quite sure how to calculate the proper number.

Any help would be greatly appreciated.

Thanks!

Two ways:

  1. create it first as a [buffer] in gen~, using the same name as the [buffer~] in Max, then route the [buffer]'s 1st outlet to a [out 10], route the gen~'s 10th outlet to a [number~] in Max, and turn on audio to see the number.

  2. Use an [info~] object in Max, witth a bit of patching to derive the sample length. See the “sdcard-minimal.maxpat” example, or the picture below:

Screen Shot 2021-07-05 at 11.42.11 AM

@grrrwaaa,

Thank you as it is much appreciated!

All up, I look forward to when all of this is in the SD load by default.

Thank you for your continued time, help, and support on all of this. It is very cool stuff!

Brett

I’m adding a new question to this thread as it seems like a good place for it:

I’ve managed to get the ‘sdcard-minimal’ example patch working well with a Seed and sd-card breakout. If I try and flash an instance of the patch with a data object with a length any larger than 8000000 (around 3mins length of audio with WAV file) it successfully flashes but no audio starts playing.

I’m presuming I’ve maxed out of space on the seeds flash memory? If I wanted to play longer audio files does anyone have any suggestions for how I could do this? Can gen access the daisy’s SRAM or QSPI? Or are there any creative ways to do something directly with the data object in gen?

Any suggestions very welcome!
Thanks

@crewdson may have an idea here.

@crewdson good luck and I look forward to hearing more about the project in the future.

thanks @BHAudio. did you mean to tag someone else here that might be able to help?

@crewdson The seed has a maximum of just over 64MB of RAM available (around 750kB internal plus a 64MB SDRAM chip). For samples from SD cards, Oopsy will use the SDRAM chip, meaning you’re limited to a maximum of 64MB of sample data at a time. Since gen works in floats, a stereo sample with a length of 8000000 would translate to 64MB (two channels, four bytes per sample, 8000000 samples).

Hope that helps!

Hi there @crewdson ! Can I ask what sdcard breakout device you’ve had luck using with the Seed? Did you hook it up using the schematic available on the Daisy Pod hardware example repo?