code: function modularScale(power, ratio, bases) {
    const scale = []
    let step = 0
  
    while (Math.abs(step) <= Math.abs(power)) {
      for (let i = 0; i < bases.length; i++) {
        scale.push(bases[i] * Math.pow(ratio, step))
      }
  
      step += 1
  
      if (power < 0) {
        step -= 2
      }
    }
  
    return Array.from(new Set(scale))[Math.abs(step) - 1] // eslint-disable-line no-undef
  }
docs: Calculate a modular scale value.
  
  @param {number} power The power of the modular scale value.
  @param {number} ratio The modular scale ratio.
  @param {Array} bases One or more modular scale bases.
  @returns {number}