Mechanical Music Digest  Archives
You Are Not Logged In Login/Get New Account
Please Log In. Accounts are free!
Logged In users are granted additional features including a more current version of the Archives and a simplified process for submitting articles.
Home Archives Calendar Gallery Store Links Info

End-of-Year Fundraising Drive In Progress. Please visit our home page to see this and other announcements: https://www.mmdigest.com     Thank you. --Jody

MMD > Archives > September 2002 > 2002.09.02 > 10Prev  Next


Audio-to-MIDI Conversion
By Julie Porter

[ Jeffrey Borinsky wrote in 020829 MMD about the
 [ Discrete Cosine Transform (DCT):

> The set of coefficients generated by a DCT can be transformed back
> exactly to the original, subject only to normal rounding errors.

I intentionally left the details of the DCT out so as to not overwhelm
most of the MMD readers.  The point being that the rounding errors do
change the value a bit and render the compression [by DCT] useless
for text.

Basically I was referring to the class of functions that translate
between space and time.  The functions themselves do not loose the
data -- the data is lost in the translation to sampled elements.
The important thing to understand is phase relation.  Only when the
phase is recorded can the complete signal be re-constructed.

> The rest is rather technical and computer based.

Something that is not often considered is that 16 bits can represent
65536 integers.  When used to store floating point numbers, there are
also only 65536 floating point numbers as well.  In other words, floating
point numbers on a computer are not continuous in the fractions.  Most
computers store 32 bits of data, which is quite a lot of floating point
number.  However there is not an infinite number of fractions between
the whole numbers as there is in the real world.  Only bases [modulo
number systems] such as 12, 24, 60 give quarters and fractions as even
divisions with no remainders.

96 is often used in MIDI tempo calculations as it is derived from the
above base groups.  This allows for many different tempos to be set into
the MIDI file.  The real magic number is 768; I will leave it as an
exercise for the reader to see why it often appears in MIDI headers of
conversions from rolls to playable MIDI files.

Julie Porter

 [ The Fourier Transform has been around for more than 100 years and
 [ it is the inspiration for most computer data compression methods.
 [ JPEG (*.jpg) image compression is a fine example: it reduces a
 [ huge image file to a reasonable file size that is still pleasant
 [ to view.  Another example is MPEG (*.mp3) audio compression.  But
 [ JPEG and MPEG compression are lossy, which means that the full
 [ detail of the original data file cannot be recovered.  Engineers
 [ who develop computer algorithms of this sort are careful to test
 [ the effect of math rounding errors like Jeffrey and Julie mention.
 [ Compression of text files ("zipped files") is by algorithms which
 [ find and encode repeated patterns and reproduce them accurately.
 [ -- Robbie


(Message sent Mon 2 Sep 2002, 04:36:53 GMT, from time zone GMT-0400.)

Key Words in Subject:  Audio-to-MIDI, Conversion

Home    Archives    Calendar    Gallery    Store    Links    Info   


Enter text below to search the MMD Website with Google



CONTACT FORM: Click HERE to write to the editor, or to post a message about Mechanical Musical Instruments to the MMD

Unless otherwise noted, all opinions are those of the individual authors and may not represent those of the editors. Compilation copyright 1995-2024 by Jody Kravitz.

Please read our Republication Policy before copying information from or creating links to this web site.

Click HERE to contact the webmaster regarding problems with the website.

Please support publication of the MMD by donating online

Please Support Publication of the MMD with your Generous Donation

Pay via PayPal

No PayPal account required

                                     
Translate This Page