Monday, November 28, 2022

Programming Woes

Well, I was hoping for a restful day. It's been a frantic 15 days updating Prometheus. Programming jangles my nerves. It feels more like defusing a bomb than something constructive. You can add features, but the worry of accidentally breaking something which works fine, lies on the very edge of comprehensibility, and has taken years of painstaking work, causes great stress.

Today, during playing a tune during testing I heard an unexpected 'blip'. Perhaps I needed to clear the new variable buffers (although, in retrospect, I can't be sure if that was the cause). Still, this made me take a look at doing this and then I had a panic moment. The buffer size each effect can sometimes be larger than that needed... but I didn't store this 'actual' size anywhere. The routine to currently clear the effect buffers uses the size the effect needs rather than the full buffer.

But really, I should be storing the actual buffer size used somewhere. I didn't, and haven't stored the sizes of the utility arrays. So, I added this, and then slowly recompiled all of the 234 plugins. Any change to the structure needs that, and this is a boring process of renaming, compiling, renaming, copying. It takes hours.

I did this, and made some changes to keep track of the actual buffer size. It seemed to work but the day has been plagued with unexpected and unwelcome crashes and errors. My worst nightmare. It is good to add these extra values, so that, is a plus point, and good that I've realised this now rather than later; the horror of having to develop a new format!

But I feel battered and filled with programming anxiety. The changes over the past weeks have varied in complexity, but the buffer changes are the most complex and danger fraught. It took from 2002 to Dec 2021 to fix the last buffer bug, and the program has been stable since, but now, everything is uncertain again.

I can't really go back. The 10-octave range is useful. The memory efficiencies are great concepts, but they need to work.