Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > The real world > Idle chatter

Reply
 
Thread Tools Display Modes
Old July 6, 2020, 18:39   #1
Grotug
Veteran
 
Join Date: Nov 2013
Posts: 1,342
Grotug is on a distinguished road
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.
__________________
Detailed account of my Ironman win here.
Grotug is offline   Reply With Quote
Old July 6, 2020, 22:13   #2
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 915
fph is on a distinguished road
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).
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.

Last edited by fph; July 6, 2020 at 22:29.
fph is offline   Reply With Quote
Old July 7, 2020, 13:50   #3
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,825
Donated: $40
Pete Mack is on a distinguished road
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.
https://stackoverflow.com/questions/...job-in-windows
Pete Mack is offline   Reply With Quote
Old July 22, 2020, 02:37   #4
bio_hazard
Knight
 
bio_hazard's Avatar
 
Join Date: Dec 2008
Posts: 624
bio_hazard is on a distinguished road
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.
bio_hazard is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Good ambient tracks/sound/music for playing? lea2501 Vanilla 5 June 29, 2020 03:15
simple question on paralyzing quarague Vanilla 22 November 19, 2016 21:28
simple store changes appreciated fbas Vanilla 3 November 24, 2010 21:59
Simple question An Fear Glas Vanilla 2 December 20, 2008 03:10
[FA] 2 simple questions Zikke Variants 12 September 26, 2008 21:52


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


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