Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Try this Reverb ISampleProvider

$
0
0
Hi All,
I wrote a Reverb ISampleProvider.
You can down load it here if you want to play with it or modify it for your own use. You should be able to drop this class into any NAudio project and try it out.

Download link: http://breakthrusoftware.com/downloads/Utils/ReverbSampleProvider.txt

I'm hoping this will inspire others to write some other FX Effects for NAudio and post them here for open source use. My pipe dream is to see a set of NAudio implementations that cover the DirectX FX effects: chorus / compressor / distortion / echo / flanger / gargle / parametric eq / reverb

If you try the code, let me know what you think: ways it can be improved, bugs, etc.

Here is the sample code to run it. Just fill in an MP3 filename.
        string fname = @"MyAudio.mp3";

            WaveOut outputDeviceWaveOut = new WaveOut()
            {
                DesiredLatency = 300,
                NumberOfBuffers = 2,
            };
            outputDeviceWaveOut.DeviceNumber = 0;
            IWavePlayer waveOutDevice = outputDeviceWaveOut;
            AudioFileReader afrFile = new AudioFileReader(fname);  // sampler reader           
            ReverbSampleProvider reverbSamplr = new ReverbSampleProvider(afrFile);
            // change these properties for different effect
            reverbSamplr.ReverbLevel = 1.0f;  
            reverbSamplr.ReverbDepth = 4;
            reverbSamplr.DirectSignalLevel = 1.0f;
            reverbSamplr.Gain =  1.0f;
            waveOutDevice.Init(reverbSamplr);
            waveOutDevice.Play();

Viewing all articles
Browse latest Browse all 5831

Latest Images

Trending Articles



Latest Images