Back to the FAQ of ABK

 


Conversion of .wav or other audio files to midi.
 

There are some programs that will convert, with only moderate success,
solo instrumental audio files to midi. Examples of such conversions
can be found in this zip file:

conversion-test.zip

A description of the problems
of isolating and identifying individual instrument sounds in
an audio file are beyond the scope of this FAQ. Suffice it to
say that an algorithm for converting multiple-instrument audio
files to individual midi instruments has yet to be used in a
commercially-successful application, and the computer resources
needed to run such a program are probably far beyond the
capabilities of the typical computer. Since there is no
equivalent for the human voice in midi, audio tracks
containing vocals would present even greater problems. There
is a good discussion, complete with good visual analogies of
this problem at:

http://www.myriad-online.com/en/sharedxp/audiomidi/audiomidi.htm

There is an even more detailed explanation at:

http://homesequencers.net/mod/wiki...

Most recently, Version 2007 of Band In A Box (PG Music) has
attempted to solve one aspect of this conversion problem by adding
a feature that attempts to "guess" chords in an audio file;
specifically a .wav, an .mp3, or a .wma. Initial testing with this
feature shows that it is not completely accurate because of the
nature of Band In A Box itself, as explained below. The feature
must be able to find the bar lines in an audio file, which it does.
The user must be able to separate any "intro" measures from bar
1, and this can be accomplished both audibly and visually. The
feature does a good job of determining the key signature of the
audio file, but the time signature must be entered by the user
from a limited number of choices in pull-down lists. The
feature will also determine if any adjustments in fine-tuning
(measured in cents from A440) must be made. It then takes the
bass part as root, and other notes into account in determining
chords.

The inaccuracy may stem from the following: Band In A Box
limits the number of chords per measure. For example, in 4/4
time, it will limit the number of chords per measure to four.
The chord-guessing feature, then, may be fooled by a chord change
originating in the last eighth note of a measure in a song in 4/4
time to the extent that the chord it guesses for the next measure
will not be accurate. Armed with this knowledge, a musically-trained
user can make some adjustments. Once the chords are guessed, they
can be transferred to the usual Band In A Box chord-entry screen, and
it's here that those adjustments can be made. The user can then enter
or "record" the melody, or save just the chords as a Band In A Box
file and/or a midi file and then add the melody with a midi sequencer
program later.   (Note: In the 2008 version of Band In A Box this
function has been improved somewhat as far as the Band In A Box
user interface is concerned, but it remains just as limited regarding
the audio-to-midi question.)

Another advance has been demonstrated, but not yet released as of
the release date of this FAQ. The audio-editing program, Melodyne
(Celemony) has had the ability to convert pitches played as single
notes by a solo instrument in an audio file to their corresponding
midi messages for some time. The latest technology
can recognize individual notes played in a chord (again, in a
single instrument -- piano, guitar, keyboard, vocal) separate them
out, and make it possible to manipulate them as individual notes
in the Melodyne editor. This function will probably be released
as a plug-in to Melodyne some time later this year.
 



Example of the difficulty in getting audio-to-midi to work
for anything as complicated as a guitar chord



 

The above represents 1 069 seconds of a chord on a 6 string electric.
A background snare drum and bass drum beats keep time, and a very quiet
rhythm guitar. Along the bottom (horizontally) is time.
The vertical has two channels. Frequency is shown on the right hand number line.

The 1 2 3 4 on the chart are the primary area where the overtone frequencies are at the greatest amplitude?? 1 2 3 4 strings.

The Main Lead guitar Mono was split into the two left and right channels . It was Strummed once while holding the 1st(A) and 2nd(E)second string at the 5th fret and bending the 3rd(d) string at the 7th fret The third string was bent up to an E from am an D 1 whole step The 4th string was also bent, but less than the 3rd. You can see, the harmonics of the stings as being bent as the matching frequencies were hit by the bend

This guitar has many overtones, approx 20 main overtones dispersed at regular multiples of the above the original frequency.

In the audio cut, the sound was started at low volume and quickly raised to normal, so you see that rise in amplitude in the beginning milliseconds .

Here is the 1 second print out.
Left column Frequency followed by Amplitude for the left and right tracks.
The rows were plucked with an FFT of 512.
Fast Fourier Transformation size.

The sound of the guitar is so heavily loaded with overtones, that the snare drum the second time it is hit, is interlaced with sounds from the guitar. Because of the multiple strings and numerous overtones, it seems impossible to separate out what is going on in the guitar. Had it been a trumpet or flute or an instrument that can play only a single note at one time, there may have been some sort of hope. Note even the drums emit multiple frequencies that overlap the guitar overtones.


Freq:      Left:      Right:


0 -41.777282715 -40.717098236
43.066 -40.733535767 -39.562553406
86.132 -33.379386902 -32.19354248
129.199 -30.893968582 -29.646154404
172.265 -33.960273743 -32.779174805
215.332 -35.281951904 -34.185523987
258.398 -36.063652039 -34.850749969
301.464 -40.450073242 -39.551651001
344.531 -45.172138214 -45.216011047
387.597 -47.032196045 -47.013874054
430.664 -43.312503815 -43.059005737
473.73 -42.415096283 -41.76279068
516.796 -43.928245544 -43.25044632
559.863 -49.942207336 -49.358776092
602.929 -54.340045929 -53.842624664
645.996 -43.580875397 -43.595752716
689.062 -44.348995209 -44.459033966
732.128 -52.748313904 -52.677524567
775.195 -60.052371979 -59.110984802
818.261 -59.302387238 -58.194591522
861.328 -51.850009918 -51.083911896
904.394 -50.420135498 -49.795898437
947.46 -51.070144653 -51.130149841
990.527 -49.748867035 -49.833850861
1033.593 -54.529663086 -55.021186829
1076.66 -60.084320068 -59.333744049
1119.726 -62.813564301 -62.611797333
1162.792 -57.179683685 -56.855659485
1205.859 -51.608215332 -51.35987854
1248.925 -51.182300568 -51.026863098
1291.992 -44.461429596 -44.321178436
1335.058 -42.270599365 -42.138629913
1378.125 -47.314918518 -47.280033112
1421.191 -46.356525421 -46.352500915
1464.257 -45.685771942 -45.683643341
1507.324 -44.021457672 -43.967861176
1550.39 -42.144271851 -42.135665894
1593.457 -48.312026978 -48.215942383
1636.523 -41.631271362 -41.557689667
1679.589 -41.493743896 -41.401943207
1722.656 -49.195514679 -49.013134003
1765.722 -48.361019134 -48.096569061
1808.789 -53.636966705 -53.373077393
1851.855 -63.423736572 -63.002933502
1894.921 -62.796180725 -62.301311493
1937.988 -66.997642517 -66.839584351
1981.054 -62.30242157 -61.695030212
2024.121 -62.56615448 -62.224304199
2067.187 -62.516464233 -62.524501801
2110.253 -60.234615326 -60.129394531
2153.32 -61.71931076 -61.117237091
2196.386 -64.100151062 -62.839187622
2239.453 -66.018753052 -64.78666687
2282.519 -60.978855133 -60.876514435
2325.585 -57.218486786 -57.101524353
2368.652 -58.740779877 -58.46546936
2411.718 -58.110660553 -57.769428253
2454.785 -58.17678833 -57.60874176
2497.851 -60.535770416 -60.283699036
2540.917 -63.340328217 -63.181865692
2583.984 -67.798049927 -67.243286133
2627.05 -63.409275055 -62.656471252
2670.117 -61.536457062 -60.917209625
2713.183 -64.325798035 -63.652744293
2756.25 -63.05229187 -62.736244202
2799.316 -65.864822388 -65.246322632
2842.382 -69.714851379 -69.336921692
2885.449 -68.964584351 -68.674591064
2928.515 -66.088882446 -65.864440918
2971.582 -62.42963028 -62.207572937
3014.648 -63.307945251 -62.898345947
3057.714 -66.391998291 -65.688316345
3100.781 -68.391403198 -67.381164551
3143.847 -77.828407288 -74.416595459
3186.914 -71.167205811 -70.420959473
3229.98 -73.573432922 -73.446029663
3273.046 -67.486999512 -67.272857666
3316.113 -64.694610596 -64.369636536
3359.179 -70.087692261 -69.876228332
3402.246 -73.166641235 -73.154464722
3445.312 -73.79158783 -73.939453125
3488.378 -69.218002319 -68.652023315
3531.445 -64.643531799 -64.340003967
3574.511 -67.919555664 -67.699996948
3617.578 -68.146957397 -67.983856201
3660.644 -66.471282959 -66.460067749
3703.71 -70.65460968 -70.497650146
3746.777 -64.57849884 -64.50818634
3789.843 -66.835021973 -66.799278259
3832.91 -70.027336121 -70.006576538
3875.976 -70.663139343 -70.605773926
3919.042 -71.76335144 -71.32118988
3962.109 -67.740402222 -67.083084106
4005.175 -67.559188843 -67.42086029
4048.242 -74.892501831 -74.560668945
4091.308 -70.276702881 -70.262359619
4134.375 -68.693824768 -68.732765198
4177.441 -64.801239014 -64.776931763
4220.507 -65.1067276 -65.070922852
4263.574 -65.027244568 -64.952278137
4306.64 -62.356140137 -62.227825165
4349.707 -63.042953491 -62.94977951
4392.773 -67.993415832 -67.964508057
4435.839 -69.964363098 -69.788749695
4478.906 -65.95451355 -65.953422546
4521.972 -60.109771728 -60.071674347
4565.039 -58.191257477 -58.004547119
4608.105 -48.871490478 -48.653892517
4651.171 -48.092037201 -47.792499542
4694.238 -52.042461395 -51.760643005
4737.304 -51.762626648 -51.406414032
4780.371 -54.298633575 -54.056976318
4823.437 -60.807037353 -60.538116455
4866.503 -61.409168243 -61.173660278
4909.57 -62.205207825 -62.051353455
4952.636 -62.001873016 -61.872138977
4995.703 -65.138023376 -64.995956421
5038.769 -72.231742859 -72.225883484
5081.835 -67.504898071 -67.55405426
5124.902 -73.968772888 -73.952316284
5167.968 -71.758766174 -71.619697571
5211.035 -70.60420227 -70.508232117
5254.101 -68.777107239 -68.699707031
5297.167 -67.522224426 -67.507225037
5340.234 -70.70124054 -70.485855103
5383.3 -71.185523987 -71.13886261
5426.367 -70.434829712 -70.283470154
5469.433 -74.550346374 -74.318984985
5512.5 -77.60735321 -77.285888672
5555.566 -76.886787415 -76.640144348
5598.632 -71.029655457 -70.880424499
5641.699 -70.669395447 -70.650741577
5684.765 -75.345695496 -75.368652344
5727.832 -72.899688721 -72.495193481
5770.898 -71.431900024 -71.020095825
5813.964 -74.353065491 -73.941879272
5857.031 -77.614898682 -76.535881042
5900.097 -76.79813385 -75.980949402
5943.164 -71.939170837 -71.627983093
5986.23 -73.262573242 -73.002441406
6029.296 -77.456619263 -77.849159241
6072.363 -75.249259949 -75.064979553
6115.429 -76.332550049 -75.624633789
6158.496 -75.533073425 -74.783462524
6201.562 -73.098556519 -72.943901062
6244.628 -73.626205444 -73.47694397
6287.695 -74.772315979 -74.269439697
6330.761 -75.998497009 -76.138542175
6373.828 -75.954780579 -75.660057068
6416.894 -78.153106689 -77.432746887
6459.96 -77.318443298 -76.342254639
6503.027 -75.808540344 -75.611679077
6546.093 -73.232757568 -73.036460876
6589.16 -71.015144348 -70.856575012
6632.226 -73.567276001 -73.160400391
6675.292 -76.316963196 -75.634414673
6718.359 -77.795318603 -76.569381714
6761.425 -78.69883728 -76.893745422
6804.492 -82.768157959 -80.432640076
6847.558 -83.15789032 -81.448806763
6890.625 -79.236190796 -79.088142395
6933.691 -75.954139709 -75.839942932
6976.757 -77.429069519 -77.279823303
7019.824 -81.989089966 -80.636520386
7062.89 -75.35785675 -74.668754578
7105.957 -76.976577759 -76.26839447
7149.023 -79.301673889 -79.34979248
7192.089 -81.054855347 -80.503311157
7235.156 -85.386573791 -85.070854187
7278.222 -79.549064636 -79.539955139
7321.289 -78.693717957 -78.510116577
7364.355 -75.109451294 -74.358146667
7407.421 -73.913513184 -73.507972717
7450.488 -79.022201538 -78.243240356
7493.554 -83.233459473 -82.753356934
7536.621 -81.498947144 -81.443710327
7579.687 -81.487991333 -81.468086243
7622.753 -80.210578918 -80.116096497
7665.82 -78.913848877 -79.102142334
7708.886 -73.339263916 -73.406524658
7751.953 -71.567001343 -71.560218811
7795.019 -75.968917847 -76.090660095
7838.085 -71.227180481 -71.384635925
7881.152 -73.385879517 -73.470115662
7924.218 -79.06855011 -79.133544922
7967.285 -77.644332886 -77.311416626
8010.351 -79.826377869 -79.636665344
8053.417 -75.837966919 -75.700042725
8096.484 -75.726089478 -75.698310852
8139.55 -80.17011261 -79.66305542
8182.617 -81.106239319 -81.044891357
8225.683 -80.127502441 -80.266746521
8268.75 -79.965263367 -79.889328003
8311.816 -79.870185852 -79.950531006
8354.882 -82.546722412 -82.035957336
8397.949 -80.959159851 -81.080162048
8441.015 -81.276008606 -81.195503235
8484.082 -81.3126297 -81.420761108
8527.148 -84.912017822 -85.501441956
8570.214 -80.721809387 -79.99772644
8613.281 -79.644973755 -78.954864502
8656.347 -82.070266724 -81.740097046
8699.414 -81.996818542 -81.572731018
8742.48 -83.492500305 -82.963043213
8785.546 -87.718406677 -88.028915405
8828.613 -91.007347107 -90.2420578
8871.679 -86.660240173 -86.181747436
8914.746 -80.421478271 -79.507164001
8957.812 -83.599342346 -82.655548096
9000.878 -81.478416443 -81.341636658
9043.945 -82.09249115 -82.544273376
9087.011 -81.86302948 -81.632667541
9130.078 -79.06603241 -78.396247864
9173.144 -81.73223114 -81.862449646
9216.21 -83.015579224 -82.665214539
9259.277 -81.606262207 -80.946525574
9302.343 -82.735031128 -82.481994629
9345.41 -79.359535217 -79.296691894
9388.476 -80.421043396 -80.438560486
9431.542 -77.38735199 -77.222969055
9474.609 -76.267112732 -76.107177734
9517.675 -79.287780762 -79.333839416
9560.742 -85.963134766 -86.212989807
9603.808 -89.416374207 -89.544471741
9646.875 -91.555130005 -91.02607727
9689.941 -93.239341736 -91.68611145
9733.007 -93.917671204 -93.400054932
9776.074 -93.849952698 -94.308670044
9819.14 -92.301055908 -91.635375977
9862.207 -90.744567871 -90.404655457
9905.273 -85.895530701 -86.153541565
9948.339 -86.283813477 -86.307388306
9991.406 -92.523765564 -92.972679138
10034.472 -98.915306091 -101.039543152
10077.539 -102.10660553 -101.521263123
10120.605 -104.645095825 -104.818145752
10163.671 -106.168807983 -101.833854675
10206.738 -104.422531128 -101.630378723
10249.804 -102.979484558 -103.697029114
10292.871 -99.274337769 -103.039321899
10335.937 -98.521652222 -103.055671692
10379.003 -104.316986084 -102.45892334
10422.07 -100.037902832 -99.896980286
10465.136 -99.82169342 -103.486587524
10508.203 -106.447181702 -100.605644226
10551.269 -105.910324097 -105.601348877
10594.335 -99.886177063 -99.560127258
10637.402 -101.27696991 -97.380973816
10680.468 -101.070396423 -98.237251282
10723.535 -100.937271118 -97.565498352
10766.601 -98.912986755 -99.731796265
10809.667 -95.054580688 -95.290489197
10852.734 -96.982467651 -93.728675842
10895.8 -96.730567932 -95.593254089
10938.867 -100.032501221 -101.196769714
10981.933 -106.240859985 -101.661300659
 

Back to the FAQ of ABK