🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #19734

'snd ' resources

#19734
From: jmunkki
Date: Sat, 03 Oct 1987 09:43
106 lines
6931 bytes
Some of you were left quite puzzled after my previous posting of the 'snd '
resource generating custom soundwave routine (I call it simply "bong").

I'm now posting a new version that saves Hypercard and system beep type sounds
at both 11 and 22 Khz. To make these sounds you need Soundwave, ResEdit and
BinHex 4.0 or later. First download this article. Edit it so that only the part
after "(This file must be converted with BinHex 4.0)" is left. BinHex it. You
should now have a file called bong.code. IT IS NOT AN APPLICATION. A Soundwave
swci is similar to a HyperCard xcmd or xfcn in that it is not a stand-alone
application and must rely on the support of the host application.

Soundwave automatically recognizes "swci" resources pasted into it. Start
ResEdit and open bong.code. Select all the resources by shift or cmd-selecting
them and choose copy. The clipboard now contains all the resouces. Open
Soundwave with ResEdit. Choose "Paste" and then Quit from ResEdit. (Answer yes
to save changes if all went ok) Remember to do this on a copy of soundwave.

To use "bong", launch Soundwave and digitize or load a sound. Select the part of
it you want to use and choose "Bong" from the "Custom" menu. Select the format
you want to use (the sampling rate should match the rate of the 'snd ' type or
the sound will sound funny). You should now see the standard file dialog. Type
in the name of the sound and choose a folder. If the file already exists and
you click yes when asked if you want to replace the file, the file will NOT
be first deleted, but the new resource will be appended to it (this is sometimes
quite useful). The dialog will also contain many extra buttons inherited
from soundwave (the have no function in Bong). The new 'snd ' resource never
replaces an existing resource and it originally has the same name as the file
it is written to.

If you created a new file, use ResEdit to copy and paste the resource into the
correct file. System beeps must go into the system file and HyperCard sounds
should be either in the stack (recommended for final applications) or HyperCard
(recommended for debugging).

I hope I didn't forget anything this time.

Juri Munkki
jmunkki@santra.hut.fi
Helsinki University of Technology Computing Centre

Disclaimer: The opinions stated here might not represent the opinions of anyone
	    else and I might change my mind later...for now just believe me.

Disclaimer: The code in the posted program does not represent my average
	    programming style since it was only written as a quick hack and it
	    surprisingly worked with no debugging at all.

(This file must be converted with BinHex 4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F#!a-8YSHLJ!N!8S!6!!3!(3""&6HA0dC@d
J3Q9PF#!b-NYSHJ#3"NJ"-!"J!G!%$dKjF'9b3f&bC#!a-8YSHJ#3"QJ"-!#!!G#
%$dKjF'9b3f&bC#!b-NYSHQm!N!8)!!J!'!%JL"Y$Eh"jFQPRD(3JU6%j1$FJ5R9
bD5"0G@jVDfP0!*!&)!!)!$!"))JM8'pbG'P[ER-JN!1T-6Ni0b"8D'PZDb"8C@0
SEQpXEfGTCA0X!*!&8!!)!(!"))K#9'KTFb"MGA0dEfdJFQpeG'PZC5"cBACPFb"
dD'8JFf9XC@0dD@pZ)'&c)'%J*h0ZC#!R)(*PFfpeFQ0P)'CTE'8Z!*!&L!!)!+J
"))JR8f9ZC#"MEfeYC@jdFb"dEcSJDQeeEQYVD8"cB@jdFQ%ZD(9d,QCT2!!!!3#
3!`TL!!!*BJ#3!k-!$qL3!!,b!*!$(!#5!!0cGf0T!*!$)N&-8P3!N!-Z4%P86!#
3!cTLEfjR!!-!4JI4!!!J!*!%%&8X"p%!"3!!"ai!%&6`"p%!#`!!"qS!%&8)"p6
rr`!!"bi!%&8`"p(rr`!!"ei!%&8d"p2rr`!!"i`!%&8i"p,rr`!!"l`!%&8m"%*
[EQF&3QpZCfm&3QpZCfmGLJ:
Technical Details
Message-ID: <7735@santra.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!ukma!uunet!mcvax!enea!tut!santra!jmunkki

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!ukma!uunet!mcvax!enea!tut!santra!jmunkki
From: jmunkki@santra.UUCP
Newsgroups: comp.sys.mac
Subject: 'snd ' resources
Message-ID: <7735@santra.UUCP>
Date: Sat, 3-Oct-87 05:43:29 EDT
Article-I.D.: santra.7735
Posted: Sat Oct  3 05:43:29 1987
Date-Received: Sun, 4-Oct-87 07:43:53 EDT
Organization: Helsinki University of Technology, Finland
Lines: 106
Keywords: sound, beep, bong, soundwave