Creating Brown Noise with WaveProvider32 in C#

  • Thread starter btb4198
  • Start date
  • Tags
    Noise
In summary, the conversation discusses the process of creating Brown Noise using a WaveProvider32 class. The steps involve setting parameters, generating random numbers, and adding the last value with the new one. The sample count is also mentioned as 13230 and the offset as 0. There is also a request for additional information or updates on the topic.
  • #1
btb4198
572
10
ok I am new to Brown Noise and DSP
but from I read this is how you would do it :
Code:
 class BrownNoise : WaveProvider32
    {
        double T;
        int N;
        double dt;
        Random rand1;
        float lastValue;
public BrownNoise()
{
    T = 1;
   rand1 = new Random();
    }

public override int Read(float[] buffer, int offset, int sampleCount)
{
    buffer[0] = 0;
    lastValue =0;

    dt = T / (double)sampleCount;

    for (int i = 1 ; i < sampleCount; i++)
    {
    float temp = (float)(Math.Sqrt(dt)*rand1.Next(255));
    buffer[i] = lastValue + temp;
    lastValue = temp;
    }
    return sampleCount;
}

is that right?
Brown noise you do add the last number with the new number right ?
also
samplecount = 13230;
offset = 0;
 
Engineering news on Phys.org
  • #2
I'm sorry you are not generating any responses at the moment. Is there any additional information you can share with us? Any new findings?
 

1. What is Brown Noise?

Brown noise, also known as red noise, is a type of noise commonly used in sound engineering and recording. It is characterized by a deeper and more rumbling sound compared to white or pink noise.

2. What is WaveProvider32?

WaveProvider32 is a class in the C# programming language used for generating audio signals. It is often used in audio software development for creating various types of noise, including brown noise.

3. How can I create Brown Noise with WaveProvider32?

To create Brown Noise with WaveProvider32, you can use the GetSamples method and specify the desired noise type using the WaveFormat property. You can also adjust the amplitude and frequency of the noise by modifying the Amplitude and Frequency properties.

4. Is it possible to customize the properties of Brown Noise with WaveProvider32?

Yes, you can customize various properties of Brown Noise with WaveProvider32, such as the amplitude, frequency, and duration. You can also apply filters and manipulate the noise to achieve different effects.

5. Can I use Brown Noise created with WaveProvider32 for scientific research?

Yes, Brown Noise created with WaveProvider32 can be used for scientific research. It is commonly used in studies on auditory perception and masking effects. It can also be used in experiments related to acoustics and audio engineering.

Similar threads

  • Programming and Computer Science
Replies
21
Views
1K
  • Electrical Engineering
Replies
15
Views
3K
  • Programming and Computer Science
Replies
16
Views
8K
  • Programming and Computer Science
Replies
16
Views
3K
  • Programming and Computer Science
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
987
  • Programming and Computer Science
Replies
7
Views
2K
  • Programming and Computer Science
Replies
25
Views
2K
  • Classical Physics
Replies
0
Views
104
  • Programming and Computer Science
Replies
5
Views
2K
Back
Top