DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Finished Programs => Topic started by: dcsev on July 08, 2017, 03:28 AM

Title: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 08, 2017, 03:28 AM
I searched Google for 60 min + /r/software + Donation coder but couldn't find anything useful.
I want something like Cuckoo for Mac.
Requirements:
1) Simple.
2) MUST be portable (this is the reason I don't want to use Windows Task Scheduler as the settings are tied to Windows).
3) Must be able to choose mp3, wav, or m4a file for sound.
4) Decent interfaceknow if such an app exists?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on July 08, 2017, 12:38 PM
:) Chime plays a sound file or tells the time on the hour and every x minutes.

[ You are not allowed to view attachments ]

Chime is portable, it saves it's settings to Chime.ini, just copy the file to the folder you put the script in on your other computers.

Download and install AutoHotkey (http://www.autohotkey.com) to run the script.
Save the script as Chime.ahk and doubleclick to run.

17.07.2017: Added code to the Browse button. @stisev
18.07.2017: Added option to chime multiple times on the hour. @nogojoe
18.07.2017: The program checks for files 0.wav, 1. wav... 23.wav to be played on the hour. @mouser
21.07.2017: Added volume bar. @orbis. Removed a bug affecting playing individual hour files. @nogojoe
16.08.2017: Changed timing
21.10.2017: Added checkbox to ignore the volume

Skrommel
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 08, 2017, 08:39 PM
skrommer to the rescue as usual. Was this coded for me or was it done before? Never seen this app from you before.

Some comments/questions
1) Play button doesn't seem to do anything with "C:\Windows\InfusedApps\Packages\Microsoft.MicrosoftSolitaireCollection_3.14.1181.0_x64__8wekyb3d8bbwe\Arkadium.Win10.DailyChallenges\Assets\Audio\badgeEarned.wav"
It says "playing soundfile" but nothing happens.  I've confirmed the directory has that sound file as winamp plays it just fine.

EDIT: I tried this file too but nothing happens when I hit play: http://i.imgur.com/j7bBpvz.png

2) Browse button does nothing

3) You mentioned that Chime can play a sound "on the hour" - is this really true? I  see options for Chime every 60 minutes, but that's not the same as on the hour right?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: Shades on July 08, 2017, 10:13 PM
After a quick peek in the code, the sound is played on the hour (the interval for that function starts from 00:00)
Code: Autohotkey [Select]
  1. next:=A_YYYY A_MM A_DD A_Hour 00 00
  2. ...
  3. nexthour:=next
  4. nexthour+=1,Hour
The above should make that clear.


Is Winamp configured as the default player? Or not? Do you have different audio-devices installed in your computer? I ask, because there can be some (unintended) configuration confusion going on, when this is the case. And could explain the silence.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: Ath on July 09, 2017, 03:32 AM
Just to confirm: I've tested it here on Win10, and it worked just fine, right out of the box.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 09, 2017, 08:53 AM
After a quick peek in the code, the sound is played on the hour (the interval for that function starts from 00:00)
Code: Autohotkey [Select]
  1. next:=A_YYYY A_MM A_DD A_Hour 00 00
  2. ...
  3. nexthour:=next
  4. nexthour+=1,Hour
The above should make that clear.


Is Winamp configured as the default player? Or not? Do you have different audio-devices installed in your computer? I ask, because there can be some (unintended) configuration confusion going on, when this is the case. And could explain the silence.


1. Yes Winamp is default player.
2. Yes I have audio-devices but only one actually processes sound. Volumouse screeny: http://i.imgur.com/4felKwf.png     I use only USB DAC.   Shouldn't it, uh, use the default player like most apps?


Just to confirm: I've tested it here on Win10, and it worked just fine, right out of the box.

Thank you! That means it's probably my system. I will do some more testing  + in VM and report back. Thanks for the help guys. <3 <3 <3
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dr_andus on July 09, 2017, 09:45 AM
If you're a Chrome user, there is also the Cool Clock extension in the Chrome Web Store that can do this.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 10, 2017, 09:40 AM
If you're a Chrome user, there is also the Cool Clock extension in the Chrome Web Store that can do this.

It would have to be on a windows computer without Chrome, but also the problem with Chrome is that its extensions are notoriously non-portable (by google design).  Thanks for the suggestion.  I am hoping to Skrommel's solution working too.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skwire on July 10, 2017, 09:45 AM
I am hoping to skwire's solution working too.

In this case, I assume you mean Skrommel, right?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 10, 2017, 09:48 AM
I am hoping to skwire's solution working too.

In this case, I assume you mean Skrommel, right?


lol! yes... man.. I was using sPlayistmaker you made for me for the past 24 hours keep thinking your name :D
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 11, 2017, 01:58 AM
Confirmed it works now. No idea what the problem was.   It just went off on the hour at midnight.  THANK YOU Skrommel!! <3 <3 <3

I'm going to use this to run on the HTPC in living room to replicate grandfather clock :)
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on July 17, 2017, 04:58 PM
:) Made just for you, stisev!

It's was a quick hack, so I forgot to put code in the browse button! Updated the code on top. I also uploaded an .exe-file.

Skrommel
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 17, 2017, 05:00 PM
Damn, you're so awesome. Thank you very much!

It's surprising that I couldn't find a portable lightweight utility that does this (and OSX does have it).

I'll re-download it and test it out asap!  My living room has an hourly chime again.  Now to find a decent sounding grandfather clock chime.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on July 17, 2017, 10:49 PM
Damn, you're so awesome. Thank you very much!

It's surprising that I couldn't find a portable lightweight utility that does this (and OSX does have it).

I'll re-download it and test it out asap!  My living room has an hourly chime again.  Now to find a decent sounding grandfather clock chime.

try
https://freesound.org/people/joedeshon/packs/7926/

You may have to get Skommel to modify the setup to allow each hour chime to the correct wav. file    then you would have the complete grandfather clock  .The sounds files are really authentic.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on July 18, 2017, 10:54 AM
:) Added an option to play the sound multiple times on the hour, nogojoe.

I could maybe add a second sound file to make the clock sound reverb on the last chime. Or maybe 12 separate files?

Skrommel
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: mouser on July 18, 2017, 10:58 AM
Maybe one way to let user customize the chime souds without adding any gui options, is simply to let user specify sound file "Whatever.wav", but before playing the sound file, check if "Whatever_X.wav" exists and play that if it does, where X = hour number from 0-23 (or 1-24 whatever).  That way if they want they could use a different sound file for each different hour of the day.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on July 18, 2017, 11:37 AM
:) Added an option to play sound files 0.wav, 1.wav... 23.wav on the hour if they exist in the program's folder, mouser.

Or just 0 through 12, it checks if files >12 exists, and if not it chooses the earlier ones.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: mouser on July 18, 2017, 11:40 AM
 :up:
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: anandcoral on July 19, 2017, 05:12 AM
skrommel   :D

Age is just a number ! You proved it  :Thmbsup:

After so loooog years DC is again filled with useful codes. I am the one (but not the only) who has benefited the most from your codes and learn AutoHotkey.

Thank you.

Regards,

Anand
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on July 20, 2017, 01:01 AM
Added an option to play sound files 0.wav, 1.wav... 23.wav on the hour if they exist in the program's folder, mouser. :)

Or just 0 through 12, it checks if files >12 exists, and if not it chooses the earlier ones.
Hi Skommel     

I have downloaded wav files and have renamed them 0.wav, 1.wav... 23.wav as you have suggested but I am having no luck with them chiming on the hour I have the wav files in the same folder as the program.
I am running the AHK setup as the exe setup brings up a virus warning and quarantines the the exe.

it plays the chimes if you use play in the options setup .
This is the ini file :
[Settings]
interval=60
chime=Sound + Voice
silent1h=00
silent1m=00
silent2h=00
silent2m=00
soundfile=C:\Program Files\Chime\6.wav
repeat=1
voice=Microsoft Sam
voicetest=The time is <Time1>. Today is <Time2>.
time1=H:mm
time2=dddd d. MMMM yyyy
replace1a=:00
replace1b=o'clock
replace2a=.
replace2b=of
hidden=0


Regards nogojoe


Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on July 20, 2017, 02:55 PM
Hi, Skommel,

Just found this. What an excellent little program!

How possible would it be to have it use an independent volume control, so I could have, say, music louder, and this softer?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: tomos on July 20, 2017, 03:06 PM
How possible would it be to have it use an independent volume control, so I could have, say, music louder, and this softer?

can this not be done via the volume mixer?

[ You are not allowed to view attachments ]
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: mouser on July 20, 2017, 03:46 PM
In cases like this I think the simpler thing is find a utility that can change the volume of your chime wav files to be what you want.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on July 21, 2017, 04:55 AM
 :) Added a master volume control, orbis, I'll see if I can add a more targeted volume solution. Also, I found the error in the hourly files code, nogojoe, and I added a checkbox to choose between the play options.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on July 21, 2017, 11:32 AM
Many thanks indeed, skrommel!
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on July 21, 2017, 11:52 AM
Sorry to be a bother, skrommel, but the volume control (on the .exe.file, which is what I'm using) only seems to work on sound, not voice, nor sound+voice.

Would you mind having a look?

Many thanks!
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on July 21, 2017, 04:28 PM
:) Added a master volume control, orbis, I'll see if I can add a more targeted volume solution. Also, I found the error in the hourly files code, nogojoe, and I added a checkbox to choose between the play options.

Hi Skommel,
Can you post the new update as a ahk script my antivirus keeps on neutralizing the chime exe. Scans the exe file ok but when I try to run to install the exe the antivirus neutralises it. glad to see that you have found the error in the code but it frustrating not being able to check it out.

regards nogojoe
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: tomos on July 22, 2017, 02:39 AM
my antivirus keeps on neutalizing the chime exe. Scans the exe file ok but when I try to run to install the exe the antivirus neutralises it.
what is your anti-virus?
Can you report this to them as a false positive?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on July 22, 2017, 03:18 AM
my antivirus keeps on neutalizing the chime exe. Scans the exe file ok but when I try to run to install the exe the antivirus neutralises it.
what is your anti-virus?
Can you report this to them as a false positive?

It's Panda antivirus.   
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: tomos on July 22, 2017, 03:34 AM
Can you report this to them as a false positive?
:)
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on July 22, 2017, 04:20 PM
Can you report this to them as a false positive?
:)
Hi Tomos
Have sent them an incident report with the offending exe
nogojoe
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on July 25, 2017, 06:31 AM
Uploaded the script, orbis.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on July 26, 2017, 10:09 AM
Thanks. I've discovered the EarTrumpet app/program, which allows individual programs to run different volume levels, and it seems to work well here: https://github.com/File-New-Project/EarTrumpet/releases.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on July 27, 2017, 07:26 AM
:) Added a master volume control, orbis, I'll see if I can add a more targeted volume solution. Also, I found the error in the hourly files code, nogojoe, and I added a checkbox to choose between the play options.

LOL guys.

I just came back to this thread to ask for independent volume control...someone already requested it and skrommel already implemented it.

This site is so awesome
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: mouser on July 27, 2017, 11:11 AM
 :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-*
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skwire on August 07, 2017, 02:25 PM
@Skrommel: Thanks!
@stisev: If you're satisfied with Skrommel's app, do you mind if I move this to the Finished section?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on August 12, 2017, 03:17 AM
@Skrommel, great piece of software. Thanks!

Any ideas why (Win 10, system time kept regularly up to date via http://www.thinkman.com/dimension4/) Chime should invariably notify me up to 60 seconds after system time indicates the time specified? It announces actual system time correctly, but is not off its marks as soon as that time arrives.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on August 13, 2017, 02:46 AM
Uploaded the script, orbis.
Hi Skommel
I am having trouble getting this to work properly .
I get the sound files to work ok on the ui interface however won't chime on the hour through my speakers.
Going on the interface if I activate play say at 3.30 actual time it chimes 3 gongs .If I activate play at 11.30 it chimes 11 gongs .(that is even with another wav. file showing on the interface ).However if I let it work through the normal hours it doesnt chime at all . I am running Win XP 3.  Hope you or anybody can help.
Regards nogojoe .
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on August 13, 2017, 12:09 PM
@orbis: I use a timer set to 60 seconds, so it can be off by almost a minute. It's just to be as easy on the CPU as possible, but I can easily change it.

@nogojoe: So the test works, but when you click Run, there's no sound?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on August 13, 2017, 03:29 PM
@orbis: I use a timer set to 60 seconds, so it can be off by almost a minute. It's just to be as easy on the CPU as possible, but I can easily change it.

@nogojoe: So the test works, but when you click Run, there's no sound?

Yes that's correct.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on August 14, 2017, 04:01 AM
@orbis: I use a timer set to 60 seconds, so it can be off by almost a minute. It's just to be as easy on the CPU as possible, but I can easily change it.

Thanks. I'd certainly sacrifice some CPU for a bit more accuracy here.

Or is there a setting which users can change, perhaps?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on August 14, 2017, 06:10 AM
Thanks. I'd certainly sacrifice some CPU for a bit more accuracy here.

Or is there a setting which users can change, perhaps?
[/quote]

Or perhaps two versions - higher and lower CPU?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skwire on August 14, 2017, 08:52 AM
Thanks. I'd certainly sacrifice some CPU for a bit more accuracy here.
Or is there a setting which users can change, perhaps?

The source code doesn't have this as a user-definable setting but, if you have AutoHotkey installed, and are using the .ahk file instead of the .exe, you can easily modify the source on line 189 to do what you want.

Code: Autohotkey [Select]
  1. SetTimer,RUNNING,60000

The 60000 is 60000 milliseconds, or, 60 seconds.  If you want it checking every second, close the script, change the 60000 to 1000, and relaunch the script.  Make sense?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on August 14, 2017, 09:37 AM
Thanks. I'd certainly sacrifice some CPU for a bit more accuracy here.
Or is there a setting which users can change, perhaps?

The source code doesn't have this as a user-definable setting but, if you have AutoHotkey installed, and are using the .ahk file instead of the .exe, you can easily modify the source on line 189 to do what you want.

Code: Autohotkey [Select]
  1. SetTimer,RUNNING,60000

The 60000 is 60000 milliseconds, or, 60 seconds.  If you want it checking every second, close the script, change the 60000 to 1000, and relaunch the script.  Make sense?

Thanks. Moved over to AHK to try that out. It's certainly more accurate with line 189 at 1000, but it has the unfortunate side-effect of making the chime and voice sound every second for the minute it's set to run.

I have it set up to ring on the hour, and every 15 minutes thereafter. At those times, it constantly chimes/speaks for every second for a minute on the hour, at 15, etc.

Might there be a way round this?
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skwire on August 14, 2017, 10:01 AM
but it has the unfortunate side-effect of making the chime and voice sound every second for the minute it's set to run.

Ah, apologies for that.  I didn't look too closely at the source.   :-[

Might there be a way round this?

To answer your question, yes, it'll take further code modifications to do what you want.  Unfortunately, I do not have time today to look at the source more closely (regular job getting in the way  :P).  If Skrommel doesn't get to it first, I'll try to find time later this week.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on August 14, 2017, 10:21 AM
but it has the unfortunate side-effect of making the chime and voice sound every second for the minute it's set to run.

Ah, apologies for that.  I didn't look too closely at the source.   :-[

Might there be a way round this?

To answer your question, yes, it'll take further code modifications to do what you want.  Unfortunately, I do not have time today to look at the source more closely (regular job getting in the way  :P).  If Skrommel doesn't get to it first, I'll try to find time later this week.

That is very good of you. Appreciated!
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on August 16, 2017, 12:55 PM
@orbis: Uploaded a new version with corrected timing.

@nogojoe: I'm sorry, but I can't replicate your problem.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on August 16, 2017, 01:01 PM
@orbis: Uploaded a new version with corrected timing.

I am extremely grateful.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: mouser on August 16, 2017, 01:15 PM
Just a reminder to everyone that if you want to encourage the coders on the site, you can make a donation to them by clicking the gold coin under their name.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: orbis on August 16, 2017, 01:27 PM
Just a reminder to everyone that if you want to encourage the coders on the site, you can make a donation to them by clicking the gold coin under their name.

Good reminder. Donations made, to express my gratitude for this site and the skill and expertise offered.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: mouser on August 16, 2017, 01:47 PM
I wasn't meaning to pick on you orbis, it was just a general comment.  But thank you so much for your support of the site and the coders who live here.  :-*
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on August 16, 2017, 05:04 PM
@orbis: Uploaded a new version with corrected timing.

@nogojoe: I'm sorry, but I can't replicate your problem.



Thanks Skommel there must be some issue with my computer.

Nogojoe
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: nogojoe on August 20, 2017, 08:04 PM
@orbis: Uploaded a new version with corrected timing.

@nogojoe: I'm sorry, but I can't replicate your problem.



Thanks Skommel there must be some issue with my computer.

Nogojoe



Hi Skommel,
did some fiddling around and got it to go  :Thmbsup: :Thmbsup:

A thing of beauty and a joy forever    :-* :-*

Regards Nogojoe
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on October 02, 2017, 03:43 PM
Hi guys,

I've downloaded the latest Chime and had some issues.  Here's a picture with my settings: https://i.imgur.com/vffl0Tn.png
The big problem has to do with the volume feature on Chime.  I use this program on my HTPC where we watch movies frequently or listen to music on.  I have Chime to play a special clock tone hourly to replicate a grandfather type atmosphere, but what ends up happening is the volume of the movie is affected drastically during the playing of the music.
This can get really disconcerting during the night when the volume increases by 50% or more because of the Chime app for a period of a few seconds in our apartment and the movie or music volume increases with it drastically.

In the old version this wasn't an issue because it was tied to the system volume.  In the new version, there seems to be no way to disable the volume option or prevent this from happening.

Please help! We're so close to achieving grandfather-clock nirvana :(
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: skrommel on October 21, 2017, 12:06 PM
Try Chime v1.6, @stisev! :)

I added a checkbox so you can ignore the volume slider.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: dcsev on October 26, 2017, 12:35 AM
Confirmed it works now. TY!!
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: erikts on November 02, 2017, 12:12 AM
I have download Chime.exe from page 1 (https://www.donationcoder.com/forum/index.php?topic=44048.0) but I can't run it on Windows 10. Error message: This app can't run on your PC
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: Deozaan on November 02, 2017, 03:51 PM
It works fine for me on Windows 10 v1709 build 16299.19.

I do get a warning from Windows Smart Screen that it may be dangerous to run the program, but since I trust Skrommel and because Jotti said no malware was found (https://virusscan.jotti.org/en-US/filescanjob/9ac1zuuw8n), I told it to run anyway and it works just fine.
Title: Re: FINISHED: Hourly chime software (like Cuckoo for Mac)
Post by: erikts on November 02, 2017, 09:05 PM
I also had warning from Smart Screen but I allowed Chime to run and got the error message. Windows 10 Pro 32 bit (version 1703 build 15063.674). No complaint from Avira.

I wil try to run it on my laptop then.