May 03, 2024, 09:25:53 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Continuous tone output

Started by Robert34, December 21, 2012, 07:33:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Robert34

I would like to output a continuous tone at a specified frequency.
I want the tone to continue indefinitely while the program continues to run more code.  Then I'll change the tone or turn it off later.

The frequency does not have to be very precise but I would like for it to change smoothly as I change the frequency value.  Eight bit resolution would be enough. The midi routine that I have found so far can output notes but it jumps from one note to another.  Is it possible to program the midi controller for a particular frequency in between notes or is there another windows api function for doing this?

Thanks,
Robert

LarryMc

Bob
Just letting you know I'm seeing what I can figure out that will do what you want.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

GWS

I've had a look, but couldn't find anything obvious 'off the shelf' .. :)

Just a thought though - isn't it going to be a bit off-putting for the user ?

No matter which frequency you choose - any continuous sound gets to be a bit annoying after a while.

best wishes, :)

Graham
Tomorrow may be too late ..

LarryMc

There is a IWB RTTY example that Sapero posted that he said he ported from an Aurora program.
I ran his exe and it created tones and told me that DirectSound API was the way to do what Bob wants.

When I tried to compile the IWB source it wouldn't.
It seems that the sound.inc is different between Aurora and IWB.

I really don't have the time right now to start swapping files between Aurora and IWB (and modifying them) to strip everything out to get just the code needed to generate the steady tone.
But I do know that the key to doing it is in the rtty example.
Maybe someone will want to take it on as a project.

Sorry Bob that I couldn't be of more help.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library