How to use the tonal-ranges.midiRange function in tonal-ranges

To help you get started, we’ve selected a few tonal-ranges 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 alteredNotes = function alteredNotes(key) {
  var alt = alteration(key);
  return alt === null ? null : alt < 0 ? tonalRanges.midiRange(-1, alt).map(tonalDistances.fifthsFrom('F')) : tonalRanges.midiRange(1, alt).map(tonalDistances.fifthsFrom('B'));
};
github tonaljs / tonal / packages / tonal-keys / lib / index.js View on Github external
export const alteredNotes = (key) => {
  var alt = alteration(key)
  return alt === null ? null
    : alt < 0 ? midiRange(-1, alt).map(fifthsFrom('F'))
    : midiRange(1, alt).map(fifthsFrom('B'))
}
github tonaljs / tonal / packages / tonal-keys / lib / index.js View on Github external
export const alteredNotes = (key) => {
  var alt = alteration(key)
  return alt === null ? null
    : alt < 0 ? midiRange(-1, alt).map(fifthsFrom('F'))
    : midiRange(1, alt).map(fifthsFrom('B'))
}

tonal-ranges

Deprecated: use tonal-range

MIT
Latest version published 8 years ago

Package Health Score

61 / 100
Full package analysis