Adding the pitch and tone generation code, albeit tone generation does not seem to be working currently.