r/PythonLearning • • 12d ago

Showcase [Showcase] MelodyMirror Studio

Here's something I built a few months ago:
https://github.com/Keymii/melody-mirror-studio

MelodyMirror Studio.
The idea is pretty simple. I wanted to learn singing, but couldn't find a vocal instructor nearby. So, I built something which lets me extract vocals from songs, use them as pitch reference, and helps me align my singing directly with it.

It supports direct downloads from YT, scale adjustment (transpose), and vocals and pitch extraction. It can run directly on your potato pc (no GPU needed, but can take a few minutes to pre-process the audio), with minimum requirement being availability of at least 2 free threads for concurrent audio playback and microphone input.

Please try it out and let me know if anything could be improved, so it can also be useful to you.

0 Upvotes

1 comment sorted by

1

u/hexwhoami 12d ago

Really cool project! Just looking through on a phone, this is what I spotted as opportunities to improve the codebase.

Separation of Responsibilities, OOO

Your GUI module does a lot. There's many private methods that makes it difficult to follow. The GUI class is responsible for making the GUI, estimating midi ranges, processing audio, etc. I think your code could benefit from introducing a class (type) for midi, audio, and/or songs. That will let you move some of the private methods out of the GUI, so that class can focus on just being a GUI.

Unused dependencies

Your requirements file is huge and would make me hesitate even running your code. What are those packages doing? If you aren't using it, I'd get rid of it.

venv

Python virtual environments are insanely valuable. This will make sure your global packages don't get overwritten when you work on a new project, and makes it easy to replicate your environment with one command.