How to use the tonal-pitches.parseNote 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-keys / dist / index.js View on Github external
var alteration = function alteration(key) {
  var k = asKey(key);
  if (!hasTonic(k)) return null;
  var toMajor = modeNum(k);
  var toC = tonalPitches.parseNote(k.tonic)[1];
  return toC + toMajor;
};
github tonaljs / tonal / packages / tonal-keys / lib / index.js View on Github external
export const alteration = (key) => {
  const k = asKey(key)
  if (!hasTonic(k)) return null
  const toMajor = modeNum(k)
  const toC = parseNote(k.tonic)[1]
  return toC + toMajor
}