Beep?

Ryan Simpkins plug at ryansimpkins.com
Sun Dec 23 19:59:20 MST 2007


On Sun, December 23, 2007 17:01, Dave Smith wrote:
> Derek Davis wrote:
>> echo -e "\a"
>>
>
> Or: apt-get install beep

I use beep: http://johnath.com/beep/

And Audio::Beep (CPAN should have it).

Then I found a simple play script (think it came with the CPAN module):
#!/usr/bin/perl -w

# use this program to play the examples in this directory
# use: ./beep_player.pl music_file

use strict;
use Audio::Beep;

undef $/;

my $beeper = Audio::Beep->new();
$beeper->play(<>);

-----------------

Here are the alert sounds I made. This works with a more complicated system to
give me a simple audio cue of script success (across multiple servers
world-wide). It plays from a small machine I tucked in my closet (it didn't
have a sound card, so I came up with this). Thing is - it actually works! It
has saved my bacon a few times.

~/music# cat alerts/begin
\rel
\bpm244
a12, a a a a
a12' a' a'
a12' a' a'

~/music# cat alerts/success
\rel
\bpm244
c12 f, c' f' c'
c12 f, c' f' c'
c12 f, c' f' c'

~/music# cat alerts/error
\norel
\bpm244
\transpose''
a12' a a a a r2
a12' a a a a r1

a12' a a a a r2
a12'' a' a' a' a' a' a' a' r1

a12' a a a a r2
a12'' a' a' a' a' a' a' a' r1

Then just call ./beep_player alerts/sucess. Hope this helps.

-Ryan



More information about the PLUG mailing list