npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

note-frequency-map

v0.0.7

Published

This tool can find the frequencies of any note.

Downloads

52

Readme

note-frequency-map

A npm package for music note frequency lookup

Alpha

This package is currently in alpha, bugs and big structure changes may occur!

If you find a bug, or miss a feature, open an issue on the GitHub page!

Installation

Using npm:

$ npm install note-frequency-map

In NodeJS:

// Load the package
const FrequencyMap = require('note-frequency-map');

Examples

Find the frequency of a note:

const FrequencyMap = require('note-frequency-map');
let myNote = FrequencyMap.noteFromName('A3');
console.log(myNote.frequency); // > 220

Find the note from a frequency

const FrequencyMap = require('note-frequency-map');
let myNote = FrequencyMap.noteFromFreq(880);
console.log(myNote.note); // > 'A5'

Change the root: The root note is A4=440 by default

const FrequencyMap = require('note-frequency-map');
FrequencyMap.setRoot('A4', 442); // A4 is normally the refrence note, but any note works!
let myNote = FrequencyMap.noteFromName('A3');
console.log(myNote.frequency); // > 221

Compare two note objects

const FrequencyMap = require('note-frequency-map');
let myFirstNote = FrequencyMap.noteFromName('Bb6');
let mySecondNote = FrequencyMap.noteFromName('C#3');
let comparasonObject = myFirstNote.compare(mySecondNote);
console.log(comparasonObject.summary);
// > 'The note A#6 is 2 octaves and 9 semitones away from C#3'

Functionality

The note-frequency-map object has three methods

  • .noteFromName(name) - creat a Note object from the note name (e.g. 'C#3')
  • .noteFromFreq(frequency) - create a Note object from a frequency (e.g. 880)
  • .setRoot(name, frequency) - set the root note + frequency

The Note object has two methods and 7 properties

  • .transpose(semitones) - transpose to another note
  • .compare(otherNoteObject) - see how two notes compare
  • .name - the name of the note (e.g. 'Bb')
  • .octave - the octave of the note (e.g. 5)
  • .note - the name + the octave (e.g. 'Bb5')
  • .frequency - the frequency of the note
  • .tuning - what root note it was tuned to, an object
  • .centsOff - how much out of tune the note is, usefull when finding note from frequency
  • .err - is defined of something went wrong

Protip

console.log() the data while experimenting. This way you will easely see how things is structured

Changelog

Changelog for version 0.0.7

  • Optimized the note finder (from frequency) alogrithm
  • note-frequency-map.noteFromName(name) now support both b and as flat symbols
  • Fixed console.log() typo in README.md
  • Bug fixes
  • Code cleanup

Check the GitHub page for more details