@vapurrmaid/bpm
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

@vapurrmaid/bpm

A simple zero-dependency package for working with BPM calculations.

BPM class

Constructor

new BPM(bpm);
  • bpm: number - A number greater than 0

Public Properties

  • value: number - Number of beats per minute (BPM)

Public Methods

durationFor

Calculates the duration (in seconds) for a particular note at the BPM.

  durationFor(aNote, beatNote = "quarter"): number
  • aNote: NoteDuration - the note to calculate the duration for
  • beatNote: NoteDuration - the note that's considered 1 beat

numberOfBeatsFor

Calculates the number of beats for the given note duration at this BPM.

numberOfBeatsFor(aNote, beatNote = "quarter"): number
  • aNote: NoteDuration - the note to calculate the duration for
  • beatNote: NoteDuration - the note that's considered 1 beat

Readme

Keywords

Package Sidebar

Install

npm i @vapurrmaid/bpm

Weekly Downloads

0

Version

0.1.8

License

MIT

Unpacked Size

6.87 kB

Total Files

5

Last publish

Collaborators

  • vapurrmaid