Ok, so I read that it IS possible to write to the flash area in real-time, its slow, but its possible, that's what the bootloader actually does.
So, I was just daydreaming of a small sampler using the arduino. I already did a 6 voice drum playback from flash in the following project, and it works great. (8 bit, mono one shot samples read from the flash) https://github.com/Beat707/BeatVox
But what if I could change all samples by reading from a SD card and replacing the flash contents? Of course, we couldn't do too many times, as the flash can be written only 100,000 times, so its more like during a live performance, you would change all drum sounds once or twice, so it should be ok. Even if you did 10 changes every single day, you would end up with 27 years total.
But, I couldn't figure out yet how to handle this flash programming thing. From what I could see, the best thing would be to have a buffer set in the flash, and know the address and size of this buffer, so its always fixed, and use that. Something like that.
I know that the process would be slow, to read from the SD and re-flash this area, but time wouldn't be a big issue. As long as it wouldn't take more than a minute, of course, but I doubt, since flashing the BeatVox + samples at a 30k of flash doesn't take a minute with a Due.2009 card, and its just a few seconds with an Uno card.
Has anyone created a nifty library for doing this?
Anyway, just a crazy idea.
Best Regards, WilliamK