[comp.sys.ibm.pc.hardware] Mixing Soundblaster recordings

tjw@unix.cis.pitt.edu (TJ Wood WA3VQJ) (09/02/90)

I've done some experimenting with mixing the VOC files that can be
generated from VREC.EXE.  By mixing, I mean taking 2 VOC files and
"adding" them to create a new VOC file.

Since the first 1A (hex) bytes of the file is a header, I just copy
this header from one of the input files straight to the output file.
Then I copy the next six bytes which is yet another header, but this
one describes a "voice block" thusly:

		location   description
		01         Binary code 01 - (mean "New Voice Block")
                02 - 04    Block Length
		05         Sample rate (where SR = 256-1000000/Sampling rate)
		06	   Pack (0=8bits,1=4bits,2=2.5bits,3=2bits)

From there, I just begin adding the to files together and dividing the
result by two. ( New sound byte = (Sound1byte + Sound2byte)/2 )

I'm going to try taking each value and divide it by 2 before adding it,
though, to avoid an overflow condition. 
( New sound byte = (Sound1byte/2) + (Sound2byte/2) )


The stuff I've mixed doesn't sound perfect, so maybe I'm doing something
wrong, but it's fun to experiment.  I only try to mix files that I've
generated, since the ones that come with the VOXKIT may be compressed.
(The PACK byte may not be 00).  Obviously, this could be checked before
"mixing".

However, let me caution you:  don't use earphones or turn your volume up
very high when experimenting like this!  You could blow your speakers
and/or ears out!  One programming mistake and you've got random noise,
some of it is very loud!

Terry
-- 
INTERNET: tjw@unix.cis.pitt.edu  BITNET: TJW@PITTVMS  CC-NET: 33802::tjw
UUCP: {decwrl!decvax!idis, allegra, bellcore}!pitt!unix.cis.pitt.edu!tjw
 And if dreams could come true, I'd still be there with you,
 On the banks of cold waters at the close of the day. - Craig Johnson