Day: February 28, 2015

Converting audio to MIDI or decreasing podcast size to few bytes

I was looking for a way to converting audio (WAV file) to MIDI files then I discovered the “waon” project:

http://sourceforge.net/projects/waon/

Using it I can convert wave files to mid files. First I convert MP3 to wav files this way:

$ mpg123 -w file.wav file_original.mp3

Then finally I convert the wav to mid using this command:

$ ./waon -i file.wav -n 2048 -b 60 -t 120 -o file.mid

After converting many music files to mid I decided to convert an audio voice (postcast) and try to understand it (I suggest you to start with a slow audio like these at http://learningenglish.voanews.com).

Initially you cannot understand nothing, but after few minutes your brain adapts to it and will understand everything.

Now see the postcast file size comparison:

$ ls -l file.wav 
-rw-r--r-- 1 alan alan 228920876 Feb 28 13:06 file.wav
$ ls -l file.mp3 
-rw-r--r-- 1 alan alan 20764946 Feb 26 15:59 file.mp3
$ ls -l file.mid 
-rw------- 1 alan alan 580111 Feb 28 13:08 file.mid

More info about simulating human voice with musical instruments:
http://www.thomashummel.net/images/publications/simulation_of_human_voice_timbre.pdf

P.S.: You can use “timidity” on Linux to play mid files