# keyboard-tones

> Simple npm module that maps the 12 musical tones to the keyboard

Latest version **1.0.3** (published 2017-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install keyboard-tones
pnpm add keyboard-tones
yarn add keyboard-tones
bun add keyboard-tones
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-07-03 |
| First published | 2017-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | dennis iversen |
| Maintainers | diversen |
| Keywords | keyboard-tones, keyboard-tones-mapping |

## Links

- npm: https://www.npmjs.com/package/keyboard-tones
- Repository: https://github.com/diversen/keyboard-tones
- Homepage: https://github.com/diversen/keyboard-tones#readme
- Issues: https://github.com/diversen/keyboard-tones/issues
- npm.io page: https://npm.io/package/keyboard-tones

## Recent versions

- 1.0.3 (latest) — 2017-07-03
- 1.0.2 — 2017-07-03
- 1.0.1 — 2017-06-17
- 1.0.0 — 2017-06-17

## README

# keyboard-tones

Simple npm module that maps the 12 musical tones to the keyboard

    npm install --save keyboard-tones

## Usage: 

    var kt = require('keyboard-tones');
    console.log(kt);

## The mapping: See [index.js](index.js)

On the keyboard, the 12 tones are found here: 

    a
     w
    s
     e
    d 
    f
     t
    g
     y
    h
     u
    j

## Example

In the browser you can use: 

    <script src="dist/keyboardTones.js"></script>

In node: 

    var keyboardTones = require('keyboard-tones');

~~~javascript

        document.addEventListener("keydown", function (e){
            var k = e.key;
            if (k in keyboardTones) {
                // Octave = 3
                let note = keyboardTones[k] + '3';
                parseNoteon(note); // Write your own function
            }
        });
        
        document.addEventListener("keyup", function (e){
            var k = e.key;
            let note = keyboardTones[k] + '3';
            parseNoteoff(note); // // Write your own function
        });
~~~
## License

MIT © Dennis Iversen

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