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

tonal-transpose

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tonal-transpose

Music note transposition

  • 0.69.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
20
Maintainers
1
Weekly downloads
 
Created
Source

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.

tr()

An alias for transpose

trFifths(tonic, number)String | Pitch

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

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'

Keywords

FAQs

Package last updated on 08 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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