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?"
Subject
Comment
(Use the Preview Button! Check those URLs!)
No Karma Bonus Post Anonymously
Allowed HTML <b> <i> <p> <br> <a> <ol> <ul> <li> <dl> <dt> <dd> <em> <strong> <tt> <blockquote> <div> <ecode>
URLs <URL:http://example.com/> will auto-link a URL
Important Stuff
# Please try to keep posts on topic.
# Try to reply to other people's comments instead of starting new threads.
# Read other people's messages before posting your own to avoid simply duplicating what has already been said.
# Use a clear subject that describes what your message is about.
# Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)
Problems regarding accounts or comment posting should be sent to CowboyNeal.
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.
This is just too much :)
This paid my last vacation, it mi
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.
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?
#!/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.
#!/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?
This is just a joke from an anonymous troll.
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!
Hello Everyone, I'm the project manager for an Oracle data warehouse. I'm currently trying to size two new database servers. I've seen some great analysis, suggestions, tips, rants and
similar questions. in previous articles and I was hoping to get some insight from the slashdot community. I have talked with our system admins but I disagree with their recommendations. They really don't have much insight into our processes since they only perform basic maintenance for the servers. We're currently using a few Dell 1650 dual-processor servers (P3 1.4Ghz, 4GB RAM, 700GB RAID5 PowerVault storage).
I'm trying to improve our batch processing times and for the most part we are I/O bound. Our two largest databases are around 90GB and 120GB stored in an Oracle 9i database and new versions are created 4 - 6 times a year. The schema is around 60 tables but with 10 large and frequently used tables. A typical query will scan through 100s of millions rows for a multi-table join. We typically only have 1-5 users on at the same time.
My requirements are:
- Dual or quad processor machine
- CPU speed. Whatever is currently "standard". We're not CPU bound. Although I keep wondering if there will be a benefit to using an 8MB vs. 1MB L2 cache processor
- Minimum of 4GB RAM - We have been unable to really take advantage of more RAM. We're using Win2K, Win2K3 and they seem limited to how much RAM can be used under oracle. Our DBA's ran this process on a 32GB server with 16 processors and there were negligible benefits.
- 1 TB diskspace from either a PowerVault or purchasing space on the local NAS
- Budget: 30K per server and storage
- Good maintenance contract. The current preferred suppliers are Dell and Sun but I might be able to get something different if I can justify it.
Performance is our critical concern; we can afford to lose the data since we can recreate it relatively quickly. So I'm thinking of just using a JBOD configuration. Some time ago I asked the sys admins to test a server with a NAS configured in a single LUN RAID5 configuration and a single LUN JBOD configuration. We saw no practical differences in performance; apparently the NAS had 12GB of cache so there was a minimal performance penalty for the RAID5 configuration.
So what factors do I need to consider? Do you have any server recommendations?
Thanks!
P.S. I'm hoping to set some time to test Postgresql by the end of this year. Does anyone know if it has similar I/O patterns to Oracle?
sqlwriter at gmail.com
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.
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."
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
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.
Dump Outlook and Windows and install GNU/Linux or a BSD, then write a program to create a symlink to a random sound and re-create it every minute, and configure your mail client to open that symlink as a sound.
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 ]
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 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.
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
the random sound playing is meant to drown out the farts.
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.