Nice. You might want to work a bit on the chord voicings. If you add a bass voice and make each chord go to the nearest inversion, it'll sound a lot nicer.
For example, if you play a 'D minor' in root position, and the next chord is an 'F', it would sound better by playing it in second inversion. It makes everything sound a bit more coherent. :)
What you're seeing is a limitation of javascript. Big numbers need to use BigInt.