lib/note.js
function (letter1, letter2) {
  var index1 = scale.indexOf(letter1);
  var index2 = scale.indexOf(letter2);
  var distance = mod(index2 - index1, scale.length) + 1;

  assert(index1 > -1);
  assert(index2 > -1);
  assert(distance > 0 && distance <= scale.length);

  return distance;
}
function (letter1, letter2) {
  var index1 = scale.indexOf(letter1);
  var index2 = scale.indexOf(letter2);
  var distance = mod(index2 - index1, scale.length) + 1;

  assert(index1 > -1);
  assert(index2 > -1);
  assert(distance > 0 && distance <= scale.length);

  return distance;
}
function ( letter1 , letter2 ) { var index1 = scale . indexOf ( letter1 ) ; var index2 = scale . indexOf ( letter2 ) ; var distance = mod ( index2 - index1 , scale . length ) + 1 ; assert ( index1 > - 1 ) ; assert ( index2 > - 1 ) ; assert ( distance > 0 && distance <= scale . length ) ; return distance ; }
Find the interval number between two notes given their letters
Find the interval number between two notes given their letters