1.0.2 • Published 6 years ago

songduration v1.0.2

Weekly downloads
5
License
ISC
Repository
-
Last release
6 years ago

Song duration extractor

A song duration data extractor

Installation

  1. Install sox dependency

  2. Install the package npm install --save songduration

NOTE: This will only work for remotedly hosted files

Dependencies

  • node 8.0.0
  • From Linux repos sox

Setup

  1. Give execution permissions to setup file

chmod +x ./bin/setup.sh

  1. Install nvm

npm install nvm

  1. If you are using ubuntu, add the repo to the sources list file

File: /etc/apt/sources.list Line to add (in case of xenial): http://cz.archive.ubuntu.com/ubuntu xenial

sudo apt-get update

If you have another version of ubuntu, just change the xenial part of the command and put the version name in there

  1. Run setup script

./bin/setup.sh

Usage

Create a new instance of the SongDurationExtractor

songDuraionData = new SongDurationExtractor({
    url: 'url', /* required, string, */
    limit: 1024 * 16 /* optional, integer, this is the default value (1024 * 16) */
})

songDurationData.getDuration()
    .then(songData => {
        //Do whatever you need to do with songData
    })
    .catch(error => console.error.bind(console));

TODO:

  • Add support for locally hosted files
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago