# note-to-frequency

> 🎼 converts a note (scientific pitch notation) to a frequency

Latest version **1.4.1** (published 2017-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install note-to-frequency
pnpm add note-to-frequency
yarn add note-to-frequency
bun add note-to-frequency
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2017-01-02 |
| First published | 2016-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=4.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Geoffrey Dhuyvetters |
| Maintainers | duivvv |
| Keywords | audio, note, scientific pitch, frequency, web audio, music, music theory |

## Links

- npm: https://www.npmjs.com/package/note-to-frequency
- Repository: https://github.com/duivvv/note-to-frequency
- Homepage: https://github.com/duivvv/note-to-frequency#readme
- Issues: https://github.com/duivvv/note-to-frequency/issues
- npm.io page: https://npm.io/package/note-to-frequency

## Dependencies (1)

- [validate-note](https://npm.io/package/validate-note.md) ^1.4.0

## Recent versions

- 1.4.1 (latest) — 2017-01-02
- 1.4.0 — 2016-12-30
- 1.3.2 — 2016-12-27
- 1.3.1 — 2016-11-16
- 1.3.0 — 2016-11-14
- 1.2.0 — 2016-11-10
- 1.1.2 — 2016-10-11
- 1.1.1 — 2016-10-09
- 1.1.0 — 2016-10-09
- 1.0.0 — 2016-10-08

## README

# note-to-frequency

![Node](https://img.shields.io/node/v/note-to-frequency.svg?style=flat-square)
[![NPM](https://img.shields.io/npm/v/note-to-frequency.svg?style=flat-square)](https://www.npmjs.com/package/note-to-frequency)
[![Travis](https://img.shields.io/travis/duivvv/note-to-frequency/master.svg?style=flat-square)](https://travis-ci.org/duivvv/note-to-frequency)
[![David](https://img.shields.io/david/duivvv/note-to-frequency.svg?style=flat-square)](https://david-dm.org/duivvv/note-to-frequency)
[![Coverage Status](https://img.shields.io/coveralls/duivvv/note-to-frequency.svg?style=flat-square)](https://coveralls.io/github/duivvv/note-to-frequency)
[![Gitmoji](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square)](https://gitmoji.carloscuesta.me/)

> 🎼 Converts a note (scientific pitch notation) to a frequency

### Usage

```js

import noteToFrequency from 'note-to-frequency';

const frequency = noteToFrequency('A4');
console.log(frequency); // > 440

```

### Installation

Install via [yarn](https://github.com/yarnpkg/yarn)

	yarn add note-to-frequency (--dev)

or npm

	npm install note-to-frequency (--save-dev)

### configuration

You can pass in extra options as a configuration object (➕ required, ➖ optional, ✏️ default)

```js

import noteToFrequency from 'note-to-frequency';

const frequency = noteToFrequency('C2', {base: 446, maxOctave: 4});
console.log(note); // > 66.3

```

➖ **base** ( Number ) ` ✏️ 440 `
<br/> 📝 base frequency

➖ **maxOctave** ( Number ) ` ✏️ 8 `
<br/> 📝 max octave allowed


### Examples

see [`example`](example/script.js) folder or the [runkit](https://runkit.com/duivvv/note-to-frequency) example

### Builds

If you don't use a package manager, you can [access `note-to-frequency` via unpkg (CDN)](https://unpkg.com/note-to-frequency/), download the source, or point your package manager to the url.

`note-to-frequency` is compiled as a collection of [CommonJS](http://webpack.github.io/docs/commonjs.html) modules & [ES2015 modules](http://www.2ality.com/2014/09/es6-modules-final.html) for bundlers that support the `jsnext:main` or `module` field in package.json (Rollup, Webpack 2)

The `note-to-frequency` package includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the [`dist` folder](https://unpkg.com/note-to-frequency/dist/). They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. You can drop a UMD build as a [`<script>` tag](https://unpkg.com/note-to-frequency) on your page. The UMD builds make `note-to-frequency` available as a `window.noteToFrequency` global variable.

### Misc

This module was created using [generator-module-boilerplate](https://github.com/duivvv/generator-module-boilerplate).

### License

[MIT](LICENSE)

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