I was looking through M8 Tracker specs, and noticed quite interesting line: “No sample memory or length limitation.”. M8 is based on Teensy, it has an SD card slot.
I wonder how this could be implemented. Does anyone have ideas?
I can imagine, that it might have a static ring buffer of some meaningful size, which then gets streamed to the file on SD card. Does this approach make sense? Is there any libraries or some code examples that implements this approach?
UPD: After some exploration and thinking, I wonder if it would be possible to stream the (input) samples straight into a SD card. according to http://elm-chan.org/fsw/ff/res/rwtest1.png, FatFS gives 30-1800kb/sec write speed. With 48k sample rate, we’d have 48ms between samples, which should be enough to stream 4 bytes (float) of data. Is my logic correct?
UPD2: Actually, it seems that some sort of buffer would be needed anyway. Seems like FatFS performs better with 4096byte chunks. So a 4-8kb(?) ringbuffer would be needed anyway.