PDA

View Full Version : Grandfather clock plugin, possible?



dborn
2008-02-05, 11:39
I have an idea for a plugin that would actually involve playing some sounds without actually "playing" a track.

My idea is for a grandfather clock plugin that would always "emit" (for lack of a better word) the "tick-tock" sound and would also play chimes every 15/30/60 minutes and would also count the hours when the SB is not playing music of course! I was planning on allowing for the linking to a display plugin (such as WeatherTime which I use) to handle displaying something on the SB's screen.

My question is: is it possible to feed the Squeezebox with some short sound clips without actually going through the whole "play track" code? I've looked at the Squeezebox communication protocol and did not find what I was looking for. Before I embark on this journey, can anyone "in the know" either confirm or deny this possibility?

Thanks,
Daniel

erland
2008-02-05, 11:48
I'm not completely sure, but I think I've read that SlimServer can only play stuff that is in the database and in the current playlist. So I suppose this means that you will need to go through the standard play/add code.

The announcement script should give you some idea, it interrupts the currently playing song, plays an announcement sound, continue playing the original track.
http://www.gwendesign.com/slimserver/dev_software.htm#announcement

schatzy
2008-02-05, 13:42
You could possibly use the "Heartbeat" sound embedded in SC7 to do the tick-tock sound. As for the chime sound and then maybe use the wind chimes sound again from the embedded sounds as the 15/30/45/60 chimes just running them longer each time

Schatzy

dborn
2008-02-06, 03:55
Thanks for the reply guys,

Unfortunately for now, I'm stuck with V6.5 as I'm running off a NAS but I guess I could take a peek at the V7 code to see how it's done. I've been digging deeper in the squeezebox & slimp3 comm protocols and I've found commands to feed a stream directly into the SB decoder. It's as low-level as it gets but I'll see if I get lucky figuring out how it works without getting the SB into an incompatible mode WRT the rest of slimserver and its main task of playing music...

oktup
2008-02-06, 05:06
If you end up coding this plugin, I think you should also consider a 'roaring fire in background' option :)

dborn
2008-02-06, 05:53
...or a tropical rainforest or waves crashing on a beach, etc.

The nice thing about a clock is that you _expect_ the sounds to be repetitive... a 5 second snippet of a roaring fire in a loop will probably get on everybody's nerves real quick! ;)

Khuli
2008-02-06, 05:57
The nice thing about a clock is that you _expect_ the sounds to be repetitive...

I was hoping for a full set of Westminster chimes - bongs every 15 mins ...

dborn
2008-02-07, 07:23
Indeed... :) with interchangeable chimes (Westminster, Whittington or St. Michael's, whatever, cuckoo clock!) and selectable period (off, 15, 30, 60 minutes) and probably a "turn off the chimes at night" option too.

If I get this project in a decent state, I might enlist someone with an actual GF clock to send me some sound clips so as not to get on anyone's bad side by lifting some clips off the internet...

Once I can get actual wav or mp3 clips playing at will, then I'll concentrate on the rest of the logic.

Think about it, an SB with a decent amp would make a terrific high-tech grandfather clock! You could even have ol' Big Ben in your living room! ;)

radish
2008-02-07, 08:38
Think about it, an SB with a decent amp would make a terrific high-tech grandfather clock! You could even have ol' Big Ben in your living room! ;)

Would be good for New Year, not sure about any other day :)

Khuli
2008-02-07, 09:40
If I get this project in a decent state, I might enlist someone with an actual GF clock to send me some sound clips so as not to get on anyone's bad side by lifting some clips off the internet...

On first reading I thought "What's a girlfriend clock?".. :/

Zaragon
2008-02-07, 15:26
On first reading I thought "What's a girlfiend clock?".. :/

On first reading I though why does a fiend, female or otherwise need a clock, does hell run to a timetable :)

Khuli
2008-02-08, 02:27
Bah - stupid keyboad must have a poblem with the ' ' key...

EnochLight
2008-02-08, 21:50
You could possibly use the "Heartbeat" sound embedded in SC7 to do the tick-tock sound.
Schatzy

There's sounds embedded in SqueezeCenter 7??? Like what other sounds? And how are they accessed?

radish
2008-02-09, 11:30
There's sounds embedded in SqueezeCenter 7??? Like what other sounds? And how are they accessed?

They're provided by SN (and have been for some time) - they're just easier to access in SC.

EnochLight
2008-02-09, 14:23
They're provided by SN (and have been for some time) - they're just easier to access in SC.

Oh he's referring to the sound effects stuff on SN? Yeah I knew about that - I've used them for years. But those aren't "embedded" in SqueezeCenter; they are streamed from the net as they always have been.