Online sounds, including music, are stored in one of several digital audio formats. MP3 and WAV are two of the most common formats, while MIDI is used less often. If you have an MP3 audio file that you need to convert to MIDI for a specific application, you can take advantage of many tools available online that will perform the conversion. Those that are specified as "open source" are usually available free of charge.
How to Convert MP3 to MIDI
Open source applications make their source code available to everyone to use or change as they choose. Audacity, which was originally developed at Carnegie Mellon University, is one of the most popular open source applications for audio file conversion. In addition to using Audacity for MP3 to MIDI conversion, you can also use the application to record audio and edit recordings. It runs on both Windows and Mac as well as Linux and several other operating systems.
You can download Audacity from the Audacity Team website. After you install it using the Audacity Setup Wizard, you can open an MP3 file for conversion. If there are no issues with the MP3 to MIDI conversion, you should be able to select "Export Audio" from the File menu and then select "MIDI" from the format menu in the Export Audio dialog. Alternatively, you can use "Export MIDI" from the File menu to convert to MIDI format.
MIDI Format Limitations
MIDI (music instrument digital interface) is a file format used to store audio from keyboard instruments by recording which keys were hit and for how long. It's only capable of storing a sequence of notes and how they're played, so it's not as widely used as general-purpose music formats like WAV and MP3. MIDI files can be played only by software or devices like mobile phones that have been designed to interpret the format. Many files and other audio formats can't be converted to MIDI using Audacity or similar tools because they contain more complex sounds.
According to the Audacity Wiki, converting more than a single melodic line from MP3 to MIDI is a challenging problem that, at time of publication, is being researched. If this is the case with a specific MP3 file that you open in Audacity, the software will detect that the conversion isn't possible. In this case, Export MIDI will not be available on the File menu and the MIDI format will be hidden in the Export Audio dialog.