Class: Song

new Song (songPath, projectorPath, pianoPath)

Name Type Description
songPath string

The path of the directory containing the song files or a path of a file inside the song folder (not nested in subfolders)

projectorPath string

Directory to store intermediate files for the projector app (*.svg, *.json).

pianoPath string

Directory to store intermediate files for the piano score (*.eps).

Members

abc string

The character of the alphabetical folder. The song folders must be placed in alphabetical folders.

folder string

The directory containing the song files. For example /home/jf/songs/w/Wir-sind-des-Geyers-schwarze-Haufen.

The piano folder

The slides folder

An instance of the class SongMetaData().

metaDataCombined module:@bldr/songbook-intermediate-files~SongMetaDataCombined

An instance of the class SongMetaDataCombined().

mscxPiano string

Path of the MuseScore file for the piano parts, can be 'piano.mscx' or 'lead.mscx', relative to the base folder of the song collection.

mscxProjector string

Path of the MuseScore file 'projector.mscx', relative to the base folder of the song collection.

pianoFiles array

An array of piano score pages in the EPS format.

pianoPath string

Directory to store intermediate files for the piano score (*.eps).

projectorPath string

Directory to store intermediate files for the projector app (*.svg, *.json).

slidesFiles array

An array of slides file in the SVG format. For example: [ '01.svg', '02.svg' ]

songId string

The songId is the name of the directory which contains all song files. It is used to sort the songs. It must be unique along all songs. For example: Wir-sind-des-Geyers-schwarze-Haufen.

Methods

detectFile_ (file) private

Detect a file inside the song folder. Throw an exception if the file doesn’t exist.

Name Type Description
file string

A filename of a file inside the song folder.

Returns:
A joined path of the file relative to the song collection base dir.

getSongFolder_ (songPath)string private

Get the song folder.

Name Type Description
songPath string

The path of the directory containing the song files or a path of a file inside the song folder (not nested in subfolders) or a non-existing song path.

Returns:
Type Description
string The path of the parent directory of the song.

recognizeABCFolder_ (folder)string private

Name Type Description
folder string

The directory containing the song files.

Returns:
Type Description
string A single character