🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.multimedia
4 messages
4 total messages Started by Sue Raisty Wed, 08 Apr 1992 18:59
MS WAVE file format
#267
Author: Sue Raisty
Date: Wed, 08 Apr 1992 18:59
69 lines
2988 bytes
Hello.  I don't usually read netnews, but I need your help.
I have a few questions about WAVE file format.  I have been referencing
the  _Microsoft Windows Multimedia Programmer's Reference_ for information on 
the format.  To my untrained eye it does not seem like the format described in 
the book matches the format of the WAVE files that came with the Windows 3.1
beta release that I have.  I looked at ding.wav, chord.wav, chime.wav, and
tada.wav.

The book says (on Pg. 8-40)
<WAVE-form>  ->  RIFF(  'WAVE'			//Form type
			<fmt-ck>		// Waveform format
			<data-ck> )		// Waveform data

<fmt-ck>  -> 	fmt(	<wave-format>		// WaveFormat Structure
			<format-specific>	// Dependent on format category

<wave-format> -> struct {WORD formatTag;		// Format Category
			 WORD nChannels;		// No. channels
			 DWORD nSamplesPerSec;   // Sampling Rate
			 DWORD nAvgBytesPerSec;  // For buffering
			 WORD  nBlockAlign;}	// Block alignments

<PCM-format-specific> ->  struct {WORD   nBitsPerSample;}  //Sample Size

<data-ck> -> data( <wave-data> )
----------------
Below I have the translations of the binary wave files into ascii. 

ding
52 49 46 46 			RIFF
46 2D 0 0 
57 41 56 45 			WAVE
66 6D 74 			fmt
20 10 0 0 0 1 0 1 0 22 56 0
0 22 56 0 0 1 0 8 0 
64 61 74 61 			data
22 2D 0 0 
80 80 80 80 80 80 80 80 80....

chimes
52 49 46 46 			RIFF
28 3E 0 0 
57 41 56 45 			WAVE
66 6D 74 			fmt
20 10 0 0 0 1 0 1 0 22 56 0 0 22 56 0 0 1 0 8 0 
64 61 74 61 			data
4 3E 0 0 
80 80 80 80 80 80 80 80 80 80........

----
As you can see, I found where the text is that says RIFF, WAVE, fmt, etc...
But I am a bit confused because I can't find the parantheses, etc...
Also, what is the Word that is in-between the RIFF and WAVE text?  It is
not specified in the book... It was different in all the files I checked.
There also seem to be more bytes in the fmt-ck than I think there should 
be.  By my count, there should be 16 bytes (7 words in the wave-fromat and
1 word in the format-specific), but you can see that there are 21.  I guess
that some of the extra bytes must be leading and trailing characters, but 
I can't guess where.  I am also a bit confused about the bytes right after
the text "data".  What are they, what do they do, how long are they, etc...

I would really appreciate it if anyone could explain this differences to me
or send me any current and more detailed information on the WAVE file format.  
Since I rarely, if ever, read news, please send email to me personally...

Thanks muchly,
Sue Raisty
raisty@berlioz.nsc.com
Re: MS WAVE file format
#288
Author: Lance Norskog
Date: Fri, 10 Apr 1992 03:40
56 lines
2274 bytes
This is in response to Sue Raisty's posting about .WAV files.
  
  The book says (on Pg. 8-40)
  <WAVE-form>  ->  RIFF(  'WAVE'			//Form type
  			<fmt-ck>		// Waveform format
  			<data-ck> )		// Waveform data
  
  <fmt-ck>  -> 	fmt(	<wave-format>		// WaveFormat Structure
  			<format-specific>	// Dependent on format category
  
  <wave-format> -> struct {WORD formatTag;		// Format Category
  			 WORD nChannels;		// No. channels
  			 DWORD nSamplesPerSec;   // Sampling Rate
  			 DWORD nAvgBytesPerSec;  // For buffering
  			 WORD  nBlockAlign;}	// Block alignments
  
  <PCM-format-specific> ->  struct {WORD   nBitsPerSample;}  //Sample Size
  
  <data-ck> -> data( <wave-data> )
  ----------------

Guess: Parenthesis in the above grammar means "new block",
which gets its own 4-byte length field.

  ding
  52 49 46 46 			RIFF
  46 2D 0 0 			11590 bytes long
  57 41 56 45 			WAVE
  66 6D 74 20			fmt <space>
  10 0 0 0 			16 bytes long
  1 0 				format type #1
  1 0 				1 channel (mono)
  22 56 0 0 			8790 samples
  22 56 0 0 			8790 bytes/sec on average
  1 0 				1 block align ???
		note that we have now used up our 16 bytes for the 'fmt '
  8 0 				8 bits per sample
  64 61 74 61 			data
  22 2D 0 0 			8749 bytes long
  80 80 80 80 80 80....		dead time.  Since it's 128,
				that means these are unsigned bytes.
				This may be what 'format type #1' means.
  
Look at the rest of the file and count out the bytes.
I'm sure you'll find that they agree with the two section
length fields at the beginning.

This seems to be compatible with Electronic Arts' IFF format.

Lance Norskog
-- 
----------------Lance Norskog---------------
  ((lambda (lambda) `(,lambda ',lambda)) 
   '(lambda (lambda) `(,lambda ',lambda)))
Ah don't know, Jim, Ah thank it's some kahnd of vahrus.
Re: MS WAVE file format
#291
Author: Peter Haller
Date: Fri, 10 Apr 1992 13:53
36 lines
1707 bytes
In a previous article, thinman@netcom.com (Lance Norskog) says:

>
>Guess: Parenthesis in the above grammar means "new block",
>which gets its own 4-byte length field.
>
>  ding
>  52 49 46 46 			RIFF
>  46 2D 0 0 			11590 bytes long
>  57 41 56 45 			WAVE
>  66 6D 74 20			fmt <space>
>  10 0 0 0 			16 bytes long
>  1 0 				format type #1
>  1 0 				1 channel (mono)
Sorry, you got these two wrong. This is 0x005622L
which reps 22.05 khz sampling rate.
>  22 56 0 0 			8790 samples
>  22 56 0 0 			8790 bytes/sec on average
>  1 0 				1 block align ???
>		note that we have now used up our 16 bytes for the 'fmt '
>  8 0 				8 bits per sample
>  64 61 74 61 			data
>  22 2D 0 0 			8749 bytes long
>  80 80 80 80 80 80....		dead time.  Since it's 128,
>				that means these are unsigned bytes.
>				This may be what 'format type #1' means.
>  


PCH
-- 
Peter C. Haller				|	'If you do what you 
Imagination Processing Systems		|	have always done,
aa596@cleveland.Freenet.Edu 		|	expect what you have
"Are we having fun yet?"		|	always recieved.'
Re: MS WAVE file format
#304
Author: Russell Williams
Date: Sat, 11 Apr 1992 22:22
25 lines
1616 bytes
In article <7nsj0za.thinman@netcom.com>, thinman@netcom.com (Lance Norskog) writes:
|   The book says (on Pg. 8-40)
|   <WAVE-form>  ->  RIFF(  'WAVE'			//Form type
|   			<fmt-ck>		// Waveform format
|   			<data-ck> )		// Waveform data
|   <fmt-ck>  -> 	fmt(	<wave-format>		// WaveFormat Structure
|   			<format-specific>	// Dependent on format category

| Guess: Parenthesis in the above grammar means "new block",
| which gets its own 4-byte length field.

| Look at the rest of the file and count out the bytes.
| I'm sure you'll find that they agree with the two section
| length fields at the beginning.
| 
| This seems to be compatible with Electronic Arts' IFF format.

This is correct, RIFF was modelled after the IFF format.  The blocks are
called "chunks".  Any software reading the WAVE format should (to remain
upward compatible with future iterations) skip chunk ID's that it
doesn't recognize, made easy by having the length of the chunk following
the tag.  Don't just assume that chunks will appear only in the specified
sequence.

-Russell Williams
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads