Modular Scales in JavaScript