Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,
I was wondering how to convert mp3 or wav file to midi in Visual Basic .NET.
I had a look at LAME, and I don't think it has that functionality.
I do not know where to start, so if you could give me a starting point and that, that would be great.
Regards,
iProgramIt
Posted
Comments
Sergey Alexandrovich Kryukov 16-May-15 22:14pm    
If you don't know where to start, better don't start. This problem is extremely complex, this is image recognition in extremely complicated situation. In most cases, the problem makes no sense in principles. In other cases, it is practically unresolvable. And in rare cases when the record is really some "clean" music, the problem is extremely complicated.
—SA

Please see my comment to the question. There is no such thing as "convert".

I want to explain to you at least the part of the problem. First of all, why the formulation of this problem makes no sense at all in general case? This is simple: MIDI operates with modern European 12-tone tonal system in equal temperament: http://en.wikipedia.org/wiki/Equal_temperament[^].

Essentially, MIDI data is the set of events over the notes of this system and different instruments with different timbres: note start (relative volume and instrument is specified), note ends; special notation for percussion exists, there is data for bending. Pretty much, that's all. These events are note sounds themselves; the MIDI is pretty much a form of traditional music notation.
In general audio record, there is no such thing. There are no notes at all; there is a complicated dynamic audio wave form. Even if you break it into some time frames and perform Fourier transform, you will find frequencies which don't fit any tonal system or any rules at all. Now, the trick is: this is pretty much so even if this is music. (!)

Even for record we typically perceive as music, the situation remains uncertain. In many recorded music pieces, there is a lot of noise, string timber of voice and instruments smudges the tones; and the tones themselves could be strongly bended. I don't even want to discuss the situation when alternative temperaments are used, such as microtonal; and this is the big part of music of different culture, and also modern microtonal music, including rock: http://en.wikipedia.org/wiki/Microtonal_music[^].

How about modern classic music performed cleanly, with distinct tones using the "standard" tonal system I described above? Theoretically speaking, it make the situation resolvable: there are "notes". Only this is extremely difficult problem. Let me put it this way: all open-source tools I found so far were unsatisfactory. Want to storm a huge problem? Well, you would need to learn a lot in the physics of waves, functional analysis, Fourier transform and Fourier analysis, and, more importantly, get the general understanding of all the problems. Even this minimum means serious education. To see what is it all about, you can start with
http://en.wikipedia.org/wiki/Wave[^],
http://en.wikipedia.org/wiki/Functional_analysis[^],
http://en.wikipedia.org/wiki/Fourier_transform[^].

—SA
 
Share this answer
 
v3
Comments
iProgramIt 17-May-15 3:36am    
Thank you. I understand that this is a very complex thing - and I too have discovered that open-source software that try to accomplish what I am trying is not satisfactory as well.
-iProgramIt
There is no way to automatically do a "conversion" of an MP3 to to MIDI. Well, with any accuracy that is.

I know a guy who's part time job is doing exactly what you're talking about. He, and other s like him, play the songs on various instruments with MIDI capabilities and record the songs in MIDI formats - all done manually because for the sake of accuracy.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900