Is there some possibility to generate sounds in C#? I mean not just beep or open and play wave-file. I mean build the signal using different kinds of waves (sin, saw, etc.) and their options (frequencies, amplitudes, etc.)
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Can we recover audio from MFCC coefficients?
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
Here's a blog post I wrote about how to create a sine wave with NAudio. Obviously that's just a first step to making a full blown synthesizer as you will also want to create other waveforms, ADSR envelopes, filters etc, but it should at least get you started.
You can use FLooping. It is a library written in F#, providing common building blocks for audio synthesis like oscillators, envelopes, filters, etc. It is currently in an experimental state.
Disclosure: I am the developer of FLooping.
I highly recommend that you look at the platform VST .Net. This would allow you to create your own VSTs in .Net. If you want to do synthesis, you will probably find that is easier to create a VST and host it in your DAW of choice rather than create a once off app. This is because if you create a VST, you don't have to worry about dealing with the audio interface drivers or ASIO etc. https://vstnet.codeplex.com/
Also, you'll also need a set of controls for the user interface. The standard Windows Forms, or WPF controls might do the trick, but synth enthusiasts usually like to see nicely skinned controls. I recently released these controls which behave like normal WPF controls, but are designed for synthesis: https://bitbucket.org/MelbourneDeveloper/vst-controls-.net/
Check out NAudio on codeplex.
You could either use the library directly, or check out its source code to find out how it works at a low level.