Inspiration
As a team of passionate guitarists and musicians, we always wished we had a way to train our pitch ability, while also having fun. This inspired us to create "Perfect Pitch," a video game designed to test and improve your vocal range.
What it does
Perfect Pitch creates a game level based on a song of your choice, which you can play through by controlling your character with the pitch of your voice. It uses live voice input to control the player utilizing pitch detection. The level is created by extracting the vocals/melody from any song, removing background noise and instrumentals and positioning coins using the pitch from this melody.
How we built it
We built this game using Python, utilizing libraries such as PyAudio, PyGame, Aubio, Numpy, Librosa, and others. Utilizing these libraries, we fed in audio tracks and live audio to find pitch for both the player and environment, and applied this into a fun game interface built on PyGame.
Challenges we ran into
Our biggest challenge was dealing with background noise and vocal extraction, using Fourier transformations to map the audio to a usable format. We also had trouble calibrating both the player's vocal range and the range of the prerecorded audio. We solved these issues using scaling and normalization functions to map these ranges uniformly onto the PyGame user interface.
Accomplishments that we're proud of
Throughout this project, we have successfully worked with streaming live audio, detecting pitch, extracting vocals with minimal noise, and creating a functional game interface for the first time.
What we learned
Throughout this process, we have learned how to process large amounts of audio while implementing it through a live app. Our team gained new knowledge on the topics of noise cancellation, pitch detection, and threaded control.
What's next for Perfect Pitch
Perfect Pitch has plenty of room to grow. From portability to customizable song octaves, the sky is the limit. We hope to optimize our pitch detection to provide smoother control over all types of audio files and live audio inputs.
Log in or sign up for Devpost to join the conversation.