Notices


Reply
Thread Tools
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#1
I would really like an app on my phone that can beep at me at different time intervals. For example I am using a training program at the moment where I do a n exercise for 50 seconds and then rest for 10 and move straight onto the next one. This is very difficult to time using a stop watch on the phone and I can always look away whilst donig the excersise. I want something that I can hear.
Does anyone know of an app that would be suitable?

Thanks guys.
Janni
 
Posts: 134 | Thanked: 91 times | Joined on Nov 2009 @ Imperial College London
#2
This is not the most user-friendly of suggestions, but for something simple like this you could just write a small shell script, e.g.

#!/bin/sh

while [ 1 ]
do
sleep 50
#your notification action goes here
dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_activat e string:'PatternChatAndEmail'
sleep 10
#your notification action goes here
dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_activat e string:'PatternChatAndEmail'
done

In this example the phone will vibrate. This might not be a great idea if you use it a lot! If you want a beep you'll have to find a sound sample of the beep first, then substitute the dbus-send lines for an action to play it.

If you want to use this, then save the above as for example interval.sh, making sure to remove the forum introduced space in "/mce/request com.nokia.mce.request.req_vibrator_pattern_activat e", then make it executable by running:

chmod a+x ./interval.sh

To start your training run the script. To end kill it (ctrl-c). If you want to run it from a desktop widget or something you can use the command:

killall interval.sh

to stop it instead.

Cheers,
Jan
 

The Following User Says Thank You to Big Phat Jan For This Useful Post:
spanner's Avatar
Posts: 253 | Thanked: 184 times | Joined on Nov 2009 @ Bristol, UK
#3
If we're suggesting hacky solutions:

Record a 60-second clip of silence (using recorder), saying "beep" at 50 seconds & "boop" at 60 seconds. Then play the clip on repeat.
 

The Following User Says Thank You to spanner For This Useful Post:
Posts: 999 | Thanked: 1,117 times | Joined on Dec 2009 @ earth?
#4
You could try and use the "alarmed" app with "espeak"?

"Alarmed" allows you to run any command at a specified time and then configure espeak to announce something?.
__________________
I like cake.
 
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#5
oooh, I like the alarmed idea. I have small video clips of the excersise to do so could run these. This could be fun!!! Will have a play around. Never used alarmed before. Any tips?
Thanks guys!
 
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#6
what command do I need to run a video file? or open an image?
 
Posts: 75 | Thanked: 125 times | Joined on Nov 2008
#7
Big Fat Jan's solution is very elegant, but heres a simpler method. Paste this one-liner into xterm:
Code:
SOUNDFILE="/usr/share/sounds/game-chess_illegal_move.wav" ; while true ; do aplay $SOUNDFILE; sleep 50; aplay $SOUNDFILE; sleep 10 ; done
Obviously edit times etc as required.

Last edited by jabawok; 2010-08-23 at 01:59. Reason: formatting
 

The Following User Says Thank You to jabawok For This Useful Post:
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#8
Jabawok - thanks very much but I couldnt get this to work, it said playing file, but no sound. didnt look like it was counting anythign either. Does this cycle round until you exit the xterm?
 
Posts: 75 | Thanked: 125 times | Joined on Nov 2008
#9
Hrm, was your volume up?
Yes it loops till you close the xterm or hit ctrl+c.

You should see something like this:
Code:
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ SOUNDFILE="/usr/share/sounds/game-chess_illegal_move.wav" ; while true ; do aplay $SOUNDFILE; sleep 50; aplay $SOUNDFILE; sleep 10 ; done
Playing WAVE '/usr/share/sounds/game-chess_illegal_move.wav' : Signed 16 bit Little Endian, Rate 11025 Hz, Mono
Playing WAVE '/usr/share/sounds/game-chess_illegal_move.wav' : Signed 16 bit Little Endian, Rate 11025 Hz, Mono
Playing WAVE '/usr/share/sounds/game-chess_illegal_move.wav' : Signed 16 bit Little Endian, Rate 11025 Hz, Mono
It plays the chess sound, then a 50 second pause then again and then a 10 second pause etc..
 
Posts: 84 | Thanked: 4 times | Joined on Mar 2010 @ Leeds, UK
#10
it did the first bit, but not the second bit
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:04.