music grader
- 3 Devlogs
- 20 Total hours
for grading your accuracy on whatever instrument you play! perfect for beginners
for grading your accuracy on whatever instrument you play! perfect for beginners
-added a goal vs attempt recording
–> “goal” is what you want to play (you can play a recording of what you want to play to the mic), while “attempt” is what you’re actually playing (live)
-added a feature to compare accuracy of goal vs attempt (and create an “accurate notes” list)
-added a small delay to checking the notes so that it would reduce ghost harmonics
-raised the note-neighbors number for the program to be more resistant to background noise, ghost harmonics, and vibrato
This program works pretty well for playing on digital pianos, since the frequency stays consistent and the computer can pick up the sound better. I’ve been trying to make this work for string instruments (which aren’t always in tune), but it’s very difficult since making the program too resistant to vibrato could make it less accurate overall.
Nonetheless, I’m pretty proud of this project because it was difficult for me to learn and understand all about using the wave and pyaudio packages :D
I hope this is useful to anyone trying to learn an instrument!
-no longer spams the same note over and over again for a continuous long note
-waits for a new frequency (or a silence) before printing a new note
-fixed the issue where the recording saves in x2 speed
-increased number of note-neighbors considered when the program “votes” on which note is the main one (to cancel out ghost harmonics / vibrato)
I noticed that my program works better on piano (since the notes’ frequencies are more consistent), but I’m working on adjusting this to work for other instruments as well (especially those that can vibrato). I found that my recording was saving at x2 speed because I forgot to update the sample width parameter when I was changing from a width of 4 to a width of 2.
-made a recording system
-created a note-mapping function
-added a delay to let microphone initialize before recording
-used a rolling buffer for more accuracy in identifying notes
-prints note and frequency in Hz
First time working with audio in software! It was hard to get a functional audio file output and to ensure accuracy in note tracking; the recording kept sounding distorted and it was all static noise.
A lot of my time was spent on trying to get a decent recording; however, it’s still not accurate because while the static noise is gone, the audio is playing at a higher speed than recorded. Still, my program’s main function is to identify notes, so for now I’ll just focus on that. (Also, that recording thing is driving me insane.)
I learned a lot about audio processing from random blogs and videos on the Internet, so coding this was really confusing and I kept messing around with the code to test what each one does. Still, this is really interesting! :D