Notefy is an AI-powered web application that automatically transcribes music from an MP3 file into playable sheet music.
Built without deep learning, this project uses classical machine learning and signal processing techniques to analyze audio, identify instruments, and generate a musical score. It features a full user authentication system with a persistent history, all wrapped in a clean, user-friendly web interface.
- Automatic Music Transcription: Converts instrumental or vocal MP3s into sheet music.
- Instrument Recognition: Utilizes a Random Forest model to identify the instruments playing in the track.
- Vocal Removal: Employs Independent Component Analysis (ICA) to separate vocals from a stereo mix, isolating the instrumental track for analysis.
- Web-Based GUI: A modern, browser-based interface built with Flask and JavaScript for a seamless user experience.
- User Authentication: A complete user system with signup, login, and profile management, backed by a MySQL database.
- Persistent History: Each user's transcription history is saved to their account.
- Dynamic Audio Controls: Users can adjust the pitch and playback speed of the uploaded audio before transcription.
- PDF & MIDI Output: Generates high-quality PDF sheet music via MuseScore and optional MIDI files for use in any Digital Audio Workstation (DAW).
- Backend: Python, Flask
- Machine Learning: Scikit-learn (Random Forest)
- Audio Processing: Librosa, Pydub
- Musicology Toolkit: Music21
- Database: MySQL
- Frontend: HTML, CSS, JavaScript
- User Authentication: PyJWT (JSON Web Tokens), bcrypt
Notefy processes audio through a sophisticated pipeline:
- User Uploads MP3: The process starts with the user's audio file.
- Vocal Removal (ICA): The system isolates the instrumental track from the stereo mix.
- Feature Extraction: The instrumental audio is analyzed to create a "sonic fingerprint" using features like MFCCs, Zero-Crossing Rate, and Spectral Centroid.
- Instrument Detection (Random Forest): The trained model predicts the instruments based on the audio features.
- Pitch Detection (YIN): The dominant melodic line of the instrumental track is identified.
- Sheet Music Generation (Music21): The detected notes are assembled into a musical score.
- Final Output: The score is saved as PDF and optional MIDI files, and the record is saved to the user's history in the database.
Follow these steps to set up the project on a macOS environment.
- Homebrew: Make sure you have Homebrew installed.
- For Windows & Linux: Don't need to install homebrew.
- MySQL: You need a running MySQL server.
git clone https://github.com/ETCHDEV/Notefy.git
cd notefyInstall required system libraries using Homebrew.
brew install mysql fluidsynth musescoreFor Windows & Linux: Search gpt for installing fluidsynth and musescore
Note: Ensure the MuseScore application is in your /Applications folder (Only for MacOS).
Log in to MySQL and import the .sql file.
Create and activate a virtual environment, then install the required packages.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtFor Windows: Ask ChatGPT
You only need to do this once. This script will process the datasets and create the instrument classifier. This will take a long time. (No need has I have included an trained model)
python train_instrument_model.pyStart the Flask backend server.
python server.pyFor Windows & Linux: Ask ChatGPT if any error occurs
Open your web browser and navigate to: http://127.0.0.1:5000
You can now sign up for an account, log in, and start transcribing music!
- Monophonic Transcription: The system is designed to detect the single, most dominant melodic line. It cannot transcribe polyphonic music (multiple notes at once, like chords).
- Rhythm Simplification: Complex rhythms and timing nuances are simplified (quantized), so the output may not capture the full rhythmic feel of the original performance.
- Expressive Details: The transcription does not include dynamics (loud/soft), articulations, or other performance expressions.