In this example we want to make a number of chimes on the hour equal to the current hour, or announce the current hour.
To do that we make a profile with a time context that repeats every hour, and then 'split' the current time variable to get the current hour.
- click New and select Time
- select the range (From and To) times you want a chime for.
The From time should have minutes equal to 0.
- click Repeat and select Hours and enter 1
- click Done
That's the profile done, now the Task. The first action will split the current time (%TIME e.g. 10:34 into hours and minutes, because we need access to the hours only.
- click +, then select category Variable and action Variable Split
- click Var and select variable Current Time
- for Splitter, enter .
After this action, %TIME1 will be 10 and %TIME2 will be 34 (assuming the current time is 10:34
Announce the Hour
That's an easy one, we only need to add one more action to the task.
- click + then select category Misc and action Say
- enter It's %TIME1 oh clock
- long-click on the Locale field to download Text to Speech data
- long-click on the Locale field again and select a language
- click Done
That's it. Every hour, your phone will say something like It's 10 o clock, depending on the hour.
Chime the Hour
This one is a bit tougher. First you need a sound file with a chime in it. For example, here is an example ship's bell sounds. Now we need to make a loop which plays the bells a number of times dependent on the hour (in %TIME1 remember ?).
Here's a picture of what the task needs to look like when you're done:
The action off the screen at the top is the Variable Split action that you've already entered.
Next, Variable Clear sets a counter to 0, since we've probably used it before. Then we play the chime file and increase the value of %COUNT. If %COUNT is not yet the same as the current hour, we jump back to action 3 and play it again.
You might want to put a Wait action (category Misc) after Music Play to space the chimes better.
unsolicited comment by louwilkinson:
if we really want ships bell sounds…we want a double bell, modulo 4…so ding-ding for each hour, but start over after 4.
so 1:00 is ding-ding. 2:00 is ding-ding, ding-ding… etc
5:00 is back to ding-ding.
i spent an eternity listening to those bells, once upon a time…