Calculating frequencies from the title of notes is easy. each half of the note is equal to 2 ^ (1/12) from the previous note, 440 Hz - A4.
If you happen to be on the windows, you can try this piece of code that plays the song through the PC speaker:
import math import winsound import time labels = ['a','a#','b','c','c#','d','d#','e','f','f#','g','g#']
(note that I am using python 3.x, you may need to adapt part of the code to use it on python 2.x.)
ho, by the way, I used abcdefg as a scale, but you will surely find a way to use h instead of b .
Adrien plisson
source share