A library to convert Western music notation to Indian notation (Swaralipi)
npm i swaralipi-core
Alternatively, you can download the UMD build from unpkg
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>