0.69.7 • Published 7 years ago

tonal-transpose v0.69.7

Weekly downloads
19
License
MIT
Repository
-
Last release
7 years ago

tonal-transpose npm version

tonal

tonal-transpose is a collection of functions to transpose music notes using note names and interval names. It can be used to add intervals.

This is part of tonal music theory library.

You can install via npm: npm i --save tonal-transpose

API Reference

transpose(a, b) ⇒ String | Pitch

Transpose notes. Can be used to add intervals. At least one of the parameter is expected to be an interval. If not, it returns null.

Kind: global function
Returns: String | Pitch - the transposed pitch or null if not valid parameters

ParamTypeDescription
aString | Pitcha note or interval
bString | Pitcha note or interavl

tr()

An alias for transpose

Kind: global function

trFifths(tonic, number) ⇒ String | Pitch

Transpose a tonic a number of perfect fifths. It can be partially applied.

Kind: global function
Returns: String | Pitch - the transposed note

ParamTypeDescription
tonicPitch | String
numberIntegerthe number of times

Example

import { trFifths } from 'tonal-transpose'
[0, 1, 2, 3, 4].map(trFifths('C')) // => ['C', 'G', 'D', 'A', 'E']
// or using tonal
tonal.trFifths('G4', 1) // => 'D5'
0.69.7

7 years ago

0.69.6

7 years ago

0.69.4

7 years ago

0.69.3

7 years ago

0.69.2

7 years ago

0.69.0

7 years ago

0.66.0

7 years ago

0.65.0

7 years ago

0.64.0

7 years ago

0.61.0

7 years ago

0.60.0

7 years ago

0.50.5

8 years ago

0.50.4

8 years ago

0.50.3

8 years ago

0.50.2

8 years ago