コード例 #1
0
ファイル: index.js プロジェクト: reccanti/tonal
export function simpleTuning (src) {
  var pcs = map(pc, tuning(src) || src)
  var simple = pcs.reduce(function (s, pc, i) {
    if (s === false) return s
    else if (i % 2 === 0) s.push(pc)
    else if (s[s.length - 1] !== pc) return false
    return s
  }, [])
  return simple || pcs
}
コード例 #2
0
ファイル: index.js プロジェクト: reccanti/tonal
export function scale (tuning, scale, first, last) {
  var filter = map(scaleFilter(scale))
  return build(tuning, first, last).map(filter)
}