Decrease buffer's SDRAM usage

Hey there, I’ve been working on a looper project which requires me to have a loop buffer and an overdub buffer, they both must be 5 mins long at 48K (both are DSY_SDRAM_BSS). This setup puts the SDRAM at 171.66% usage. I was wondering how I’d be able to decrease the overall SDRAM usage.

Probably consider using a different format for storing data in the buffer. In this case you would probably have to use 16 bit integers.


This might be a bit noobish of me, but how do I do that? (converting from 32-16 bit)

I’ve used an int16_t and converted the 32bit input to 16bit, however, it’s also introducing a TON of static

I won’t give a solution, but I’ll suggest something to consider.
The Daisy is using a 32-bit float to contain a value in the range of -1 to +1. A signed 16-bit integer can contain a value from about -32k to about +32k. So, before converting the float to int, multiply it by 32k to scale it to fit the entire range.

Of course, this will be necessary in the other direction as well, when converting the 16-bit integer back into a float between -1 and +1.

In this way, you’ll preserve the maximum amount of information, and minimize noise.

Sorry, I forgot to write back till now.

That was pretty much the solution I came up with. Thank you though!

(It works perfectly now)

1 Like