[comp.sys.atari.st.tech] spl or snd file format

rossj@cognos.UUCP (Ross Judson) (10/16/90)

Does anyone know the format of .spl or .snd files?  I am attempting to
create samples in files, which I can play back with David Bagget's
play.ttp.  

My first guess was that the files are simply 8 bit data.  The sounds I
get out aren't very good though, so I'm wondering if there's more to
the format than I know.

Thanks...

P.S. If anybody has a routine they'd like to send me or point me to,
I'd really appreciate it.  This is for a school project on signal
processing.  I'd just like to be able to hear my processed signals on
the ST, where I'll be doing most of my coding.
-- 
Ross Judson ++ uunet!mitel!cunews!cognos!rossj + hunger is the fuel of greed
Cognos Inc. ++ rossj@cognos.uucp               + enough is less than you need

dmb@wam.umd.edu (David M. Baggett) (10/17/90)

In article <8928@cognos.UUCP> rossj@cognos.UUCP (Ross Judson) writes:
>Does anyone know the format of .spl or .snd files?  I am attempting to
>create samples in files, which I can play back with David Bagget's
>play.ttp.  

An excellent choice of software!  :-)

>My first guess was that the files are simply 8 bit data.  The sounds I
>get out aren't very good though, so I'm wondering if there's more to
>the format than I know.

The samples are 8-bit data, with no header and no tailer information.
The crucial point is that the samples are "8-bit unsigned" samples,
which means that the values correspond to voltages from 0 to +5  (so
I'm told).  A value of 0 means 0V, while a value of 255 theoretically
corresponds to +5V.

This is _quite_ different from the "competing" format, 8-bit signed,
wherein each sample is taken to be a signed voltage from -2.5V to
+2.5V.  To convert from unsigned to signed format you simply have to
subtract 128 from each sample.  To go the other way, you add.  (Sounds
simple, but try to figure it out by looking at the data files!)

Incidentally, the Hippo digitizer uses signed samples.  The "standard"
ST format is 8-bit unsigned.

To convert between them, get a copy of "convert.arc" from
atari.archive.umich.edu:/atari/newitems/  
The program hippo2st.ttp will convert 8bit signed to 8bit unsigned.
(Guess what st2hippo.ttp does....)

Dave Baggett
dmb%wam.umd.edu@uunet.uu.net

entropy@mole.ai.mit.edu (Nick Castellano) (10/17/90)

In article <1990Oct16.213405.23309@wam.umd.edu> dmb@wam.umd.edu (David M. Baggett) writes:
   +2.5V.  To convert from unsigned to signed format you simply have to
   subtract 128 from each sample.  To go the other way, you add.  (Sounds
   simple, but try to figure it out by looking at the data files!)

   Incidentally, the Hippo digitizer uses signed samples.  The "standard"
   ST format is 8-bit unsigned.

   To convert between them, get a copy of "convert.arc" from
   atari.archive.umich.edu:/atari/newitems/  
   The program hippo2st.ttp will convert 8bit signed to 8bit unsigned.
   (Guess what st2hippo.ttp does....)

Why are 2 programs needed?  Isn't adding/subtracting 128 the same
thing, modulo 256?  They should both equate to XOR 128, no?

nick


--
  | | |   ncastellano@{eagle.wesleyan.edu, wesleyan.bitnet}
  | | |   entropy@ai.mit.edu
 /  |  \  Sinkhole!dEADHEAd[@mast.citadel.moundst.mn.org] (call 203-873-8518)
/   |   \ snikt!entropy

scott@tab00.larc.nasa.gov (Scott Yelich) (10/18/90)

>Does anyone know the format of .spl or .snd files?  I am attempting to
>create samples in files, which I can play back with David Bagget's
>play.ttp.  

Speaking of digistuf...
whenver I used beep.prg or click.prg I get an error that says:
Apparently *.inf is empty.

I followed the instructions, I put click,prg in my c:\auto and
click.inf in c:\ but it still gives the error.  This happens with no
matter what I put in the *.inf file and no matter how I start the
program (auto, gulam, same dir / different dir)


--
Signature follows. [Skip now]

 -----------------------------------------------------------------------------
 Scott D. Yelich                         scott@[xanth.]cs.odu.edu [128.82.8.1]
 After he pushed me off the cliff, he asked me, as I fell, ``Why'd you jump?''
 Administrator of:    Game-Design requests to <game-design-request@cs.odu.edu>
 ODU/UNIX/BSD/X/C/ROOT/XANTH/CS/VSVN/
 -----------------------------------------------------------------------------