Sound synthesis with C #

Is it possible to generate sounds in C #? I do not mean only a sound signal, or open and play a wave file. I mean the construction of a signal using various types of waves (sin, saw, etc.) and their parameters (frequency, amplitude, etc.).

+4
source share
3 answers

Check NAudio for codeplex.

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

You can either use the library directly or check its source code to see how it works at a low level.

+8
source

Here on my blog I wrote about how to create a sine wave using NAudio . Obviously, this is just the first step towards creating a full-blown synthesizer, as you also want to create other waveforms, ADSR envelopes, filters, etc., but at least you should get started.

+4
source

I highly recommend you look at the VST.Net platform. This will allow you to create your own .vst in .Net. If you want to make synthesis, you will probably find it easier to create a VST and place it in your DAW of your choice, rather than creating a one-time application. This is because if you are creating a VST, you don’t have to worry about working with the drivers for the audio interface or ASIO, etc. https://vstnet.codeplex.com/

In addition, you will also need a set of controls for the user interface. Standard Windows Forms or WPF tools can do the trick, but synthesizer enthusiasts usually like to see well-compiled controls. I recently released these controls that behave like regular WPF controls, but are designed for synthesis: https://bitbucket.org/MelbourneDeveloper/vst-controls-.net/

0
source

Source: https://habr.com/ru/post/1389061/


All Articles