The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





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 


Messages In This Thread
(50g) Convert frequency into note - Tugdual - 05-08-2015 06:02 PM



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