It might be a good idea to take song speed changes into account when handling note spacing.
This should be applied without limitation, especially in cases where the song changes speed frequently.
For example: start with note spacing 6, then at a certain point 8, then 4, then back to 6, and so on.