Post Reply 
(50g) Convert frequency into note
05-08-2015, 06:02 PM (This post was last modified: 06-15-2017 01:32 PM by Gene.)
Post: #1
(50g) Convert frequency into note
If you're into music, you'll possibly find a use for it.
Usage: enter a frequency (Hz), it will return the corresponding closest note and cents deviation.

Code:

%%HP: T(3)A(R)F(,);
\<< { "C" "C#" "D" "Eb" "E" "F" "F#" "G" "Ab" "A" "Bb" "B" } 0, \-> n p
  \<< 440, / LN 2, LN / 12, * DUP 0, RND DUP 3, ROLLD - 100, * 0, RND 'p' STO 57, + DUP 12, MOD 1, + n SWAP GET SWAP 12, / IP R\->I + " " + p R\->I + "ct" +
  \>>
\>>
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)