Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Brown noise

  1. Jun 16, 2014 #1
    ok I am new to Brown Noise and DSP
    but from I read this is how you would do it :
    Code (Text):

     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 ?
    samplecount = 13230;
    offset = 0;
  2. jcsd
  3. Jun 30, 2014 #2

    Greg Bernhardt

    User Avatar

    Staff: Admin

    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?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Brown noise
  1. Separating noise (Replies: 0)

  2. Noise Calculations (Replies: 18)

  3. Electrical noise (Replies: 10)

  4. PSD of Noise (Replies: 8)