Software to convert audio to MIDI
Asked Answered
J

9

11

Does any one know if there is good software to perform conversion from (wave or mp3 or other known format) to MIDI? I understand that conversion from audio file to MIDI is a very complex process. I'm currently developing a course project for my bachelor degree that requires manipulating MIDI files.

If you know any good software, I'm opened to suggestions. I prefer software that can also be executed from a shell by passing a file to be converted.

Any help is appreciated.

Jactitation answered 1/5, 2011 at 23:12 Comment(4)
Related: https://mcmap.net/q/1018109/-wav-to-midi-conversion #4919835 #1628571Overfeed
I've blogged about this, since this question comes up rather frequently. Here is a detailed explanation about why what you are trying to do is not very easy at all: nikreiman.com/2010/12/just-for-record-you-dont-convert.htmlLectionary
Also, if your bachelor's project is just about manipulating MIDI files, why can't you just work in MIDI and synthesize it to audio? Why do you need to use audio recordings as a source?Lectionary
My project consists in developing a service for music search which use query by humming approach ( one solution is based on MIDI information). In this case, to create a large database, I need to convert wav/mp3 files into MIDI.Jactitation
S
1

Edit: With advances in software and hardware, this answer is now out-of-date (note the year it was posted).

This is going to be a terrible process at best and utterly impossible most of the time. The problem is that such software has to identify individual musical notes from the audio stream to convert them into MIDI information. This is complicated by the fact that it also has to identify the the different types of sounds to assign them to different tracks. It is even more complicated by the possibilities of sounds that are not "on-note", leaving it several ways of conveying that in the MIDI stream. And then you have the problem of non-musical audio, such as singing, which is conventionally not even put into MIDI.

You're best bet is to spend time either making your own MIDI tracks, or finding or buying some off the 'net. FWIW, before the popularity of MP3 ringtones, a lot of "polyphonic" ringtones for mobile phones were actually MIDI files.

Speedball answered 1/5, 2011 at 23:20 Comment(3)
It's not impossible. The website chordify uses sonic visualiser and some in house tools to extract chords and it's very accurate. I use SV regular and it works well.Maulmain
Sonic Visualizer works. I just recorded myself whistling a little tune, exported as wav, opened that in SV, used the Polyphonic Transcription/University of Alicante plugin, exported the annotation layer as midi. Worked very well (there are a few plugins that create layers can be exported this way; I found this plugin worked best).Trelu
I might note that software to do this (and the hardware it runs on) have advanced considerably in the decade since this question was asked.Speedball
W
10

WaoN does conversion of WAV to MIDI: http://waon.sourceforge.net/

At least it is quite fun :-)

Winny answered 15/5, 2013 at 8:51 Comment(4)
I couldn't get it compiled. Lots of missing librariesCostermansville
The Makefile gives hints which libraries it depends on, like libao-dev, I'd try to install all of them and if it still fails I guess the error gives a hint which library is still missing. It compiles fine here on Ubuntu 15.04 with quite some development packages installed.Entrap
Works for me on Gentoo using proaudio overlay.Lizarraga
Same here it compiled fine after extracting, sudo apt install libsamplerate-dev libao-dev and running makePithos
T
2

A little research (half of that research was a comment on this page) led me to two superb solutions.

One is Sonic Visualiser (https://www.sonicvisualiser.org/download.html), which is a deep (complex) program that, when the Vamp plugin package is installed, includes a few "transformations" (analytical operations) which include export to midi. The two I found most effective were "pYin: Notes" and "Polyphonic Transcription [University of Alicante]". The method is this: You open a wav file, select the transformation (play it if you want) - this creates a new "layer" (each layer is shown as a tab). With this layer active, export using "Export Annotation Layer". Midi is one of the options.

The other, more simple option is called "Tony" (get it? tone-y?) available from https://code.soundsoftware.ac.uk/projects/tony/

Method: open wav file, it auto-analyses by default or select "Analyse Now", then "Export Note Data" allows midi export.

There are probably other solutions. I'm looking for a command-line solution, too, but these work really well.

Trelu answered 24/12, 2020 at 23:44 Comment(0)
S
1

Edit: With advances in software and hardware, this answer is now out-of-date (note the year it was posted).

This is going to be a terrible process at best and utterly impossible most of the time. The problem is that such software has to identify individual musical notes from the audio stream to convert them into MIDI information. This is complicated by the fact that it also has to identify the the different types of sounds to assign them to different tracks. It is even more complicated by the possibilities of sounds that are not "on-note", leaving it several ways of conveying that in the MIDI stream. And then you have the problem of non-musical audio, such as singing, which is conventionally not even put into MIDI.

You're best bet is to spend time either making your own MIDI tracks, or finding or buying some off the 'net. FWIW, before the popularity of MP3 ringtones, a lot of "polyphonic" ringtones for mobile phones were actually MIDI files.

Speedball answered 1/5, 2011 at 23:20 Comment(3)
It's not impossible. The website chordify uses sonic visualiser and some in house tools to extract chords and it's very accurate. I use SV regular and it works well.Maulmain
Sonic Visualizer works. I just recorded myself whistling a little tune, exported as wav, opened that in SV, used the Polyphonic Transcription/University of Alicante plugin, exported the annotation layer as midi. Worked very well (there are a few plugins that create layers can be exported this way; I found this plugin worked best).Trelu
I might note that software to do this (and the hardware it runs on) have advanced considerably in the decade since this question was asked.Speedball
D
1

You can convert WAV to MIDI using WaoN. You can download the WaoN Windows binaries here.

Dhiman answered 9/7, 2015 at 11:24 Comment(0)
C
1

I've heard about Waon. However, it gave me a bunch of compiling issues, so I was not able to install it.

I did find sonic annotator, developed by Queen Mary, it uses Vamp plugins to extract features (in this case transcribe) and write it to a midi file.

These plugins could work, however, they will work better if you add a config file (see individual plugin's doc):

./sonic-annotator file.wav -d vamp:qm-vamp-plugins:qm-transcription:transcription -w midi

./sonic-annotator file.wav -d vamp:silvet:silvet:notes -w midi

./sonic-annotator file.wav -d vamp:ua-vamp-plugins:mf0ua:mf0ua -w midi
Costermansville answered 20/8, 2015 at 23:5 Comment(1)
I was able to install waon on Ubuntu 20.04 by installing the dependencies shown in the errors, like libfftw3-dev, libsndfile1-dev, libao-dev and libsamplerate0-dev :)Thrill
R
0

There's a new tool coming up (currently beta) that looks really promising. It is called Imitone: https://www.kickstarter.com/projects/evanbalster/imitone-mind-to-melody

Richella answered 8/2, 2015 at 10:48 Comment(0)
S
0

Such conversion can be achieved with genetic algorithms. It is not going to be perfect, but it can be close as possible. In a similar manner Mona Lisa was reconstructed with triangles in Genetic Programming: Evolution of Mona Lisa project.

Shotputter answered 8/10, 2017 at 12:54 Comment(1)
Do you have some example or any information on how this can be achieved, e.g. what kind of genetic representation could be used? I'm trying to work on a similar project but I cannot find any resource online regarding this approach to the problem. Thank you!Fullscale
H
-1

Most Midi files you may have heard were not converted, instead they were remade. By carefully studying the notes in the song the Artist/User converting the audio file, reproduces the song to as close as possible to a midi sequence.

FL Studio (formerly Fruity Loops) has the ability to create midi files etc from scratch, but this takes a lot of time, effort and basic skills of using such a program.

It is not possible to convert an Audio file to Midi though.

Hesperidium answered 9/5, 2011 at 20:24 Comment(1)
That last statement doesn't look like it was true in 2011, it certainly isn't true now.Cards
K
-1

Use SoX - the Swiss Army knife of sound processing. Very easy to use.

SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files on most platforms.

Example:

sox /mypath/my_audio.mp3 /mypath/my_audio.MIDI

SoX is very mature project! Here is the link: http://sox.sourceforge.net/

Here are some examples I googled for you: http://www.thegeekstuff.com/2009/05/sound-exchange-sox-15-examples-to-manipulate-audio-files/

Kugler answered 10/1, 2012 at 23:28 Comment(3)
I've recently downloaded SoX, and tried doing a conversion. It seems like it no longer supports MIDI files :(Bev
SoX v does not support MIDI output. I find support for the following: AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb au avr caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl sln smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm wve xa xi PLAYLIST FORMATS: m3u pls AUDIO DEVICE DRIVERS: coreaudioVasiliu
sox FAIL formats: no handler for file extension midi'`Castor

© 2022 - 2024 — McMap. All rights reserved.