[comp.sys.ibm.pc.hardware] Sound Blaster .VOC file format

galt@baby.dsd.es.com (Greg Alt - Perp) (03/07/91)

I have figured out most of the .VOC format, and here it is:
=============================================================
 

HEADER: (bytes 00-19)
=======
     byte #           Description
     ------           -----------
     00-12            Creative Voice File
     13-15            1A 1A 00  (eof to abort printing of file)
     16-17            Version number             (VOC-HDR puts 0A 01)
     18-19            2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)
 
DATA: (bytes 1A+)    A series of data blocks terminated by 00
=====
 
   Data Block:  TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)
   -----------
 
      TYPE   Description   Size (3-byte int)   info
      ----   -----------   -----------------   ----
      01     Sound data    2+length of data    *
      02     ????
      03     Silence       3                   *
      04     Marker        2                   marker #
      05     ????
      06     Repeat        2                   # of repetitions
      07     End repeat    0
      08+    ????
 
*Sound info format:         *Silence info format:
 -----------------           --------------------
 00   Sample rate            00-01  Length of silence (weird encryption)
 01   Compression type       02     38
 02+  Data
 
 
Sample rate       -- SR byte = 256-(1000000/sample_rate)
Length of silence -- (# of .1 seconds encrypted)
Compression type  -- 8-bits    = 0
                     4-bits    = 1
                     2.5-bits  = 2
                     2-bits    = 3
                     Multi DAC = 3+(# of channels)
 
Silence encoding in VOXKIT finds quiet places in file, and creates a separate
block that is of type Silence.



The only remaining mysteries are what types 2&5&8+ are if they exist, and the
exact conversion of the silence length integer to seconds.  If you have any
more information, please email me at:   galt@dsd.es.com
I hope this info will help to create more  public domain utilities for the
soundblaster.
           Greg

mir@opera.chorus.fr (Adam Mirowski) (03/07/91)

In article <1991Mar7.000702.3989@dsd.es.com>, galt@baby.dsd.es.com (Greg Alt - Perp) writes:
%% I have figured out most of the .VOC format, and here it is:
%% HEADER: (bytes 00-19)
%%      byte #           Description
%%      ------           -----------
%%      00-12            Creative Voice File
%%      13-15            1A 1A 00  (eof to abort printing of file)

I have seen on sequent.mcs.kent.edu the source of a simple player,
which seems to be part of the SB development kit. The word at offset
14 is the offset fron file beginning to the first data block, that
you have to pass to the resident driver playing routine. Here it is
1a 00, and as you can see, the first block begins at 1a offset :-)

%% DATA: (bytes 1A+)    A series of data blocks terminated by 00
%% [...]
%% Sample rate       -- SR byte = 256-(1000000/sample_rate)

Brilliant! How did you obtain this?
-- 
Adam Mirowski,  mir@chorus.fr (FRANCE),  tel. +33 (1) 30-64-82-00 or 74
Chorus systemes, 6, av.Gustave Eiffel, 78182 Saint-Quentin-en-Yvelines CEDEX

ong@d.cs.okstate.edu (ONG ENG TENG) (03/08/91)

From article <1991Mar7.000702.3989@dsd.es.com>, by galt@baby.dsd.es.com (Greg Alt - Perp):
> I have figured out most of the .VOC format, and here it is:
> =============================================================

Isn't the .VOC format available inside the Sound Blaster User Manual?
Or is it not available in version 1.5 manual?