Hi,
I am currently trying to generate sounds for a project I am working on. I need to be able to produce a beep* sound based on a "frequency" and "decibel" level (it does not need to be accurate as the sound in mainly feedback for the user, but you should hear a difference that seems realistic). I am looking for advice on whether my idea makes sense or not.
Frequency does not appear to be an issue, being one of the parameter of the console.Beep function for instance; decibel might be a bit more tricky though.. I didn't find anything related to decibel in sound generation in c#, so my idea was to play on the current output volume to 'fake' changing the decibel output while playing my Beep on the set frequency =).
My first question is, does that somehow make sense? ^^' If not what would you do?
Then, in case you have any lead on how to programmatically change the output volume of speakers, please throw them that way, I must confess it's my first time doing things like that.
Thanks for your time.
Loading
Roei BarPosted Sep 13, 2009, 1:59 AM
i can recommend you 2 other things:
1. play different Beep, by different alert like this project :
http://www.codeproject.com/KB/cs/messagebeep.aspx
2. using a ".WAV" file, and invoking it with differant volume levels,
you can use this tutorial for an howto explenation :
http://www.dreamincode.net/forums/showtopic45693.htm
best of luck
Thibaut DietschPosted Sep 13, 2009, 5:34 AM
Option 1 could be promising I'll take a look.
Option 2 on the other hand won't make it I think as I won't be able to change the frequency of the .WAVE.
What I need is really to be able to generate a beep at different frequency and on different levels (to fake the decibel thingy).
I will look more into this, I am pretty sure there is a solution =).