File mp3 wave

File mp3 wave

Mp3 Informations About Us Links Downloads Contact Us Terms of use SiteMap
File mp3 wave
File mp3 wave

 

You are here: Mp3 Informations >>File mp3 wave

File mp3 wave article lists.

File mp3 wave

Making waves: Get up close and personal with sound-file formats - Square One




Everyone who works with digital audio soon encounters a wide variety of sound-file formats: WAV, AIFF, SND, Sound Designer I and II, and MP3, to name just a few. In most cases, the different formats present few problems. Software simply opens, plays, edits, and saves the audio files, sparing you from knowing the details of exactly how each format is constructed. But how does a program know what type of data the file contains? And what exactly is in an audio file?

A digital sound file is basically a long list of numbers representing the momentary values of an analog waveform measured (sampled) at a periodic rate. A file containing just those numbers is called a raw-data sound file. Usually, a lot more information must be embedded in a file for it to be read and played back properly. Aside from the sampling rate, the necessary information includes the resolution (which is the number of binary digits, or bits, that represent each sample). Other information indicates whether the file is monaural or stereo and whether the file creator has included looping information and cue points, a title, the name of the engineer or composer, a copyright notice, or other similar text.

That kind of information is included in a header, typically found at the beginning of a file. Different types of files have headers that are configured in distinct ways. (A mw-data sound file is also known as a headerless file.) For an application to read or write sound in a particular format, it must understand how the data is organized in that format.

PLAYING DIGITAL RIFFS

As an example, here's a close look at the familiar WAV sound-file format. A WAV file is a type of Resource Interchange File Format (RIFF) file, a format developed by Microsoft and IBM for multimedia files. (The familiar AVI video format is another type of RIFF file.) WAV files have been in use since Windows 3.1 and so are very widespread.

A WAV file is divided into sections, or chunks, that contain certain prescribed information. It's a more flexible arrangement than having just a single header. At the beginning of the file, a RIFF chunk defines the data as a WAV file and also reports its total length. Embedded within the RIFF chunk are two other chunks: a format chunk with information about sampling rate, resolution, number of channels, type of coding, and so on; and a data chunk, in which the actual sample values are stored.

To examine the format, I created a simple WAV file with my audio editor. The file contains a single cycle of a mono 2,205 Hz sine wave, synthesized at a 44,100 Hz sampling rate with 16-bit resolution. After saving the file, I displayed the data in the standard binary file-viewing format shown in Fig. 1. (There are many binary file-viewing utilities, including one called debug that is part of DOS. For the display in Fig. 1. I used Helios Software Solutions' TextPad, which lets you view files in many formats, including binary.) Color coding is added to differentiate each chunk.

GOOD TO THE LAST BYTE

Notice in Fig. 1 that the RIFF-chunk header information is found in the first 12 bytes of the file (highlighted in pink). Every pair of numbers represents a unique byte; in the table "Interpretation of Data in a WAV File," a space between each byte shows how the data is organized. You can see the meaning of each byte in the table. Note also that the file data is in hexadecimal (hex) format. (If you're not familiar with hex, see the sidebar, "All About Numbering Systems.")

The first four bytes in the file (the hexadecimal numbers 52, 49, 46, and 46) represent the ASCII characters for the acronym "RIFF," which denotes the format type. (ASCII characters are numbers that represent letters of the alphabet. See the Value column at the far right of the table.) The next four bytes (4E 00 00 00) indicate the total number of bytes of data in the file after the first eight bytes of the header. This four-byte integer is in a format called little-endian, which means that the least significant bytes come first when the computer lists them byte by byte. That takes some getting used to, because the string of bytes actually appears in the opposite order than you'd expect. In other words, the four bytes, 4E 00 00 00, signify the hexadecimal number 0x0000004E, which can be shortened to 4E or 0x4E. (The 0x prefix is often used to indicate that the number is in hexadecimal format.)

(The term little-endian in computer lingo is taken from Jonathan Swift's Guliver's Travels. At one point in the story, the Lilliputians are divided into two warring political camps: the Little-Endians, who believe you should first crack a soft-boiled egg on the little end; and the Big-Endians, who believe the opposite. The computer term big-endian, as you would guess, means numbers are listed with the most significant digits first.)

The next four bytes (57 41 56 45) are the ASCII characters "WAVE"; they tell any application reading the file that this is WAV-audio format and not one of the other possible RIFF multimedia file types.

The next 24 bytes of data in Fig. 1 (shown in blue) represent the format chunk, where several of the file's important characteristics are coded. This segment begins with the bytes 66 6D 74 20. The first three bytes of this string are the ASCII symbols for "fmt," and the "20" indicates a space, which just fills out this segment so that it takes up a full four bytes. The next four bytes (10 00 00 00) indicate the length of the format chunk. That value is hex 0x 10, or decimal 16. The table "Format-Chunk Data" shows how the format data is arranged. As before, the second column shows the exact sequence of numbers in hex as they appear in the file.

Notice that the Type of Coding is PCM (Pulse Code Modulation). PCM is a common uncompressed-audio data format. Other possibilities for coding include [micro]-law pronounced mu-law, designated by the number 0x0101) and a-law (0x0102). Both are methods of scaling the sample data to try to minimize the audible quantization noise. (Quantization noise is a rounding error that occurs when you translate analog audio information into the more limited realm of digital numbers. If you use large enough digital data words, the quantization noise can be made so small that it does not cause audible problems.)

Another coding technique you may encounter is ADPCM (Adaptive Delta Pulse Code Modulation), which is designated by the number 0x0103. Interested programmers can find the exact formulas for those coding techniques on the Internet. (I'll deal only with uncoded PCM data here.)

The format chunk also indicates that the number of channels is 1 (monaural). The sampling rate is coded as 44 AC 00 00, or 0xAC44 (44,100 in decimal). The next four bytes (88 58 01 00; or 0x15888 in hex and 88,200 in decimal) define the number of bytes per second. This value is two times the sampling rate (44,100), because each sample contains two bytes of data. Next is the number of bytes per sample: 02 00, or 0x2 (2 in decimal). Finally, 10 00, or 0x10 (16 in decimal), shows The number of bits in each sample.

The decimal numbers in the "Amplitude Values for a Sine Wave" table are two's complement numbers in the range -32,768 to 32,767. Two's complement is a way of representing both positive and negative numbers. If you look at the graph in Fig. 2. you can easily see how these numbers trace the shape of the sine wave.

The data chunk (highlighted in yellow) follows the format chunk and is announced in Fig. 1 by the ASCII characters for the word data (64 61 74 61). The next four bytes, 2A 00 00 00, or 0x2A, indicate that the chunk length is 42 bytes. The table "Amplitude Values for a Sine Wave" lists the remaining 21, 16-bit integers (stored in little-endian format) and their decimal values. These are the bytes that represent the actual amplitude values for the sine wave.

Several additional chunks are optional in a WAV file. They are a fact chunk, used to store information about the file contents; a cue chunk, for indicating cue or marker points; a playlist chunk, to establish play order of cue points and looping information; and an associated-data-list chunk for attaching annotations to parts of the sample data. The RIFE format also supports an info chunk where you can place a title, copyright notice, creation date, and other similar text information.

SOMETHING SIMILAR

File mp3 wave Related Links
Conversion file mp3 waveConvert file m4a mp3
File mp3 xFile making mp3
File mp3 playAudio convert file media mp3 window
Audio converting file mp3Convert file free mp3 wav
File joy mp3 odeConvert file free mp3 wma
File mp3 splittingConverting file file mp3 wav
File karaoke mp3File mp3 structure
Converting file midi mp3Downloadable file free mp3
Downloadable file mp3Change file mp3 wma
Cda converting file mp3File free mp3 wav
Cd file mp3Convert file mp3 ogg
Change file mp3 wavConverting file file mp3 wma
Editing file mp3Converting file mp3 wave
Ed2k file mp3File fix mp3
Convert file mp3 player realFile gratis mp3
File mp3 repairFile mp3 sharing software
Converter file free mp3 wmaConverter file mp3 wave
File hatfield juliana mp3Download game mp3 music video
Cheyenne music download mp3 spanishAnime download mp3 music
Chinese download mp3 musicDownload mp3 music raghav
Best download mp3 musicDownload e mp3 music song track z
Download mp3 mp3 musicDownload inuyasha mp3 music
Dj download heaven mp3 music sammy yanouDownload house mp3 music
Download mp3 music rockDance download mp3 music
Arabian download mp3 music rockDownload mp3 music unlimited
 
©2005 All Rights Reserved   Mp3 Informations