Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • May 06, 2016, 07:31:21 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Noisemaker  (Read 6305 times)

nhk220

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Noisemaker
« on: August 21, 2005, 09:56:02 AM »
I would like to have a program that runs on XP that will generate a musical tone form 1-3 seconds in length at random time intervals that I can specify.  E.G. random beeps from 2 to 9 minutes.  It would be nice if it would run behind any other programs running at the time.  Cheers

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,873
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Noisemaker
« Reply #1 on: August 21, 2005, 10:37:26 AM »
some questions:

does it matter what tone? random tone? fixed tone?

you want to be able to say, generate a tone every 7 minutes that lasts for 2 seconds, or you want to say, generate a tone ever x minutes (where x can change and be random from 2 to 9 minutes) of random duration that can range from 1-3 seconds.

what a strange request - mind telling us what it is to be used for?

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
DONE: Noisemaker
« Reply #2 on: August 21, 2005, 07:38:16 PM »
 :huh: Noisemaker waits ... minutes, plays random 1-3 second notes for ... minutes.

Fearful of the new terrorist act, I still post this solution to the request.

Download and install AutoHotKey from www.autohotkey.com. Save the script as Noisemaker.ahk and doubleclick to run.

Skrommel


;Noisemaker.ahk
; Waits ... minutes, plays random 1-3 second notes for ... minutes
;Skrommel @2005

#Persistent

IN:
InputBox,in,Noise,Start playing in ... minutes:
If in<1
  Goto,IN

FOR:
InputBox,for,Noise,Play for ... minutes:
If for<1
  Goto,FOR

in*=60000
for*=60000
SetTimer,START,%in%
Return

START:
SetTimer,START,Off
SetTimer,STOP,%for%
Loop
{
  Random,duration,1000,3000
  Random,frequency,200,10000
  SoundBeep,%frequency%,%duration%
}

STOP:
SetTimer,STOP,Off
ExitApp
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

zridling

  • Friend of the Site
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 3,292
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Noisemaker
« Reply #3 on: August 21, 2005, 08:47:31 PM »
Oh man, am I going to have some devious fun with this. "Dang, Boss, looks like you've got the latest Sasser worm! I'm going to need your credit cards and all your available cash to fix it."
 :)

nhk220

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Noisemaker
« Reply #4 on: August 22, 2005, 05:52:16 AM »
As I reread my first post I see that I didn't explain my need very well the first time.

I need to generate a tone for 1-3 seconds, once every few minutes. The time inteval between tones needs to vary, and I need to be able to specify the extremes on the time delay interval: it might be from 1-3 minutes one time and 5-20 minutes the next.

The tone can be the same tone (one easily heard) or it can vary as well. 

The program needs to run until I stop it, so if it could monitor for a keypress, that would be nice, or I can just stop it from the task bar as I did with ahk.

Thanks so much.

Cheers

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: Noisemaker
« Reply #5 on: August 22, 2005, 06:12:45 AM »
 :) NoiseMaker v2.0 - Waits a random number of minutes, plays a random note for 1-3 sec, waits a random number of minutes...

Skrommel


;NoiseMaker.ahk v2.0
; Waits ... minutes, plays a random note for 1-3 sec, waits
;Skrommel @2005

#Persistent

SHORT:
InputBox,short,NoiseMaker,Shortest pause (in minutes):
If short<1
  Goto,SHORT

LONG:
InputBox,long,NoiseMaker,Longest pause (in minutes):
If long<%short%
  Goto,LONG

Loop
{
  Random,duration,1000,3000
  Random,frequency,200,5000
  SoundBeep,%frequency%,%duration%
  Random,pause,%short%,%long%
  pause*=60000
  Sleep,%pause%
}
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,873
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Noisemaker
« Reply #6 on: August 22, 2005, 07:03:17 AM »
skrommel is the best  :-*

i'll update the noisemaker in skrommel's pack#2 when this gets to final version,
but this might be a good time to recap how easy it is to make a standalone exe out of these autohotkey scripts.

just install autohotkey from http://www.autohotkey.com/

then copy and paste skrommels script to a text editor (like notepad) and save it as as he says (noisemaker.ahk).

now you can double click that ahk to run it inside autohotkey right away

OR

right click on it from windows explorer and select compile

OR

from your start menu autohotkey group choose "convert .ahk to .exe" and select it.

voila you have a standalone exe you can run on any computer.

nhk220

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Noisemaker
« Reply #7 on: August 22, 2005, 07:17:21 PM »
Wow!

I do believe you have done it.  This is great!  I can't wait to try it out.

I really do believe all the good things people have said about you now! 

Thnak you, thank you, thank you!

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,983
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: Noisemaker
« Reply #8 on: August 22, 2005, 07:36:56 PM »
Still intrigues though - what is this for ????

Come on spill the beans  >:(