Continued with:
It’s a tough nut to crack, but it’s almost there.
Yesterday I had completed the generation of Notes through the MusicComposer and its contingent parts.
Today I tried to compile.
The biggest surprise was a circular dependency.
I take those quite seriously as it’s a bit of a smell that the data is not laid out in a clear hierarchical pattern.
I decided to forge ever onwards though, getting the generation of notes… mostly working. I have it hitting the concrete PedalPoint strategy, which is dope as hell. It wasn’t working correctly but the fact the error is happening at this part of the code means we are truly on our way to completing this end-to-end.
I did realize that I didn’t have anything building or playing the musical instruments that actually plays what is supposed to be played.
So I built that as well.
I put a base actor MusicConductor that will eventually have this logic, but decided just to put the functionality in the Composer OnBar function.
A big theme for this task is to Feature, Then Refactor.
I’m making messes all over the place as I try to implement this difficult logical puzzle. We’re the furthest thing from optimization as you could be.
But I’m convinced forging forward on what will technically work is the best approach.
Once it’s working, I plan to immediately go and do fairly substantial rewrites.
For one, fix all the bugs I’ve already noticed.
Next, revisit the data structure as designed and see if there’s a clearer, less circular version to be had.