home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-Update.iso / CDROM / Contents / READMEs / Peanuts-3 / Audio / converter / mac2snd.README < prev    next >
Encoding:
Text File  |  1996-11-09  |  2.1 KB  |  38 lines

  1. mac2snd
  2. =======
  3.  
  4. ConvertHere's a quick little hack that takes Mac 8-bit digitized sound
  5. files, and converts them to NeXT 16-bit sound files.Usage:
  6. convert [-22] filename    The program takes a Mac sound file
  7. "filename" as input, and outputs a NeXT sound file "filename.snd" as
  8. output.    Mac Sound Files:I don't know much about these files, I just
  9. got my hands on a bunch of them and tried to convert them.  I don't
  10. know what "official type" they are or anything.They seem to be a
  11. series of 8-bit samples, with no header.  The sample speed doesn't
  12. seem to be included in the file either (so you have to guess).  The
  13. most common speed seems to be 11 kHz sampling, so that is the default
  14. of my program.  If that seems to slow, you can redo it with the '-22'
  15. switch, which translates the file as a 22 kHz sample.The samples seem
  16. to be 0x80 based.  Everything about 0x80 is a positive level, and
  17. everything below 0x80 is negative.NeXT sound files:I don't know much
  18. about these files either (I couldn't find them in the docs).  These
  19. guy do have a header.  Much of my info is guessed by looking at other
  20. files.  All header values are 4 byte integers.1Magic Value =
  21. 0x2E736E642Offset to start of sound (all offsets are from begining of
  22. file)3Offset to end of sound (this value is not used by the NeXT
  23. librarys (?).  SoundPlayer and SoundEditor both work  without this
  24. value, so I set it to 1+[offset to start])4?? - set it to 3  (Sound
  25. file type?)5Sampling frequency (1F4C = 8 kHz, 5622 = 22 kHz, ?? =
  26. 44)6set it to 1 (this could be the stereo flag.  I don't think the Mac
  27. sounds are in stereo)7-8space-filler?  (the NeXT has it so I do
  28. too!)The NeXT sounds are a 16-bit two's complement number.    As you
  29. can tell, I don't have complete info about these formats, but enough
  30. for the conversion.  If you have more info, please send it to me.USE
  31. THIS PROGRAM AT YOUR OWN RISK.  I'm not responsible for any damage to
  32. your computer in any way.  (My speaker didn't blow out!)  Since
  33. there's no header on the Mac files, my program cannot tell if it is
  34. really sound or not.  It will convert any file to the NeXT sound file
  35. format.Please send me bug reports, or suggestions.
  36.  
  37. Robert Hoodhoodr@csus.edu
  38.