maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Maemo beeper (https://talk.maemo.org/showthread.php?t=30613)

RevenanT 2009-08-02 03:45

Maemo beeper
 
Hello guys!

Iīm looking for an application that beeps after a given time, continuously. Letīs say that I need a beep every 1 minute, for 30 minutes. Is there anything like that?

zerojay 2009-08-02 04:29

Re: Maemo beeper
 
You could probably use a crontab for that without needing any special/external programs.

Thesandlord 2009-08-02 04:41

Re: Maemo beeper
 
you could probably whip something up in Flash or Python really easily. Or BASH. Just sleep for sixty seconds, then beep, and loop that x times.

t_moyashi 2009-08-02 05:06

Re: Maemo beeper
 
Quote:

Originally Posted by RevenanT (Post 308258)
Hello guys!

Iīm looking for an application that beeps after a given time, continuously. Letīs say that I need a beep every 1 minute, for 30 minutes. Is there anything like that?

I recommend eggtimer.
It is useful .

and I wrote a simple one-liner.
If mplayer is already installed, this script will work in Osso-Xterm.
Code:

for i in `seq 0 30` ;  do  echo $i min ; mplayer -really-quiet  /usr/share/sounds/camera-video-record.wav  ; sleep 60 ; done
Copy&paste it and press the Return key.
but strictly speaking , this script doesn't keep good time.
(lose 0.3~0.5 sec / loop)
Code:

> time  mplayer /usr/share/sounds/camera-video-record.wav  -really-quiet
real    0m 0.41s


qwerty12 2009-08-02 08:40

Re: Maemo beeper
 
1 Attachment(s)
I'll be shot for this one day.

Code:

#include <unistd.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <hildon/hildon.h>

int main (int argc, char *argv[])
{
        int i;

        if (!g_thread_supported ())
                g_thread_init (NULL);

        gtk_init(&argc, &argv);

        for (i = 1; i<=30; i++)
        {
                hildon_play_system_sound("/usr/share/sounds/camera-video-record.wav");
                sleep(60);
        }
        return 0;
}


RevenanT 2009-08-02 16:13

Re: Maemo beeper
 
Whoa! I appreciate all the help, guys. I will give it a try this afternoon.
and btw, I have tried eggtimer, but it does not have the option to beep every minute.

Thanks!

Den in USA 2009-08-02 16:20

Re: Maemo beeper
 
Quote:

Originally Posted by RevenanT (Post 308304)
Whoa! I appreciate all the help, guys. I will give it a try this afternoon.
and btw, I have tried eggtimer, but it does not have the option to beep every minute.

Thanks!

Yes, Eggtimer can do 1 minute time-outs. Just slide the “minutes” center bar all the way down.

YoDude 2009-08-02 16:20

Re: Maemo beeper
 
Quote:

Originally Posted by RevenanT (Post 308304)
Whoa! I appreciate all the help, guys. I will give it a try this afternoon.
and btw, I have tried eggtimer, but it does not have the option to beep every minute.

Thanks!

I hit the thanks button for these guys because I have been assisted by them in the past and will pro'ly need assistance on something else in future. It's a good thing having members like them on board. :)

RevenanT 2009-08-02 16:22

Re: Maemo beeper
 
Quote:

Originally Posted by YoDude (Post 308307)
I hit the thanks button for these guys because I have been assisted by them in the past and will pro'ly need assistance on something else in future. It's a good thing having members like them on board. :)

Good tip! Done :)

Den in USA 2009-08-02 16:24

Re: Maemo beeper
 
Does 1 minute, see post #7.

RevenanT 2009-08-02 16:25

Re: Maemo beeper
 
Quote:

Originally Posted by Den in USA (Post 308306)
Yes, Eggtimer can do 1 minute time-outs. Just slide the “minutes” center bar all the way down.

Youīre right, Den... But I donīt want that pop up window saying that time ran out... I just a need a beep or two, without any intervention of mine (like hitting the Close button).

RevenanT 2009-08-02 16:32

Re: Maemo beeper
 
Oh, one more thing guys. I am also looking for a friendly interface for this one, since I am not the one whoīs going to use it. Something easy like pocket doan (they call it a "meditation timer") - http://www.freewarepalm.com/clock/pocketdoan.shtml
I do have garnet vm, but I would love to have something similar for maemo...

tso 2009-08-03 07:08

Re: Maemo beeper
 
maybe someone could get this back in working order?
https://garage.maemo.org/projects/maetronome/

Framstag 2009-08-03 14:26

Re: Maemo beeper
 
Kandis (http://maemo.org/downloads/product/OS2008/kandis/) also does "noise" after some configurable amount of time.

tso 2009-08-03 20:04

Re: Maemo beeper
 
yes, but neither kandis norr eggtimer do automaatic repeats without human intervention...

RevenanT 2009-08-03 20:10

Re: Maemo beeper
 
yep, and I donīt want it. TBH it is a little bit stupid, because if I want it to repeat, it means that I donīt wanna do any intervention. Just beep it every minute! :)

qwerty12 2009-08-06 09:55

Re: Maemo beeper
 
Quote:

Originally Posted by tso (Post 308432)
maybe someone could get this back in working order?
https://garage.maemo.org/projects/maetronome/

If one recompiles OS2008's ESD, and LD_PRELOADs the esddsp from there, GTick runs. But the GTick package is horribly done (sorry, but it has to be said and if it worked (see below) I would waste a couple of hours fixing it) and pressing "Start" works fine. Pressing "Stop", on the other hand, does not work and causes GTick to lock up and for you to hear the tick for as long as the program is running (and, like I already said, it locks up :)). It's also not hildonized (I would be willing to do the basic if it worked).

jgombos 2009-08-18 20:28

Re: Maemo beeper
 
Quote:

Originally Posted by RevenanT (Post 308258)
Hello guys!

Iīm looking for an application that beeps after a given time, continuously. Letīs say that I need a beep every 1 minute, for 30 minutes. Is there anything like that?

Go to http://www.epochconverter.com/ and get the epoch time that you want it to start at.

Then type:
Code:

  apt-get install alarmtool && \
    alarmtool -a -boot --recurr 1 --recurr-count 30 \
    --time 1250625000

That will sound the alarm every min, 30 times, starting at epoch time 1250625000.

If you want it to do that forever, type:
Code:

  alarmtool -a -boot --recurr 1 --recurr-count -1 \
    --time 1250625000

To stop it, type:
Code:

  alarmtool -r 1250625000
It's important to remember the epoch time, because it becomes the "cookie" that's associated with the event.

There is no way to find out the cookie after you schedule the event because of this bug: https://bugs.maemo.org/show_bug.cgi?id=4935

And it would be resilient to power offs, so it could be a nasty trick to play on a fellow tablet user.

qwerty12 2009-08-18 20:32

Re: Maemo beeper
 
@jgombos

Maybe it is listed in: /var/lib/alarmd/alarm_queue.xml

jgombos 2009-08-18 20:53

Re: Maemo beeper
 
That's pretty useful qwerty12. I had a huge number of events, many of which used the same cookie. I tried this command to clear them out gracefully:

sed -ne 's/[^>]*cookie[^>]*>\([[:digit:]]*\)<.*/\1/pg' \
/var/lib/alarmd/alarm_queue.xml | sort | uniq | \
while read i; do alarmtool -r $i; done

But the /var/lib/alarmd/alarm_queue.xml file was not empty. Clearly alarmtool has issues.

nwerneck 2009-08-18 21:03

Re: Maemo beeper
 
It's important (if you're paranoid) to notice that there is a difference between making a loop with a sleep inside, and looking for the time, waiting for the next event. The first can accumulate errors over time.

fatboyxpc 2009-08-19 15:18

Re: Maemo beeper
 
I'm just curious, why do you want something that beeps every minute? Are you going to be practicing some sort of routine that you get a minute for each event or something, or for some type of competition?


All times are GMT. The time now is 09:34.

vBulletin® Version 3.8.8