Skip to content

swaralipi-js/swaralipi-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Core libraries for Swaralipi (Indian Sheet Music)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published