[comp.sys.apple2] Sounds

UCI137@URIACC.BITNET (Andy Kress) (04/13/90)

      I know...this has been talked about for days but wouldn't you know
 it, I deleted all my old notes.  What are the bytes that have to be
 changed in a MAC sound to $00 on a GS?  I wouldnt have to ask this if I kept
 the old notes.  The reason I want it is so I can have a friend write me
 a C program on the Mac to change the bytes back and forth.  Thanks much all.


                                Andy

UCI137 at URIACC

cyliao@eng.umd.edu (Chun-Yao Liao) (04/13/90)

In article <9004121755.AA26040@apple.com> UCI137@URIACC.BITNET (Andy Kress) writes:
>
>      I know...this has been talked about for days but wouldn't you know
> it, I deleted all my old notes.  What are the bytes that have to be
> changed in a MAC sound to $00 on a GS?  I wouldnt have to ask this if I kept
> the old notes.  The reason I want it is so I can have a friend write me
> a C program on the Mac to change the bytes back and forth.  Thanks much all.

	I checked in my file, the value is $80. Might someone else confirm
	this value for the entire net? Thanx.


--
cyliao@wam.umd.edu     		o NeXT :  I put main frame power on two chips.
      @epsl.umd.edu		o people: We put main flame power on two guys.
      @bagend.eng.umd.edu       o ::::::::::::::::::::::::::::::::::::::::::::
 xxxxx@xxxxx.xxx.xxx (reserved)	o RC + Apple // + Classic Music + NeXT = cyliao

toddpw@tybalt.caltech.edu (Todd P. Whitesel) (04/13/90)

UCI137@URIACC.BITNET (Andy Kress) writes:

>      I know...this has been talked about for days but wouldn't you know
> it, I deleted all my old notes.  What are the bytes that have to be
> changed in a MAC sound to $00 on a GS?  I wouldnt have to ask this if I kept
> the old notes.  The reason I want it is so I can have a friend write me
> a C program on the Mac to change the bytes back and forth.  Thanks much all.

The whole brouhaha about this stems from the fact that the GS sound chip
uses a $00 byte to indicate END OF SAMPLE so that you don't need to tell
the DOC exactly how long the sound is, you just hand it a buffer and it
plays the C string (heh) it finds there.

Mac and GS sounds both use (for the raw format, at least) unsigned byte
values for each sample, which get sent straight to a DAC (there is volume
processing but the effect is the same). The only difference is that one
end of the scale ($00) is used as a stop byte by the GS sound chip, so all
you have to do is take the Mac sound file and change every $00 to $01.
The change is not audible as far as sound quality goes.

Why bother with a C program on the Mac? You can write a BASIC/ML hack on the
GS to do this MUCH faster. Assuming you don't mind entering a few filenames,
that is.

If you'd like such a program (or how about one that goes from AIFF sound to
GS binary?) let me know, and I will write one. I have been meaning to anyway,
I have gobs of AIFF files I never bothered to convert them over, as I had a
cheap hacked routine to play them out the 8 bit DAC of my Apple Cat.

Todd Whitesel
toddpw @ tybalt.caltech.edu