ProjectLam / learn_music_game

Learn heritage instruments with an interactive game with a real instrument
1 stars 2 forks source link

Basic tuner functionality #16

Closed robbertzzz closed 1 year ago

robbertzzz commented 1 year ago

This tuner takes in a frequency and matches it to the closest frequency that's in tune. You can switch between chromatic, guiter and phin tuning, although I'm not 100% sure on the octaves the phin plays (I'm assuming high E is equal to guitar in this code). It's just the logic and not any useful UI, I don't want to spend time on that until we have either a design ready or working microphone pitch detection.

I added a test sweep through the entire range of frequencies we support (piano keyboard plus a few extra notes). The sweep continues for one more note than we have because that's easier to do, that's why it hangs on the highest note (G#8).