Makes sense and now I see the harmonic in there too. Super cool!
When you tap the delay line, how many samples back do you offset? I had trouble getting this right as when I went what I thought was one exact period it sounded wrong (I really need to set up some analysis software like you have). I was using sample rate/frequency. I have some arbitrary value in the code right now that ended up sounding right (I think just frequency number itself which i think makes no sense). Do we care about shifting for phase alignment or should it inherently just be phase aligned? Imagining the delay buffer filling up with a constant frequency, it seems like you’d just need to offset back by one period to get full phase alignment…