Memory usage on teensy 3.6 [replacing AudioSynthWavetable::instrument_data in memory]

Status
Not open for further replies.
I'm in the process of building an electric piano controller using the synth_wavetable library and a teensy 3.6
The problem right now is to figure out how to be able to replace instruments in memory, as there is not enough memory available for multiple instruments.

From what I see the instruments are loaded into flash memory (program memory) at compile time. Each instruments when pushing it (loading only some of the sound range) takes close to 1MB.
I tried looking into loading only one dummy instrument and then replacing it's data, but it's read only memory, so that won't work.

Is there any other solution that may work, software or physical? i.e. adding some kind of additional physical storage that can be accessed directly as program memory, writing to program memory, low cost stand along midi player that the teensy can send midi to, etc.?

I also looked at letting the raspberry pi do the actual midi synthesizer and run the teensy only as the midi controller to work the keyboard, but the boot times and sensitivity to pulling the power cable on the pi are an issue and I would rather avoid trying to build a minimal custom setup on the pi to reduce those issues.

Thanks
 
If you can read the stuff for the instruments into memory when you need it, you do have the micro-SD card on the 3.6 that you can use to off-load data, but that can be rather painful to implement if you have everything with pointers, etc. right now.
 
It would be easy to implement, and that was the direction I was going, problem is that the instrument is currently stored in flash which is read only, so I cannot over right. I can get it to load into ram (not a lot of work), but there is only 256KB of ram vs 1MB of flash, and that is borderline already, so I need to either be able to overwrite the data in flash, or add a memory module that is accessible as memory so that I can load data there.
 
Trying to dig into options, I guess the solution might be if there is a sensible way to get the instrument to play from SPI memory
 
To get decent performance you'll probably need to use DMA SPI to work with the serial memory. I modified crteensy's DmaSpi library to work with LC1023 memories here.
 
Status
Not open for further replies.
Back
Top