swaralipi-core

0.1.0 • Public • Published

swaralipi-core

npm version bundle size

A library to convert Western music notation to Indian notation (Swaralipi)

Installing

npm i swaralipi-core

Alternatively, you can download the UMD build from unpkg

Usage

Use the library in <script> tag

<script src="https://unpkg.com/swaralipi-core"></script>
<script>
    let swaralipi = new SwaralipiCore();
    swaralipi.toIndianNote("C4"); // Returns সা (Sa)
    swaralipi.toIndianNote("D4"); // Returns রা (Re)
</script>

Import and use the library as module:

import SwaralipiCore from "swaralipi-core"

// Default configuration (scale:C, Octave: 4, lang:bn)
let swaralipi = new SwaralipiCore();
swaralipi.toIndianNote("C4"); // Returns সা (Sa)
swaralipi.toIndianNote("D4"); // Returns রা (Re)

// Provide parameter:
let scale = "C#"; // All Major scales are supported
let octave = "3"; // Octave
let lang = "bn"; // Only Bengali (bn) and Hindi (hi) are supported

let swaralipi = new SwaralipiCore(scale, octave, lang);

swaralipi.toIndianNote("C#3"); // Returns সা (Sa)
swaralipi.toIndianNote("D#3"); // Returns রা (Re)

</script>

Author

Palash Bhowmick

License

MIT

Package Sidebar

Install

npm i swaralipi-core

Weekly Downloads

5

Version

0.1.0

License

MIT

Unpacked Size

10.6 kB

Total Files

7

Last publish

Collaborators

  • palash.bhowmick