@pepavlin/sheet-api
v1.3.13
Published
Sheet-api is library, that helps manage sheet formats, handling extended chords and transposing.
Downloads
70
Readme
sheet-api
Sheet-api is library, that helps manage sheet formats, handling extended chords and transposing.
Installation
npm install @pepavlin/sheet-api
Usage
import {Chord, Sheet, note, transpose} from "@pepavlin/sheet-api"
// Note type
const c : note = 'C';
const e = transpose(c, 4); // Transpose by semitones
// Chord object
const gmoll = new Chord("Gm");
gmoll.transpose(2); // Use transpose to move chord's note-key
gmoll.setTransposition(-3); // Ignores previous tranpositions
// Sheet object
const sheet = new Sheet("{V1}Thank [Em]you Lor[G]d\n [D]Thanks...");
sheet.transpose(-3); // Transpose all chords on the sheet (transpose whole song)
sheet.setTransposition(0);
const sections = sheet.getData(); // Splits sheet on Sections, Lines and Segments