tonal-array
Advanced tools
Comparing version 0.60.0 to 0.61.0
@@ -5,8 +5,6 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var tonalPitch = require('tonal-pitch'); | ||
var tonalTranspose = require('tonal-transpose'); | ||
var tonalDistance = require('tonal-distance'); | ||
var toArr = _interopDefault(require('as-arr')); | ||
var toArr = require('as-arr'); | ||
@@ -124,3 +122,3 @@ // utility | ||
var a = asArr(list) | ||
return a.length ? a.map(tonalDistance.distance(a[0])).filter(hasVal) : a | ||
return a.length ? a.map(tonalDistance.interval(a[0])).filter(hasVal) : a | ||
} | ||
@@ -144,3 +142,3 @@ | ||
return function (tonic) { | ||
return cMap(tonalTranspose.tr(tonic || 'P1'), list) | ||
return cMap(tonalTranspose.transpose(tonic || 'P1'), list) | ||
} | ||
@@ -229,3 +227,3 @@ } | ||
function trOct (n) { return tonalTranspose.tr(tonalPitch.pitch(0, n, 1)) } | ||
function trOct (n) { return tonalTranspose.transpose(tonalPitch.pitch(0, n, 1)) } | ||
@@ -263,3 +261,3 @@ /** | ||
// See if the first note of tail is lower than the last of head | ||
var s = tonalDistance.distInSemitones(head[len - n - 1], tail[0]) | ||
var s = tonalDistance.semitones(head[len - n - 1], tail[0]) | ||
if (s < 0) { | ||
@@ -266,0 +264,0 @@ var octs = Math.floor(s / 12) |
10
index.js
@@ -19,5 +19,5 @@ /** | ||
import { asPitch, isPitch, strPitch, pitch } from 'tonal-pitch' | ||
import { tr } from 'tonal-transpose' | ||
import { distance, distInSemitones } from 'tonal-distance' | ||
import toArr from 'as-arr' | ||
import { transpose as tr } from 'tonal-transpose' | ||
import { interval, semitones } from 'tonal-distance' | ||
import * as toArr from 'as-arr' | ||
@@ -135,3 +135,3 @@ // utility | ||
var a = asArr(list) | ||
return a.length ? a.map(distance(a[0])).filter(hasVal) : a | ||
return a.length ? a.map(interval(a[0])).filter(hasVal) : a | ||
} | ||
@@ -272,3 +272,3 @@ | ||
// See if the first note of tail is lower than the last of head | ||
var s = distInSemitones(head[len - n - 1], tail[0]) | ||
var s = semitones(head[len - n - 1], tail[0]) | ||
if (s < 0) { | ||
@@ -275,0 +275,0 @@ var octs = Math.floor(s / 12) |
{ | ||
"name": "tonal-array", | ||
"version": "0.60.0", | ||
"version": "0.61.0", | ||
"description": "Create and manipulate arrays of notes and intervals", | ||
@@ -11,3 +11,6 @@ "keywords": [ | ||
], | ||
"scripts": {}, | ||
"scripts": { | ||
"pretest": "rollup -f cjs -o build/index.js -- index.js", | ||
"test": "tape test/*.js" | ||
}, | ||
"main": "build/index.js", | ||
@@ -20,6 +23,6 @@ "jsnext:main": "index", | ||
"as-arr": "^1.0.0", | ||
"tonal-distance": "^0.60.0", | ||
"tonal-pitch": "^0.60.0", | ||
"tonal-transpose": "^0.60.0" | ||
"tonal-distance": "^0.61.0", | ||
"tonal-pitch": "^0.61.0", | ||
"tonal-transpose": "^0.61.0" | ||
} | ||
} |
45489
6
1002
+ Addedtonal-distance@0.61.0(transitive)
+ Addedtonal-pitch@0.61.0(transitive)
+ Addedtonal-transpose@0.61.0(transitive)
- Removedtonal-distance@0.60.0(transitive)
- Removedtonal-pitch@0.60.0(transitive)
- Removedtonal-transpose@0.60.0(transitive)
Updatedtonal-distance@^0.61.0
Updatedtonal-pitch@^0.61.0
Updatedtonal-transpose@^0.61.0