Created
November 2, 2020 22:53
-
-
Save t0dd/ec860ead16ed8767cc962ee40ef9a9bb to your computer and use it in GitHub Desktop.
Ruby implementation of the Formula for calculating frequencies of musical notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# given a musical note with a specific frequency (in Hz), how do to calculate the frequency of another note? | |
def note_freq_calc (base_frequency, number_of_steps_to_next_note) | |
frequency_of_note = base_frequency * 1.059463094359 ** number_of_steps_to_next_note | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment