You are not recognized as the original poster of this topic.
voices.splice(i--,1);without curly-braces but whatever. Dynamic size-changing arrays are also bad for this (due to memory management reasons), people usually use fixed-size cyclic/circular arrays for polyphonic synth voices.
Math.sin()is also slow that you should probably pre-calculate a table for that)…