New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tonal-key

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tonal-key - npm Package Compare versions

Comparing version 0.65.0 to 0.66.0

9

build/index.js

@@ -5,3 +5,2 @@ 'use strict';

var tonalPitch = require('tonal-pitch');
var tonalNotation = require('tonal-notation');

@@ -58,4 +57,3 @@ var tonalTranspose = require('tonal-transpose');

if (!k || !hasTonic(k)) return null
var i = tonalPitch.pitch(modeNum(r) - modeNum(k), 0, 1)
var tonic = tonalTranspose.transpose(k[1], i)
var tonic = tonalTranspose.trFifths(k[1], modeNum(r) - modeNum(k))
return build(tonic, rel)

@@ -166,4 +164,3 @@ }

switch (p.length) {
case 1: return tonalPitch.parseNote(p[0]) ? build(p[0], 'major')
: isKeyMode(p[0]) ? build(false, p[0]) : null
case 1: return tonalNote.pc(p[0]) ? build(p[0], 'major') : build(false, p[0])
case 2: return build(p[0], p[1])

@@ -200,3 +197,3 @@ default: return null

var toMajor = modeNum(k)
var toC = tonalPitch.fifths(tonalPitch.parseNote(k[1]))
var toC = tonalNote.pcFifths(k[1])
return toC - toMajor

@@ -203,0 +200,0 @@ }

@@ -12,6 +12,5 @@ /**

import { parseNote, pitch, fifths } from 'tonal-pitch'
import { areFlats, areSharps, toAcc } from 'tonal-notation'
import { transpose, trFifths } from 'tonal-transpose'
import { pc } from 'tonal-note'
import { trFifths } from 'tonal-transpose'
import { pc, pcFifths } from 'tonal-note'
import { numeric } from 'tonal-range'

@@ -65,4 +64,3 @@ import { rotate } from 'tonal-array'

if (!k || !hasTonic(k)) return null
var i = pitch(modeNum(r) - modeNum(k), 0, 1)
var tonic = transpose(k[1], i)
var tonic = trFifths(k[1], modeNum(r) - modeNum(k))
return build(tonic, rel)

@@ -173,4 +171,3 @@ }

switch (p.length) {
case 1: return parseNote(p[0]) ? build(p[0], 'major')
: isKeyMode(p[0]) ? build(false, p[0]) : null
case 1: return pc(p[0]) ? build(p[0], 'major') : build(false, p[0])
case 2: return build(p[0], p[1])

@@ -207,3 +204,3 @@ default: return null

var toMajor = modeNum(k)
var toC = fifths(parseNote(k[1]))
var toC = pcFifths(k[1])
return toC - toMajor

@@ -210,0 +207,0 @@ }

{
"name": "tonal-key",
"version": "0.65.0",
"version": "0.66.0",
"description": "Conversion between key numbers and note names",
"repository": "https://github.com/danigb/tonal/packages/key",
"keywords": [

@@ -21,9 +22,8 @@ "note",

"tonal-notation": "^0.64.0",
"tonal-transpose": "^0.65.0",
"tonal-note": "^0.65.0",
"tonal-array": "^0.65.0",
"tonal-harmonizer": "^0.65.0",
"tonal-range": "^0.65.0",
"tonal-pitch": "^0.65.0"
"tonal-transpose": "^0.66.0",
"tonal-note": "^0.66.0",
"tonal-array": "^0.66.0",
"tonal-harmonizer": "^0.66.0",
"tonal-range": "^0.66.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc