Sound synthesis with C#

Mr.D picture Mr.D · Jan 3, 2012 · Viewed 14.6k times · Source

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.)

Answer

Drew Noakes picture Drew Noakes · Jan 3, 2012

Check out NAudio on codeplex.

NAudio is an open source .NET audio and MIDI library, containing dozens of useful audio related classes intended to speed development of audio related utilities in .NET. It has been in development since 2001 and has grown to include a wide variety of features. While some parts of the library are relatively new and incomplete, the more mature features have undergone extensive testing and can be quickly used to add audio capabilities to an existing .NET application.

You could either use the library directly, or check out its source code to find out how it works at a low level.