Well, it has been six hours and the code you gave me is still running.
After it runs, I will try the 8000 sample rate. It is little surprise that it sounded like "freakish electronic music" at a sample rate of 8000hz. This piece needs a minimum of 12000 Hz.
As I said I will try it at 8000Hz and see if it runs at 138 seconds.
I have uploaded a second composition that is more consonant at the beginning and has a volume control in the code.
The idea is to compose with more divisions to the octave so that at least one voice sounds like a continuous curve and the whole piece still has a drive to the tonic. It already sounds like sliding pitches since I use a Fourier series technique to make a compound Sin Cos function that approximates the discrete voice line. I am not talking about that. The discrete voice line has to be made up of such tiny divisions that it sounds like a continuous line and yet the whole piece is still driving to the tonic. I have wanted to know the math properties of that ideal continuous voice line for 30 years. A continuous voice where every point is part of a Harmony.