# audiotools

> Collection of generic functions for audio and other time-based media

Latest version **0.1.4** (published 2017-10-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install audiotools
pnpm add audiotools
yarn add audiotools
bun add audiotools
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2017-10-06 |
| First published | 2017-10-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Evan Cooney |
| Maintainers | evancooney |
| Keywords | audio, sample rate, time based media, bit depth, media |

## Links

- npm: https://www.npmjs.com/package/audiotools
- Repository: https://github.com/evancooney/audiotools
- Homepage: https://github.com/evancooney/audiotools#readme
- Issues: https://github.com/evancooney/audiotools/issues
- npm.io page: https://npm.io/package/audiotools

## Recent versions

- 0.1.4 (latest) — 2017-10-06
- 0.1.3 — 2017-10-06
- 0.1.2 — 2017-10-03
- 0.1.1 — 2017-10-03
- 0.1.0 — 2017-10-03

## README

Audio Tools
=========

A small library that provides utility functions for audio and other time-based
media (especially the functions I've re-written countless times!)

## Installation

  `npm install @evancooney/audiotools`

      var Audiotools = require('@evancooney/audiotools');
      var formattedNum = Audiotools.formatMilliseconds(64000.00);

      or with React

      import {formatMilliseconds} from 'audiotools'
      formatMilliseconds(64000.00);


      Output should be `01:04`

## Usage

**formatMilliseconds(milliseconds)**
Usage:
- formatMilliSeconds(64000.00)
- Output is: 01:04

**formatMilliseconds(seconds)**
- formatMilliSeconds(64)
- Output is: 01:04

-- Empty or negative values with return: 0:00

**formatBitDepth(sampleRate, channels, bitrate)**
- formatBitDepth(44100, 2, 1411267)
-  Output is: 16

**formatBitrate(sampleRate, channels, bitDepth)**
- formatBitDepth(44100, 2, 16)
- Output is: 1411200



## Tests

  `npm test`

## Contributing

In lieu of a formal style guide, take care to maintain the existing coding style.
Would welcome any assistance!

---
_Source: https://npm.io/package/audiotools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
