How to use the tonal.map 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 pitchSetGen (notes) {
  var scale = _.map(_.pc, notes)
  var chromas = _.map(_.chroma, scale)
  return function (pitch) {
    var midi = pitch
    var ch = midi % 12
    var index = chromas.indexOf(ch)
    return index > -1 ? buildNote(scale[index], midi) : null
  }
}
github tonaljs / tonal / modules / tonal-ranges / lib / index.js View on Github external
export function pitchSetGen (notes) {
  var scale = _.map(_.pc, notes)
  var chromas = _.map(_.chroma, scale)
  return function (pitch) {
    var midi = pitch
    var ch = midi % 12
    var index = chromas.indexOf(ch)
    return index > -1 ? buildNote(scale[index], midi) : null
  }
}
github tonaljs / tonal / modules / tonal-ranges / lib / index.js View on Github external
export function pitchSetGen (notes) {
  var scale = _.map(_.pc, notes)
  var chromas = _.map(_.chroma, scale)
  return function (pitch) {
    var midi = pitch
    var ch = midi % 12
    var index = chromas.indexOf(ch)
    return index > -1 ? buildNote(scale[index], midi) : null
  }
}
github tonaljs / tonal / modules / tonal-ranges / dist / index.js View on Github external
function pitchSetGen (notes) {
  var scale = _.map(_.pc, notes)
  var chromas = _.map(_.chroma, scale)
  return function (pitch) {
    var midi = pitch
    var ch = midi % 12
    var index = chromas.indexOf(ch)
    return index > -1 ? buildNote(scale[index], midi) : null
  }
}