I had 60 presets on my proffie 2.2 (os 7.15) and then I went to like 135. I flashed and everything was good (although I was at like 99% flash storage), but when I turned it on most of the ones I added would have a static pop whenever I swing. However, the first 60 I already had still have no static. Any ideas as to the cause?
Probably it can’t read the files quick enough.
Whenever you open a file, ProffieOS has to find that file. If the file name is something like “graflex/hum/hum01.wav” for instance, then ProffieOS will open up the root directory and read until it finds the entry for “graflex”. Then it will open up that entry, read until it finds “hum”, and then open up that entry, and read until it finds hum01.wav.
If there are many entries before “graflex”, then “read until it finds graflex” can take long enough to cause an audio glitch. (Because no files can be read at the same time as the directory is being scanned.)
If you use short file names, then ProffieOS has to read one extra block per 16 directory entries. With 135 fonts, it that might be up to 8 extra blocks to read. More your directory names are longer than 8 characters. Generally reading a block is fairly fast, but this many reads can cause the audio buffers to deplete, which causes popping.
A V3 board can help, since it can read SD cards faster.
Organizing fonts into subfolders can also help, so instead of “graflex/hum/hum01.wav” you’d have “fonts1/graflex/hum/hum01.wav”. (16 fonts to a folder or so.)
would that explain why it’s only on the new fonts i just added? shouldn’t it be on all of them?
also I didn’t know you could do that with proffie (the subfolders).
“read until you find the entry” is fast, if the entry you are looking for is first, but slow if the entry you are looking for is last.
is doing shorter names the best way to fix that? along with the subfolders?
Using names shorter than 8 characters helps.
Using subfolders helps more.
Please note that there is an upper limit on how many fonts will work properly. That limit depends on the speed on the sd card and how the fonts are organized and named on the sd card, but once you reach some number, it’s just not possible to make it work anymore. (At least not without making some modifications to ProffieOS.)
Ok thanks! How do I check my SD card speed?
You can use the “sdtest” command in the serial monitor:
do they need to be shorter than 8 or is exactly 8 fine?
also, will there be a crazy amount of lag if I’m like within a thousand kb of the max flash storage?
8 is fine
It doesn’t matter how full the flash storage is. 50% or 99% makes no difference, the only thing that matters if is if it fits or not.