How to use the tonal-pitches.isPitchClass function in tonal-pitches

To help you get started, we’ve selected a few tonal-pitches examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tonaljs / tonal / packages / tonal-distances / dist / index.js View on Github external
function substr(a, b) {
  if (a.length !== b.length) return null;
  return tonalPitches.isPitchClass(a) ? tonalPitches.ivlPitch(b[1] - a[1]) : tonalPitches.ivlPitch(b[1] - a[1], b[2] - a[2]);
}
github tonaljs / tonal / packages / tonal-distances / lib / index.js View on Github external
function substr (a, b) {
  if (a.length !== b.length) return null
  return isPitchClass(a)
    ? ivlPitch(b[1] - a[1])
    : ivlPitch(b[1] - a[1], b[2] - a[2])
}