Sunday, November 13, 2022

More Dylan Work, Prometheus 2.95

A full day of joy and endless industry. I started by working on the Zimmerman song, having modified the structure last night. I will play keyboard rather than guitar as I can play this better, but I still can't decide if the music should be in a key of D or C; D would sound better but be a tad more awkward to play (I can cheat and transpose, but I disike any principle of cheating or making things easy).

I've spent most of the day upgrading Prometheus. I was thinking about the octave range and the frequency tables which are part of the song structure and realised how wasteful this is. I could simply point towards a global table. There are several song structures, two for legacy formats (I'm now on the 4th file format). I started today's work by writing a bit of code to batch examine the 1300 extant sequences and noticed that at about 100 older sequences still use the first format, and about 100 the second format, and about 100 the third too. I'd expected the latest format to be dominant, as I've used this since 30th August 2018 and any older sequence loaded and then saved since then would save to the newest format, but I expected it would be even more dominant.

I had thought about removing support for upgrading legacy formats, but too many sequences use them, so instead I decided to dynamically allocate the structures instead, which I probably should have done from the outset. I didn't realise their size or the implications of having them stored there. This act alone has saved more memory than a new song structure would; and I've dynamically allocated the current song structure when including songs. These savings mean that I can add my 10 octaves and the result would be smaller than almost any version so far. Not only this, removing the tables from the current song format and creating a new one would make all of the song files smaller by 48k too.

So I've spent today on these 'tidying' features. Nothing new was added, but some things were removed like the 'random instrument names' feature which I've not used in years and probably never will.

I've added a few defines and instrument tidying. This work can accidentally introduce errors, so I've moved very slowly and will see how things go, but as it stands I'm ready to update to a 10 octave range, just shy of the MIDI limit (I'm never likely to encounter C#9 to G9).