开发者

How to convert generated digital sound to analog

开发者 https://www.devze.com 2023-02-18 16:58 出处:网络
I have developed sound generator program in C# using directsound. It plays perfectly well when any frequency and intensity (dbLevel) is given. My problem is that for 开发者_运维知识库example if I want

I have developed sound generator program in C# using directsound. It plays perfectly well when any frequency and intensity (dbLevel) is given. My problem is that for 开发者_运维知识库example if I want to generate the sound of Fan or ship but that sound seems very different from the actual analog sound which we hear normally. How can I convert that digital sound to real analog audio. or any other such utility is available???????


Play your sound with one application and record the output with a recording application (I've used Free Sound Recorder http://www.sound-recorder.biz/freesoundrecorder.html).

You can't simply convert it, you must play it to render the analog signal.


You are, i presume, writing a tone generator that creates a sine wave / other wave form.

Your sound is digital when you generate it, and the sound card converts it to analogue before it is played by your speaker. All sound is like that, mp3 music, ship sounds, and even your bleeps you made. It is stored digitally on your computer, and converted to analogue each time you play it.

So your question is, what is different about 'natural noises' or 'natural instruments'?

Well, it's just that they have much more complex spectrum. A natural sound is made up of thousands of frequencies mixed together. To generate a natural sound requires analysing the particular sound you want. To do this, you can use a spectrum analyser application, or fourier analysis. Then you will have to generate it.

Or much simpler, just read a recorded wav file, and play it!

0

精彩评论

暂无评论...
验证码 换一张
取 消