Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

array-notation

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

coverage/coverage.json

36

API.md

@@ -138,2 +138,32 @@ ## `interval.parse`

## `operation`
Decorate a function to work with intervals, notes or pitches in
[array notation](https://github.com/danigb/tonal/tree/next/packages/array-notation)
with independence of string representations.
This is the base of the pluggable notation system of
[tonal](https://github.com/danigb/tonal)
### Parameters
* `parse` **`Function`** the parser
* `str` **`Function`** the string builder
* `op` **`Function`** the operation to decorate
### Examples
```js
var operation = require('array-notation/operation')
var parse = require('array-notation/interval/parse')
var str = require('array-notation/interval/str')
var add = operation(parse, str, function(a, b) {
return [a[0] + b[0], a[1] + b[1]]
})
add('3m', '3M') // => '5P'
```
## `pitch.parse`

@@ -184,6 +214,6 @@

## `roman.memoize`
## `roman.parse`
Roman to coordinate: convert from [roman numerals](https://en.wikipedia.org/wiki/Roman_numeral_analysis)
to [pitch coordinates]()
to [array-notation]()

@@ -198,3 +228,3 @@ ### Parameters

```js
var parse = require('array-notation/roman.memoize')
var parse = require('array-notation/roman.parse')
parse('V') // => [1]

@@ -201,0 +231,0 @@ parse('bII') // => [-5]

2

index.js
var A = {}
var A = require('./operation')
A.note = function (n) { A.note.str(A.note.parse(n)) }

@@ -4,0 +4,0 @@ A.note.regex = require('./note/regex')

{
"name": "array-notation",
"version": "1.0.0",
"version": "1.0.1",
"description": "Convert music elements to array notation",
"main": "index.js",
"scripts": {
"build": "npm test && npm run coverage && npm run docs && npm run disc && npm run dist",
"test": "mocha",
"docs": "documentation -f md > API.md"
"docs": "documentation -f md *.js > API.md",
"dist": "browserify index.js | uglifyjs > tmp/music-gamut.min.js&& ls -hall tmp/",
"disc": "browserify --full-paths index.js | uglifyjs | discify > tmp/disc.html",
"coverage": "istanbul cover _mocha"
},
"repository": "https://github.com/danigb/tonal/tree/next/packages/array-notation",
"repository": "https://github.com/danigb/tonal/tree/master/packages/array-notation",
"bugs": {

@@ -12,0 +15,0 @@ "url": "https://github.com/danigb/tonal/issues"

@@ -7,4 +7,28 @@ # array-notation [![npm version](https://img.shields.io/npm/v/array-notation.svg)](https://www.npmjs.com/package/array-notation)

## Features
- Parse notes and pitch classes
- Parse intervals in short hand notation
- Parse roman numerals
- Parse pitched elements (scales, chords, keys)
## Install
Via npm only: `npm install --save array-notation`
It's important to notice that you can __NOT__ require the whole library. Instead, you must require the functions you will use.
## Usage
You can parse notes to array notation with the `note/parse` function:
```js
var parse = require('array-notation/note/parse')
parse('C2') // => [0, 2, null]
```
Read the [API documentation](https://github.com/danigb/tonal/blob/next/packages/array-notation/API.md) to see all the available functions.
## License
MIT License

@@ -11,5 +11,5 @@ 'use strict'

* Roman to coordinate: convert from [roman numerals](https://en.wikipedia.org/wiki/Roman_numeral_analysis)
* to [pitch coordinates]()
* to [array-notation]()
*
* @name roman.memoize
* @name roman.parse
* @function

@@ -20,3 +20,3 @@ * @param {String} str - the roman numeral string

* @example
* var parse = require('array-notation/roman.memoize')
* var parse = require('array-notation/roman.parse')
* parse('V') // => [1]

@@ -23,0 +23,0 @@ * parse('bII') // => [-5]

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc