You realize you need a life when...

EdFred

Taxi to Parking
Joined
Feb 25, 2005
Messages
30,281
Location
Michigan
Display Name

Display name:
White Chocolate
...in your spare time you build an alarm clock using Microsoft Access which will play a random MP3 in a windows media player active x control embedded in a form. And it even has a snooze button.

If I don't post in the morning I guess it didn't work correctly.
 
OK, ed. You need to sniff the fuel a little less on pre-flight...
 
White and Nerdy by "Weird" Al


Close! It was "Girls" by the Beastie Boys. You know what though. Waking up to music, is a hell of a lot better than an alarm clock that blares, "DEET DEET DEET DEET DEET DEET DEET!"
 
Yep, it worked. There was question asked on the Access forum about setting an event reminder that always triggered at a certain time period. Then I got to thinking about it, because I never use the timer function in Access. So I started experimenting, at first it started out with just triggering a message box. And then the code would stop until I clicked ok. Then I set it up to run a Beep instead of the message box function. And from there I started wondering if I could get it to play an MP3.

So I used the shell function to call a specific MP3. But you can't call a non-executable. I thought since the file type was associated, it would work, but it didn't. So then I called windows media player, but it doesn't autoplay when opened as a stand alone program. So then I called WinAmp, and if you put in a specific filename in the shell call it will automatically play that mp3. Then I thought, why not make this thing a full blown alarm clock? Ooooh, bad idea, it always plays the same song, and I certainly don't want to feel like I am in the movie Groundhog Day. Aha! I can call a playlist in winamp. Excellent, and since I have random play turned on in Winamp it plays a different song off the list when it's opened. Ok, what do all alarm clocks have? A snooze button. So I built a snooze button into it, and then ran into my next issue:

Winamp runs independently from Access, so closing it could be a real pain if I was to have a snooze button. Oooh, but I could put it in as an activeX control? Well, I couldn't find an easy way to do that but windows media player is easily put in as an active x control. So I did that, and whenever the form it is in gets opened it automatically plays. Rock on. Oh crap, I'm back to the specific song again in the properties of the wmp control. So then I thought hey, it's got properties, I can change them when I call the second form to be opened. I have to build a list, and select a song from it. No, I don't want to do that, that would be a pain in the butt, and be too much busy work of inputting all the songs I want to choose from. Ah, but I can take my playlist, save it as a text file, and import the filenames to a table in the database. Give each one a unique ID number, generate a random number, open the recordset where the unique ID is equal to the random number generated, write the filename to a string, and when I open up the form with the player I set that attribute in code and voila my musical alarm clock. Oh, and when I hit snooze, it regenerates the random number and plays a different song for the next time it goes off.

Wow, how pathetic.
 
Our you could buy a 20 dollar clock radio and wake up to music/ads without having to do the whole computer thing.:p

I agree with you, though, music (or news for me) is a whole lot better than beeping.

My morning goes like this.
Rob: ZZZZ
Clock Radio: From National Public Radio in Washington this is Karl Castle, 10 thousand Africans are...
Rob: slams snooze button.
Clock Radio: The situation in Iraq is worsening reports a major...
Rob: slams snooze button.
Clock Radio: a task force on global warming stated today...
Rob: slams snooze button.
Clock Radio: Mayor Bloomberg...
Rob: slams off button, begrudgingly gets up.

See, I like to start my day off with apathy.
 
Our you could buy a 20 dollar clock radio and wake up to music/ads without having to do the whole computer thing.:p

Yeah, but this I can have a TEN minute snooze, not the nine minute snooze that comes with all the other alarm clocks. And I get the choice of songs that I'll wake up to, and well, I had nothing else to do.
 
I loved your explanation of how the project came together. That's the best description of feature creep I've ever read! Bwah ha ha! (Nice job making something useful out of a test project! You're still a nerd!)
 
Ours is configurable. And we can wake up to a CD if we want to. And it has a snooze button on a remote so I can snooze from clear across the bed. :)
crawling around under the bed to find the damn remote and I would be wide awake ... :rofl:
 
Our you could buy a 20 dollar clock radio and wake up to music/ads without having to do the whole computer thing.:p

I agree with you, though, music (or news for me) is a whole lot better than beeping.

My morning goes like this.
Rob: ZZZZ
Clock Radio: From National Public Radio in Washington this is Karl Castle, 10 thousand Africans are...
Rob: slams snooze button.
Clock Radio: The situation in Iraq is worsening reports a major...
Rob: slams snooze button.
Clock Radio: a task force on global warming stated today...
Rob: slams snooze button.
Clock Radio: Mayor Bloomberg...
Rob: slams off button, begrudgingly gets up.

See, I like to start my day off with apathy.

Ha ha ha, waking up to NPR these days just makes me want to stay in bed all day. Stopped doing it.

The community radio station has Democracy Now! at eight o'clock. Talk about depressing!

I have my computer set to open a internet music stream. Much better way to wake up.
 
I have my computer set to open a internet music stream. Much better way to wake up.

So, if the internet is down, do you oversleep?! No Internet = No Stream.

My body's so tuned to waking up at the same time that I know wake up a few minutes before the alarm goes off. Oh, wait, I don't even have it set anymore, actually, and rarely miss my wake-up time. I figure that if I do, then I needed it!
 
So, if the internet is down, do you oversleep?! No Internet = No Stream.

My body's so tuned to waking up at the same time that I know wake up a few minutes before the alarm goes off. Oh, wait, I don't even have it set anymore, actually, and rarely miss my wake-up time. I figure that if I do, then I needed it!

I have one of those small battery operated alarm clocks that beeps only. I've lived in parks too long to rely on anything that plugs into the wall to wake me up - too many power bumps. Nice to wake up and the music downstairs is already going if everything is working correctly.
 
Back
Top