Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: Start and stop a sound/tone "on command" ?

Re: Start and stop a sound/tone "on command" ? 8 years 1 month ago #15847

  • RogerTango
  • RogerTango's Avatar
  • Offline
  • Fresh Boarder
  • Thanks received: 2
I would like to be able to use something along FREQOUT to generate a sine wave audio tone, but it would only be for as long as a button is pressed, etc..

The directives with all the audio commands requires the duration be specified, which does not suit my project(s).

Does anyone have any ideas how to do such a thing?

Thanks,
Andrew

Re: Start and stop a sound/tone "on command" ? 8 years 1 month ago #8650

  • W4GNS
  • W4GNS's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thanks received: 43
maybe a if or while statement. maybe look at the button command.

You're covering a tremendous amount of ground with a, or multiple projects

Re: Start and stop a sound/tone "on command" ? 8 years 1 month ago #8651

One option is to write your own routine..

Failing that and extending on Gary's advice - could you place the Sound command in a loop that checks the status of a button every 100mS? (according to the help file, it should be OK to do.. could even drop down to 10mS)

The 10hz blip of silence may affect the tone a little.. Might have to experiment with different intervals?
Time to create page: 0.216 seconds