pitch-fq

1.0.0 • Public • Published

pitch-fq

Calculate the frequency of a note, in the pitch "coord" format. (E.g [x, y])

usage

var fq = require('pitch-fq');
var parse = require('scientific-notation');
 
fq(parse('A4'))     // -> 440
fq(parse('A4'), 442) // -> 442
 
var concertPitch = fq(440);
concertPitch(parse('A5')) // -> 880

fq(coord, concertPitch = 440) -> frequency

Calculate the frequency of a notecoord (relative to A4), in the given "concert pitch", assuming an equal temperament.

Normally you'd tune A4 to 440Hz, but in some settings you might want to tune it to 442Hz or something else.

fq(concertPitch) -> fn(coord)

Given only a concertPitch Number, it returns a function, calculating the frequency of a note, given that concert pitch.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    112
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    112

Package Sidebar

Install

npm i pitch-fq

Weekly Downloads

112

Version

1.0.0

License

MIT

Last publish

Collaborators

  • saebekassebil