[comp.sys.mac] SoundWave and the new 'snd ' resources

jmunkki@santra.UUCP (Juri Antti Munkki) (09/14/87)

About two weeks ago I decided to write a Soundwave custom routine
that would save files in apple's 'snd ' format. I already had written
a program that converted soundwave files into 'snd ' resources of the
"System Beep"-type.

I don't know what all the values in the header mean, since the current
Inside Mac V doesn't provide all the information. It was relatively
easy to find the length fields from them and to make my program append
the sound data to a template with the correct length changed.

To make the routine more general, all sizes (32-bit values) are marked
as SIZ$xx, where $xx is the number to be subtracted from the size. In
fact, HyperCard sounds have the size field in three places. System sounds
only have one size field. New sound templates can be made by pasting
the header (with SIZes indicated) into Soundwave and adding a button
for the type. Button 2 is "bong" 2001, Button 3 is "bong" 2002 etc.

Since the program is short (under 3K), I'm posting it binhexed right here.
I hope this does not irritate anyone. (I know you're not supposed to post
programs here.)

The source code is available if you want it. Just mail me information on
how to post Macintosh software on the net and you just might get some
other nice utilities too... (I've read the instruction on posting to a
binary group, but forgotten where the instructions were...)

BTW my version of SoundWave 1.0 doesn't work with the my Mac II unless you
make a small patch. Just search for 00DFF1FF and change it to 00000138.
It's not a very neat patch, but the program now works and doesn't crash
at all. You can now stop digitizing with any ADB-event. I don't know if the
program works with a regural mac after the patch...

	Juri Munkki
	Helsinki University of Technology
	jmunkki@santra.uucp

(This file must be converted with BinHex 4.0)

:#8*[EQFJFhGMD3!rN!J!N!J+h3(,!*!%!3#3!`T'!!!*4J#3!jF!N!-#"e*PFd9
NDA3#!*!$39"36&*6483K!3&J!NJ!!!P#EfjR,Q0[C'8#!*!$2j!)!*!-2j!)!*!
BRA$TM`#3"JVG!*!%%`#3"!)08Q9c4@4TG#j6Bh*KF!)!N"8%BJ#3$L0D!!!N!*e
`jMUGF1C@!*!L-+-!#3#3%JF+B!i!!(0hBfN(d3#3"N(krqiKb!R1B!!"d%j@rT4
#E[kB@BqT*#"I,8Mrr#"Zrr`LE[rm)#N!V*!!U!#S,8$qU!bZ!!!"rrkSE`!"P&Q
25(PLEfjR-#i!#!C!"p!r!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