Angband Forums

Angband Forums (
-   Idle chatter (
-   -   Simple sound playing app request (

Grotug July 6, 2020 17:39

Simple sound playing app request
Hi smart, friendly technical people,
I’m in need of a very simple app that doesn’t seem to exist: I need an app to play a custom sound (like a voice memo) at a specific time of day every day and not behave like an alarm; that is: only play once and have no snooze. Is anyone interested in making this? I suppose it could be programmed for either Windows, Mac or iPhone.

fph July 6, 2020 21:13

On Mac it's easy because it is a Real Unix (TM) and it has a cron daemon. This command (test it in a terminal) should play the sound file /System/Library/Sounds/Funk.aiff :

afplay /System/Library/Sounds/Funk.aiff

If you confirm that this command works, there is a way to run it automatically each day at a given time. Run this in a terminal:

env EDITOR=nano crontab -e

This will open an editor; insert the following line in the file:

59 12 * * * afplay /System/Library/Sounds/Funk.aiff

This will run the command at 12:59 each day. Then save the file with CMD-S and exit with CMD-X. If you wish to undo this or change the time, just run the same command and edit the file again, remove that line, or comment it out by prepending a # character.

Warning: I don't have a machine running Mac OS around, so I could not test it first-hand; I checked everything by googling.

Bonus: if you replace the third (last) asterisk with 1-5, it runs the command only on weekdays 1-5 (Monday to Friday).

Pete Mack July 7, 2020 12:50

I just didn't know how to play sounds on Mac.

But the above is correct: cron jobs are an *old* unix facility for doing exactly what you want. (Here old means primitive--it'sbased on a simple format with no dedicated UI.)
Equivalent on windows is schtask.

bio_hazard July 22, 2020 01:37

OSX can probably do this with the built-in Automator app. It looks like you can build custom actions from Calendar alarms that could play a specific iTunes playlist that could have your one sound (or maybe play the sound in Quicktime if you don't want to deal with iTunes).

If you need it precise to the second, it probably can't do that.

All times are GMT +1. The time now is 02:31.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.