Play Random Sounds for E-Mail Notifications?
An anonymous reader asks: "I, like many of my fellow Outlook-using geek friends, like to set funny sounds to be played when a new message arrives ('Leeroy Jenkins' is the one I have set now). However, we have always wanted to be able to have random sounds be played when a new message arrives, rather than the same sound over and over. I've searched high and low, and I was hoping Slashdot could suggest/write a program that can randomly play sound files from a specified folder when a new message arrives. Any ideas?"
Is this what Ask Slashdot has boiled down to - asking about playing random sounds when email arrives? There's gotta be better material to pick from than this.
If you use OS X and Mail.app, it's easy. Turn off the new mail notification in preferences, and add a rule that executes an applescript. Have the applescript choose a random sound somewhere and play it.
If there are no programs to do this already how about a program that renames teh files in a folder to a specified name randomly ? then you set outlook to what ever name you have set. Unless of course outlook caches the sound.
http://Lenny.com
set windows to play a sound eg. c:\sounds\newmail.wav and then have a folder with a number of wave files in it eg. c:\sounds\collection and schedule tasks to copy sounds to c:\sounds\newmail.wav every X minutes/seconds/whatever ?
pretty clunky but relatively simple for the average bear
-- If I were a fish, I'd be wet
Use a seperate new e-mail notification program (that plays random sounds) in parallel to outlook.
Or write a script that occasionally copies a random WAV to notify.wav (which is what outlook plays).
BTW, the place to start looking for outlook info is the excellent slipstick.com
~~~~~ BigLig2? You mean there's another one of me?
Just write an AppleScript, it'll take like 10 seconds... You do mean the Mac version of Outlook, right?
(Make help to actually give us some useful information in your post. What OS? That would be a good start.)
Comment of the year
I feel so sorry for this guy's coworkers.
are you asking about outlook on slashdot?
go use thunderbird.
no sh*t.
This is what passes for "News for Nerds"???
This, and 6 month old dupes of 25-yr old "How computers work" books???
Really, it pisses me off to think that probably a few dozen members got their (far more interesting) stories rejected to make room for this sh*t.
Watch the Teaser Trailer for "The Lightning Thief" Her
also, it's farking stupid. the point of a new mail sound (or any event sound) is to have a sound that you know means new mail. if you've got apps making random sounds, how are you meant to know what's going on. :p
probably why no mail app has such a feature.
oh sorry, it would be "entertaining"
This is my Sig, this is my Gun. One is for Slashdot and one is for Fun.
I like! In fact, I like it so much, I think I'll assign random sounds to ALL system events!
[click][click][clickity][click]
Done!
SPROING!!!
Oh! I've got an email! Um...no, wait - what was that? Maybe an instant message...nope. Oh no! It's an illegal oper@*^!>$?%_)#&=
assert(birth_date<time-86400)
check_every X seconds has mailfile changed if so play wavefile[$randomnumber].
This has got to be a 5 line script in any language of choice.
I sure hope you don't work in my cube-farm, jerkass.
And turn off your "Wanksta" ringtone, too.
I thought I had seen it all but, this is BY FAR the lamest Ask Slashdot I have ever seen. The Article needs to be moderated -5 Banal.
How to rotate notification sounds? In Microsoft Outlook?? On Slashdot????
Dear Slashdot, how can I cause this person to receive a severe electric shock everytime a new message arrives in his Outlook inbox?
That's right. Far more interesting stories were undoubtedly rejected.
Hope you're listening Taco, time for some fresh blood, editorial-wise.
"Eve of Destruction", it's not just for old hippies anymore...
I know it's been said before, and I've certainly thought it before, but this really is the shark-jumping moment for Slashdot.
d00dz, h0w can eye get outlook to play random soundz?!?!?
Next on Slashdot: revolutionise your computing experience by installing the Plus! pack! Discover the wonders of the Intarweb with Microsoft Explorer 97!
#!/usr/bin/perl
$ DESTFILE="/tmp/sound.wav";) || die "Can't open $SOUNDDIR: $!\n"; /\.wav$/) {
$SOUNDDIR="/usr/share/sounds";
opendir(DIR,$SOUNDDIR
$count=0;
while(defined($file = readdir(DIR))) {
if($file =~
$files[$count]=$file;
$count++;
}
}
$arraysize=@files;
while(1) {
$rnd=int(rand($arraysize));
$filename=$files[$rnd];
`cp $SOUNDDIR/$filename $DESTFILE`;
sleep 10;
}
Mangle appropriately (source dir, sleep time, dest file, file-type).
Have fun.
Red.
Outlook-using geek
That's it. Turn in your fucking geek card. Now. There's the door. Get going and don't ever come back here.
Do already have the sounds lined up? Lots of Locutus quotes, Ballmer's "Developers^3" quote, a few Brain "Take over the World" quotes, and you should be perfectly prepared.
Don't blame Durga. I voted for Centauri.
Write a script that gets triggered by file access events for the wave file Outlook is looking at. Every time that event happens, have it wait fifteen seconds, then overwrite the file with a randomly-selected one from a directory tree that contains wav files.
Bonus points for having it read the config information out of the registry and/or an ini file.
"...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
Without trying to disrespect the submitter, I can't believe this is a Ask Slashdot topic. Certainly this would have been better answered on a Windows related forum.
just go read boing boing. they have dupes there too but nothing like this place. and this site is CmdrTaco's freaking JOB. Not to mention that OSTG/OSDN/VALinux/VA/Whatever paid CT over $3mil for slashdot. for 3mil and a salary you'd think they can do better. but they don't.
http://boingboing.net/
#!/bin/sh
# updates the sound list
path=$1
find $path -name "*.[Oo][Oo][Gg]" -print > soundlist.txt
find $path -name "*.[Mm][Pp][3]" -print >> soundlist.txt
find $path -name "*.[Ww][Aa][Vv]" -print >> soundlist.txt
find $path -name "*.[Ff][Ll][Aa][Cc]" -print >> soundlist.txt
find $path -name "*.[Aa][Ii][Ff][Ff]" -print >> soundlist.txt
#!/bin/sh
# play random file from filelist
filelist=$1
len=`wc -l $filelist`
n=`expr $RANDOM % $len`
play `sed -n ${n}p $filelist`
Why is it that Entourage's IMAP implementation is so much better than the one in Outlook and Outlook Express? The win32 software doesn't store sent mail on the IMAP server, do not properly IDLE, and do not have server-side IMAP searching,
I confess to being a bit of an IMAP snob: I used PINE and Mulberry until Thunderbird became "good enough" and I switched because of the preferable license. But I am not usually one to bash MS products, even if I choose not to use them.
But REALLY! How screwed up is development over in Redmond that they got it right on the Mac & got it wrong on their own OS?
Be glad to help - just give me your e-mail address and I'll send you over an executable. I'll even be so nice as to include an MD5 hash so you know its secure.
from Claria. Nothing makes a Windows PC do random shit faster.
I still have more fans than freaks. WTF is wrong with you people?
sounds to me like you know him/her ...
-- If I were a fish, I'd be wet
In Outlook, press ALT-F11
Write your macro that plays your sound file.
Go to your Rules & Alerts
Create a rule for receiving emails - to play your Macro.
Bonus point.
Make your macro play a random sound.
I think the whole effort should take about 5 minutes.
This is better than the Ask Slashdot I submitted, where I wanted to find out a way for thunderbird to play a random sound every time my RSS feed picks up a new Slashdot story.
I settled for comic book guy saying "Worst. Slashdot. Story. EVER."
Surprisingly its true every time!
Leeroy Jenkins?
You play way too much of WOW. I knew it about myself and my friend when I picked up work-related e-mail in Ironforge.
I'm too embarrassed to post this under my Slashdot account. I only use Outlook at work and only because I'm given no other options.
You can try Switcheroo It was designed Windows 95 and NT. I had it working for a while under XP, but something happened that made it stop working. I haven't had time to investigate. Use at your own risk!
How screwed up is development over in Redmond that they got it right on the Mac & got it wrong on their own OS?
Dunno, but they did the same thing with Internet Explorer - Internet Explorer for the Mac was the first web browser with reasonably complete support for CSS 1, and it also handles the PNG alpha channel just fine. Meanwhile, five years later, the latest version of Internet Explorer for Windows still can't handle the PNG alpha channel, despite the specification being nine years old.
It must be something specific to the Mac though - their other platform development is as miserable as their Windows development. Witness the abomination of Internet Explorer for UNIX or the dire Frontpage extensions for Apache.
1. Write a simple application/script that plays a random sound file
- Read directory and store files in a list/array
- Use a random function to pick a wav file
- Load and play the selected audio file
2. Disable e-mail sound notifications (Tools->Options->Email options->Advanced email options->uncheck 'play a sound'
3. Set up a rule for incoming email: (Tools->Rules wizard->New.
Start from a blank rule. Check messages when they arrive (next).
(Next) and confirm to apply to all rules.
Check 'start application'. Click the underlined 'application'. Choose your custom app (open).
(next)(next).
Name the rule 'sound script'
(finish)(ok).
To prevent your script from playing sounds for every email received, put a delay counter on it to prevent multiple instances of the same application, or some form of lock preventing concurrent running.
Not necessarily so.
Imagine different pools of sound files. For example, one pool could be Futurama quotes. The other could be excerpts from Monty Python.
Why you get new mail, it grabs a 'random' Futurama wav. When you have a new IM message, it grabs a 'random' Monty Python wav.
As long as you have two brain cells to rub together, you can figure out that 'Bite my shiny metal ass' is new mail, while 'Ni!' is a new IM message.
Wait, so now fark has become so popular it's turning into an everyday word?
09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
One way is to use VBA. I don't have much experience with it. All I've ever done is make a quick thing that would page me when the 15-minute notification for meetings came up. If you go to Tools -> Macros -> Visual Basic Editor, the help file in that is very useful, specifically the information on the NewMail event. It won't explain exactly how to do it (and I don't know enougrh to explain how here), but it should go a long way to helping out.
I believe, but cannot cite sources to back it up, that the Mac Applicaiton development department is separate from the Windows Application developtment department. I seem to recall that they are housed in separate cites as well (perhaps Cupertino for the Mac wing).
They may start with a similar code base, but they tend to diverge as each department tweaks the software to fit the guidlines of the target OS, and consumer demands for the apps.
This also explains why the Mac Apps are about a quarter of a cycle behind on releases, as they may wait for an alpha Windows code base and work from there.
As to the 'support' for important softwares that are not MS-sanctioned (i.e., UNIX and Apache), I imagine that it's more of a thow-away effort designed to just get people to use the MS software (think: gateway drug). Imagine an MS marketer saying, "You think it's great now, but upgrade to Windows, and see how great it really is."
I'm the project manager for an Oracle data warehouse.
OK, so far so good.
Our two largest databases are around 90GB and 120GB
That's a data outhouse, not a data warehouse. Last data warehouse that I saw was 16 Terabytes, and I'm sure that's puny compared to many others' experience.
Anyway, your Ask Slashdot isn't much better than the original, because 1) you've asked a very standard machine sizing question, and there are many hungry and qualified consultants out there in need of a job, so hire one of them; and 2) the size of the database and a general description of a query isn't sufficient to determine much about your problem.
Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
A former colleage is working on Office for Mac...in Redmond. I haven't asked him about how removed he is from the win32 developers.
It is fine if codebases diverge, but it would be nice if the positive improvements on one platform would eventually be back-ported to the other. I don't see that happening. Seems like such a waste.
If Entourage+IE on Mac are better for the reasons cited in this thread, I guess you believe that Mac consumers have stronger demands for apps that comply to standards?
Since my new mail sound is currently a Klingon yellow alert, each email could be a hit on the shields, which slowly regenerate. Too much email in a short period would start a warp-core breach warning followed a huge explosion. Real fans could install an explosive charge in their keyboard just the real Enterprise.
One line blog. I hear that they're called Twitters now.
Ah, Poly MacBeep
You always were so much fun
Windows needs you now
I see some practical difficulties with this proposition.
The database I'm working with is very intricate relationships. Each record is on average less than 300 characters in 3-7 columns. So if you consider that there are 90-120GB for the two largest databases you can get an idea of how many records we're storing in database.
I agree with your point that I asked for sizing information. Although I'm actually more interested in what factors to consider for an I/O bound database system.
I can't find good consultants. The ones that HR sends me list 4-5 years oracle experience, but don't have a clue of what an explain plan is. Or their idea of a large database system is a system with 25 tables and a *huge* table of 500K records. So I'm hoping to hear from people that have already been down this path. I wish the company would spend more money for talent, but money only goes to crises not to proactive activities.
just play a file called "email_sound.wav", then have a cron job symbolically link a random sound to it every minute.
I used to have alert sounds on my email system, but it got really tedious, because I get lots of mail and most of it can wait, while some of it is important enough that I must look at it there and then (think important clients, not so important clients) - every time the alert went off, I'd have to stop what I was doing, go to the mail software, check to see what the message was and if it was important enough to deal with there and then.
:)
:) Strangely enough I find I often sort of half-wake up in time to hear the subject being read to me even in the middle of the night (perhaps the hard drive churning before as fest starts up etc wakes me slightly).
;)
So anyway I had a bit of a brainwave one day - I hooked up festival (the voice synthesis software) to Evolution (my preferred mail client) and now instead of non-informational alert sounds I have festival read out-loud the sender and subject.
It's probably the best thing since sliced bread as far as I'm concerned (I've had it like this for, umm, about a year I guess, and it's still very cool). Now when an email comes in I don't have to stop what I'm doing, I know if it's important enough to go look at because my PC tells me
Even better..like all good geeks I have my PC running 24/7 a couple of meters from my bed (and like all good geeks I'm the only one in my bed), so no more do I have to get up and go see what the email was if I'm in bed
Most useful thing... ever. Perhaps I should patent it
NZ Electronics Enthusiasts: Check out my Trade Me Listings
Step 1 - Lower your macro security.
/.
Step 2 - Close Outlook and restart Outlook.
Step 3 - Open up the Visual Basic editor.
Step 4 - Add this in the code session of "ThisOutLookSession".
Step 5 - Reformat the thing. I spent more time trying get it through the Slashdot filters than writing it.
Private Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, ByVal dwFlags As Long) As Long Function GetAllFilesInDir(ByVal strDirPath As String) As Variant ' Loop through the directory specified in strDirPath and save each ' file name in an array, then return that array to the calling ' procedure. ' Return False if strDirPath is not a valid directory. Dim strTempName As String Dim varFiles() As Variant Dim lngFileCount As Long On Error GoTo GetAllFiles_Err ' Make sure that strDirPath ends with a "\" character. If Right$(strDirPath, 1) "\" Then strDirPath = strDirPath & "\" End If ' Make sure strDirPath is a directory. If GetAttr(strDirPath) = vbDirectory Then strTempName = Dir(strDirPath, vbDirectory) Do Until Len(strTempName) = 0 ' Exclude ".", "..". If (strTempName ".") And (strTempName "..") Then ' Make sure we do not have a sub-directory name. If (GetAttr(strDirPath & strTempName) _ And vbDirectory) vbDirectory Then ' Increase the size of the array ' to accommodate the found filename ' and add the filename to the array. ReDim Preserve varFiles(lngFileCount) varFiles(lngFileCount) = strTempName lngFileCount = lngFileCount + 1 End If End If ' Use the Dir function to find the next filename. strTempName = Dir() Loop ' Return the array of found files. GetAllFilesInDir = varFiles End If GetAllFiles_End: Exit Function GetAllFiles_Err: GetAllFilesInDir = False Resume GetAllFiles_End End Function Private Sub Application_NewMail() Const SND_SYNC = &H0 Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 Dim varFileArray As Variant Dim lngI As Long Dim strDirName As String Const NO_FILES_IN_DIR As Long = 9 Const INVALID_DIR As Long = 13 On Error GoTo Test_Err strDirName = "C:\windows\media" varFileArray = GetAllFilesInDir(strDirName) For lngI = 0 To UBound(varFileArray) Debug.Print varFileArray(lngI) Next lngI lngI = Math.Round(Math.Rnd() * UBound(varFileArray)) WAVFile = "C:\windows\media\" & varFileArray(lngI) Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME) Test_Err: Select Case Err.Number Case NO_FILES_IN_DIR MsgBox "The directory named '" & strDirName _ & "' contains no files." Case INVALID_DIR MsgBox "'" & strDirName & "' is not a valid directory." Case 0 Case Else MsgBox "Error #" & Err.Number & " - " & Err.Description End Select End Sub
Step 6 - Ignore all replies to this post. They are all the same Microsoft bashing crap you've already read 1000 times on
Step 7 - If you think this is some kind of virus learn to code and then you can check it yourself.
Step 8 - Fix the API call. It is too slow.
Outlook? Man, if that's the best geek friends you can find, I'm sorry for you.
If Windows supports named pipes you can do something like this: http://www.unix.org.ua/orelly/perl/cookbook/ch16_2 3.htm where instead of calling fortune you open a random wave file.
Just create a named pipe connected to an app that spits out a random wave file on access.
Oh, right, you can't do that and use Outlook at the same time.
[ approaching AI ]
Outlook-using geek friends
Huh?
Got time? Spend some of it coding or testing
You should ask one of your friends who is good with computers to help you set up something.
Trees can't go dancing
So do them a big favor
Pretend dancing stinks!
0. save all user data from computer
1. install Mandrake Linux or similar over the top of Outlook and MS-Windows
2. restore user data
3. configure KMail or Evolution to play random sounds
4. problem solved. forever.
Got time? Spend some of it coding or testing
...ramming the disk heads into the spindle and frying first the monitor and then the video card?
My goodness, some people have selective memories!
Got time? Spend some of it coding or testing
I admit it, it was me.
I thought that Slasdot worked differently to other websites: we the readers submit stories to this web log and people read and comment on them. In this case, this story will have comments meaningful to it, and people will make helpful suggestions.
Low quality of stories is your fault as much as mine.
Enlarge your penis. Please your woman all night long.
Get Viagra and Cialis for up to 75% off!!
Just the sort of thing I want Festival reading out loud in the office or reading to me while I am asleep.
It's rather simple. Simple create a named pipe and refer to that pipe as the WAV file in Outlook. Write a short bash script (or similar) that will simply cat a randomly chosen WAV file when that named pipe is opened and read from. That's it -- you're done! Don't you just love Open Source software?
Oh, wait, Outlook runs on Windows, doesn't it? Nevermind then...
Notwithstanding how pointless and utterly weightless this question is, if you had put more thought into the solution than asking the question, you'd already have solved the problem.
:O
Use mailsound.wav as your mail sound. Write a script or batch file to randomly rename one of your source wav files to this same name. Schedule the script to run every 30s or whatever interval.
Geez.... and I wasted more time answering than the question is worth.
My (Thunderbird) New Mail sound is the "You've got mail! It's not spam!" soundbite ;-)
I suffer from attention surplus disorder.
I teach Oracle(TM) and I don't know what an explain plan is. 25 tables and 500k records per table is large.
It sounds like you need to rework your structure to be simpler.
DB 101-- There are always at least 100 different ways to normalize your database... 50 of them are WRONG.
Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
So how's this for a deal:
I'll piss off to where I want to go, and you guys can stay right here in the best goddamn country in the whole wide world, mmkay?
btw: real appropriate username you two have got...do your SUVs with the "USA ribbons" on it have tinted glass too? We know you're on your cell phones anyway, by the way you ride the center line....
You're prolly the ones trying to change your outlook sounds lol
All you need is lurv.
Make a folder of the sounds you want.
Copy one of them and name it "sound.wav" or somesuch.
Make a Scheduled Task that runs every minute.
When "sound.wav"'s Last Accessed time is within the minute, have it randomly select a new sound and overwrite "sound.wav".
That what was all this school was for... to teach us how to solve our own problems. -- janeowit
Simple solution:
Write a windows service that watches the directory with the sound file (.wav, etc...) in it.
Every time the file is accessed, have the service copy a random file from another sound directory over top of that file.
This can be done very easily in c# or vb.net... code samples available online.
Just an idea.
Heh, that was my first thought as well.
the random sound playing is meant to drown out the farts.
For DB 101 that's true. But when you work on real databases where you have over 100 table with the small ones being 10 Million records you then learn the art of databases. There are times you need to denormalize part of the ER design (logical layer) or partition the largest tables/indexes and move things around the physical layer. The GP was asking the right questions.
Those ways that are wrong on a small database are even more wrong on a large one. YES, some of the right ways are wrong on a large scale too.
Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
Ooo I say something that someone doesn't agree with and it's flamebait? I thought nerds were supposed to be intelligent. Why didn't anyone else who said the same goddamn thing I did get modded "flamebait"? Because I hurt someone's feelings? Grow up, for crissakes, or I'll stuff you into your locker....
All you need is lurv.
...is typical of some DOS viruses.
Holy shit. A useful answer. This actually works.
fark was a word before the site.