First day of the major upgrade for Prometheus. The key features are adding 'double' length samples, and support for variable frequency regimes, plus more optimised (but more complicated) support for linked modulators and samples, as these are now stored via unions.
All very complex, so most of today was making many meticulous changes without the change of running the program at all.
It means new files formats for songs and instrument, the 6th file format. That's always a bit of a pain. Each format upgrade comes with a small from->to routine to update the format before, so from the 1st format it will upgrade from 1 to 2 then 2 to 3, 3 to 4, 4 to 5, 5 to 6 and ready. This works, but the code can get very long and messy as each unit part of the files feature this - it's too complex to load an entire version 1 song, then update to an entire version 2 etc.
This is probably the hardest part of these upgrades, the neatness aspect. At the moment many local structures are allocated and used, then discarded during the upgrade process, or upon a fail. I wonder if I can find a neater way to do it.
The changes I've made will generally save memory, the new structures have more features but are smaller due to optimisations like unions, and using bytes and bools for flags which were previously larger values.
As of now, it is running, with no plugins. I next need to make two test plugins (all need recompiling). Only then will I know what works and what doesn't. The file imports are also not complete.