How to use the tonal.chromatic function in tonal

To help you get started, we’ve selected a few tonal 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 / modules / tonal-ranges / dist / index.js View on Github external
function genFn (nameGen) {
  return typeof nameGen === 'function' ? nameGen
    : typeof nameGen === 'string' ? pitchSetGen(nameGen)
    : nameGen === true || nameGen === false ? _.chromatic(nameGen)
    : nameGen === null ? id
    : nilFn
}
github tonaljs / tonal / modules / tonal-ranges / lib / index.js View on Github external
function genFn (nameGen) {
  return typeof nameGen === 'function' ? nameGen
    : typeof nameGen === 'string' ? pitchSetGen(nameGen)
    : nameGen === true || nameGen === false ? _.chromatic(nameGen)
    : nameGen === null ? id
    : nilFn
}