code: function intervalConstructor(from, to) {
    // Construct a Interval object from string representation
    if (typeof from === 'string')
      return Interval.toCoord(from);
  
    if (typeof to === 'string' && from instanceof Note)
      return Interval.from(from, Interval.toCoord(to));
  
    if (to instanceof Interval && from instanceof Note)
      return Interval.from(from, to);
  
    if (to instanceof Note && from instanceof Note)
      return Interval.between(from, to);
  
    throw new Error('Invalid parameters');
  }
docs: never thought I would write this, but: Legacy support