How to use the music-gamut.asArray function in music-gamut

To help you get started, we’ve selected a few music-gamut 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 danigb / music-scale / degrees.js View on Github external
module.exports = function (degrees, notes) {
  var tonic = gamut.asArray(notes)[0]
  var set = gamut.set(notes)
  var numbers = gamut.asArray(degrees).map(function (i) { return +i - 1 })
  var selected = numbers.map(function (num) {
    return find(num, set)
  })
  return transpose(tonic, selected)
}
github danigb / music-scale / degrees.js View on Github external
module.exports = function (degrees, notes) {
  var tonic = gamut.asArray(notes)[0]
  var set = gamut.set(notes)
  var numbers = gamut.asArray(degrees).map(function (i) { return +i - 1 })
  var selected = numbers.map(function (num) {
    return find(num, set)
  })
  return transpose(tonic, selected)
}