[comp.sys.mac.programmer] Add a sound to 'opening a folder' ?

smaass@all41.csc.ti.com (12/21/89)

I am looking for a way to attach sounds to opening a folder.

A friend suggested that I look at Soundmaster. Although there are many neat
things that can be done with Soundmaster, I don't see that it will do what I am
looking for.

Is it possible to do this? Does anybody have solution?

Sue Maass
(214) 517-6252
"smaass@crdecf.csc.ti.com@dasnet"

6500stom@hub.UUCP (12/22/89)

From article <175@all41.csc.ti.com>, by smaass@all41.csc.ti.com:
> I am looking for a way to attach sounds to opening a folder.

The ability to attach sounds to such Finder actions is already built
into Finder 6.0.4 as a hidden feature. It is rumored that a file called
Finder Sounds, much like AppleLink Sounds, when thrown in the Sys
Folder will produce nifty sounds in the Finder.

I hope this feature becomes "blessed" and will be kept in Sys 7.0.

/            Josh Pritikin             T Ignorance is bliss.           \
| Internet:  6500stom@ucsbuxa.ucsb.edu | I must be in hell.            |
| AppleLink: Josh.P                    | My room is proof that entropi |
\ GEnie:     J.Pritikin                ! exists.                       /

billkatt@mondo.engin.umich.edu (billkatt) (12/23/89)

In article <3393@hub.UUCP> 6500stom@hub.UUCP writes:
>From article <175@all41.csc.ti.com>, by smaass@all41.csc.ti.com:
>> I am looking for a way to attach sounds to opening a folder.
>
>The ability to attach sounds to such Finder actions is already built
>into Finder 6.0.4 as a hidden feature. It is rumored that a file called
>Finder Sounds, much like AppleLink Sounds, when thrown in the Sys
>Folder will produce nifty sounds in the Finder.
>
I have the Finder Sounds file from the Sonic Finder (6.1.02?) and they don't
do anything to Finder 6.1.  If you have the file in the system folder, it
will open it, and keep it open, but it doesn't play anything out of it.
-Steve

6500stom@hub.UUCP (12/24/89)

From article <1989Dec22.211334.6560@caen.engin.umich.edu>, by billkatt@mondo.engin.umich.edu (billkatt):
> In article <3393@hub.UUCP> 6500stom@hub.UUCP writes:
>>The ability to attach sounds to such Finder actions is already built
>>into Finder 6.0.4 as a hidden feature. It is rumored that a file called
>>[etc]
> I have the Finder Sounds file from the Sonic Finder (6.1.02?) and they don't
> do anything to Finder 6.1.  If you have the file in the system folder, it
> will open it, and keep it open, but it doesn't play anything out of it.

I guess I ment the Finder that comes with System 6.0.4. The actual
version number of the Finder that comes with Sys 6.0.4 is 6.1.4. That
Finder does like Finder Sounds.

/            Josh Pritikin             T Ignorance is bliss.           \
| Internet:  6500stom@ucsbuxa.ucsb.edu | I must be in hell.            |
| AppleLink: Josh.P                    | My room is proof that entropi |
\ GEnie:     J.Pritikin                ! exists.                       /

tim@hoptoad.uucp (Tim Maroney) (12/24/89)

In article <175@all41.csc.ti.com> smaass@all41.csc.ti.com writes:
>I am looking for a way to attach sounds to opening a folder.
>
>A friend suggested that I look at Soundmaster. Although there are many neat
>things that can be done with Soundmaster, I don't see that it will do what I am
>looking for.
>
>Is it possible to do this? Does anybody have solution?

Do you mean in the Finder or in Standard File?  A fairly
straightforward trap patch should do it in either case.

In the Finder, the opening of a folder causes a NewWindow call.  You
can check to see if your patch to the NewWindow trap (installed at INIT
time) runs under the Finder by comparing the strings at $2e0
(FinderName) and $910 (CurApName) are the same.  If not, jump to the
old address.  If they are the same, then you should check that the
defProc is 0; if not, jump to the old address.  If the defProc is
eight, you may assume that a folder was opened; play the sound.  Then
jump to the old address.  (This will still work even if Finder starts
calling GetNewWindow -- GNW goes through NewWindow.)

(It's possible someone else will do a NewWindow with type 8 under the
Finder; if so, you will play your sound, but the world will not end.
This would likely be a desk accessory; I've checked all the standard
DAs in 6.0 and they all use 0.  Variation code 8 indicates a zoom box,
which is unlikely to be used by a desk accessory.)

In Standard File, you have to be a little more subtle.  You can tell
when a new folder is opened by patching the generic Standard File
Package trap.  As described in IM v4, the fake item number 103 is
passed when a new folder is opened.  So your patch is a front-end to
Standard File, accepting SFGetFile, SFPGetFile, SFPutFile, and
SFPPutFile traps, saving their item filter procedures if any.  Then
call SFPGetFile or SFPPutFile, with your own item filter in place.
This can call the saved item filter procedure (if any; else default),
see if the item is still 103, and if so, play the sound.

It need not be a tail patch, since you don't need to keep control after
the trap -- you have already installed your filter, so you can just
replace the filter argument on the stack and jump to the old trap
address.  (However, this is one of those traps that it's pretty safe to
tail patch, since it almost always gets called only from user software,
not from the OS.)

Of course, both of them can only be done by a programmer.  I don't know
of any user-type solution, sorry.
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"Satanic is merely the name they give to the behavior of those who would
 disrupt the orderly way in which men want to live."
    -- Gabrielle, THE VAMPIRE LESTAT, Anne Rice

ma199at@sdcc6.ucsd.edu (L J Cris) (12/25/89)

This is a patch file called 'finder sounds'. It plays all kinds
of sounds at different actions times from within finder. 
EG trash, open folder, close folder, select item etc...
That would probably fill your needs.

The file is property of Apple. I don't know if there are any proper
means of getting a hold of it. And I doubt it would be posted by
anyone at apple (am I wrong? :-> how about Color Cutter too...)
Maybe it is free to public, I don't know.

Good luck,
Cris 

ma199at@sdcc6.ucsd.edu (L J Cris) (12/25/89)

In article <5818@sdcc6.ucsd.edu>, ma199at@sdcc6.ucsd.edu (L J Cris) writes:
> This is a patch file called 'finder sounds'. It plays all kinds...
was supposed to be:
> There is a patch file called 'finder sounds'. It plays all kinds...
  
sorry.....
-Cris

ari@eleazar.dartmouth.edu (Ari Halberstadt) (01/04/90)

In article <5818@sdcc6.ucsd.edu> ma199at@sdcc6.ucsd.edu (L J Cris) writes:
>This is a patch file called 'finder sounds'. It plays all kinds
>of sounds at different actions times from within finder. 
>EG trash, open folder, close folder, select item etc...
>That would probably fill your needs.

If I'm opening a folder on a remote file server, forcing the transmission
of the sound could make a slow network even slower. Hopefully someone at
Apple realized this.

--

Ari Halberstadt '91, "Long live succinct signatures"
ari@eleazar.dartmouth.edu	Disclaimer: "Live Free or Die"

levin@bbn.com (Joel B Levin) (01/05/90)

In article <18246@dartvax.Dartmouth.EDU> ari@eleazar.dartmouth.edu (Ari Halberstadt) writes:
|In article <5818@sdcc6.ucsd.edu> ma199at@sdcc6.ucsd.edu (L J Cris) writes:
|>This is a patch file called 'finder sounds'. It plays all kinds
|>of sounds at different actions times from within finder. 
|If I'm opening a folder on a remote file server, forcing the transmission
|of the sound could make a slow network even slower. Hopefully someone at
|Apple realized this.

But, but,... the sound would be with the local Finder, presumably (or
at least in the current System folder).  No network transmission implied.

	/JBL
=
Nets: levin@bbn.com  |  "There were sweetheart roses on Yancey Wilmerding's
 or {...}!bbn!levin  |  bureau that morning.  Wide-eyed and distraught, she
POTS: (617)873-3463  |  stood with all her faculties rooted to the floor."

tim@hoptoad.uucp (Tim Maroney) (01/06/90)

I don't mean to be a spoilsport, but I looked through every string
resource in Finder 6.1, and there's no string naming the file "Finder
sounds".  Where did people find out about this feature?  Does it
exist?  Considering that the Mac doesn't allow sound playing at the
same time as floppy disk access, I don't think this would be a very
useful feature.
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"Do what you wanna, do what you will;
 Just don't mess up your neighbor's thrill.
 And when you pay the bill, kindly leave a little tip
 To help the next poor sucker on his one-way trip."
    - Frank Zappa, "You Are What You Is"

erci18@castle.ed.ac.uk (A J Cunningham) (01/09/90)

	The file 'Finder Sounds' is part of the Sonic Finder written by
Bill Gaver (ex Apple, now Xerox). It does give audio feedback on
controls like scroll bars and actions like dragging icons and opening
folders. System release 6.0.4 has all the hooks for sonic finder in
place. (It's a long story. Apple didn't want to release Sonic Finder but
the wrong disks got set to be duplicated and by the time it was realised
it was too late.) If you have 6.0.4 all you need is the 'Finder Sounds'
file to make it work. If enough people ask Apple for it maybe they will
release it. I think this is what Bill is hoping for anyway.
		Tony
Disclaimer: I've never met Bill Gaver personally but I do have a friend
who works across the corridor from him.

-- 
Tony Cunningham, Edinburgh University Computing Service. erci18@castle.ed.ac.uk

	"If the thunder don't get ya then the lightnin' will."

kent@sunfs3.camex.uucp (Kent Borg) (01/17/90)

In article <1514@castle.ed.ac.uk> erci18@castle.ed.ac.uk (A J Cunningham) writes:
>	The file 'Finder Sounds' is part of the Sonic Finder written by
>Bill Gaver (ex Apple, now Xerox). It does give audio feedback ...
>System release 6.0.4 has all the hooks for sonic finder in
>place. ... If you have 6.0.4 all you need is the 'Finder Sounds'
>file to make it work. 

Could somebody who has a copy of "Finder Sounds" please post a
description?  (Mail me a copy???)  Is it possibly just a collection of
"snd " resources?  If so, could you tell us the numbers/names of the
sounds?  If the format is something else, please tell us what you can.
(If you know where we can get a real copy of "Finder Sounds", please
tell us.)

While you are at it, what does it sound like?  Are the sounds organic
things like a dragging sound when an icon is dragged, or are they the
bleeps and boops of a microwave oven or video game?

>If enough people ask Apple for it maybe they will release it. I think
>this is what Bill is hoping for anyway.

I would like to try it before I start telling Apple it is a good
thing.  Possible problem with releasing it: The Finder has been
rewritten for System 7.0.  Did Bill's work get brought over?

One more thing: Is the story about grabbing the wrong files and
releasing this be accident really true?  Any Apple folks allowed to
comment?  What other features did this put or not put into 6.0.4
Finder?

-- 
Kent Borg                lloyd!kent@husc6.harvard.edu  or  ...!husc6!lloyd!kent
MacNet: kentborg                              H:(617) 776-6899  W:(617)426-3577
"Thumper!  Don't let them kill Thumper!"  --Zippy, 15 January, 1990

erci18@castle.ed.ac.uk (A J Cunningham) (01/18/90)

In article <613@sunfs3.camex.uucp> kent@lloyd.UUCP (Kent Borg) writes:
>Could somebody who has a copy of "Finder Sounds" please post a
>description?  (Mail me a copy???)  Is it possibly just a collection of
>"snd " resources?  If so, could you tell us the numbers/names of the
>sounds?  If the format is something else, please tell us what you can.
>(If you know where we can get a real copy of "Finder Sounds", please
>tell us.)

	I'd don't have a copy (and if I did I wouldn't say so as it's
still officially Apple's ;-) I have however seen it when I've been in
EuroPARC. It's not a collection os snd's but a system file that works in
conjuction with the finder.



>While you are at it, what does it sound like?  Are the sounds organic
>things like a dragging sound when an icon is dragged, or are they the
>bleeps and boops of a microwave oven or video game?
>
	They are mostly organic sounds that Bill has sampled and added
into the user interface. I didn't get that good a look on my visit
though as I was only there for a short while.

>
>I would like to try it before I start telling Apple it is a good
>thing.  Possible problem with releasing it: The Finder has been
>rewritten for System 7.0.  Did Bill's work get brought over?

	I dunno. I'll ask Bill if I see him on my next visit to
Cambridge.



>One more thing: Is the story about grabbing the wrong files and
>releasing this be accident really true?  Any Apple folks allowed to
>comment?  What other features did this put or not put into 6.0.4
>Finder?

	Yup. Well Bill sez and why should I doubt him?

sorry
about 
all 
the
blank
lines
but 
we
have
a
scummy 
inews !
		Tony


-- 
Tony Cunningham, Edinburgh University Computing Service. erci18@castle.ed.ac.uk

	"If the thunder don't get ya then the lightnin' will."