How to use the tonal-pitches.notePitch 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 / lib / index.js View on Github external
function trBy (i, p) {
  if (p === null) return null
  const f = i[1] + p[1]
  if (p.length === 2) return pcPitch(f)
  const o = i[2] + p[2]
  if (p.length === 3) return notePitch(f, o)
  return ivlPitch(f, o)
}
github tonaljs / tonal / packages / tonal-distances / dist / index.js View on Github external
function trBy(i, p) {
  if (p === null) return null;
  var f = i[1] + p[1];
  if (p.length === 2) return tonalPitches.pcPitch(f);
  var o = i[2] + p[2];
  if (p.length === 3) return tonalPitches.notePitch(f, o);
  return tonalPitches.ivlPitch(f, o);
}