Skip to content

Commit 7fc42f4

Browse files
committed
documentation of noteToFreq method
1 parent 440ed59 commit 7fc42f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/helpers.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ function midiToFreq(m) {
8282
}
8383

8484
// This method converts ANSI notes specified as a string "C4", "Eb3" to a frequency
85+
86+
/**
87+
* Returns the frequency value of a note. This
88+
* the method converts ANSI notes specified as a
89+
* string "C4", "Eb3" etc to a frequency.
90+
*
91+
* @method noteToFreq
92+
* @param {String} ansiNote The string of a ANSI note
93+
* @return {Number} Frequency value of the given ANSI note
94+
*/
8595
function noteToFreq(note) {
8696
if (typeof note !== 'string') {
8797
return note;

0 commit comments

Comments
 (0)