You are browsing as a guest. Sign up (or log in) to start making projects!

music grader

  • 3 Devlogs
  • 20 Total hours

for grading your accuracy on whatever instrument you play! perfect for beginners

Ship #1 Pending review

Music Grader: A tool to measure your accuracy in playing a piece!

Ever wanted a tool to tell you how well you’re playing a piece? Are you a beginner that’s trying to replicate a simple tune? This tool records the piece you want to play, then it records your playing and grades it!

-Records goal first: Play a recording of what you want your playing to sound like

-Records attempt next: Test your playing!

-Calculates the accuracy of your playing (how close it sounds to your “goal” recording)

-You can also use this to play musical imitation games with your friends :)

-Works best with piano, but could work with other instruments too!
–> would be a little stricter on grading intonation of instruments

-Stop recording by typing Ctrl + C in the terminal. If you’re on the first recording, it will transition into the next one. If you’re on the second one, it will automatically calculate your accuracy.

Link to download: https://github.com/ducky-violin/music-grader/releases/tag/music_grader

Link to a virtual piano: https://www.musicca.com/piano

Try project → See source code →
Open comments for this post

6h 40m 1s logged

-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!

0
0
8
Open comments for this post

4h 22m 29s logged

-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.

0
0
2
Open comments for this post

8h 30m 45s logged

-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

0
0
8

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…