Brown noise

  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 ?
    also
    samplecount = 13230;
    offset = 0;
     
  2. jcsd
  3. Greg Bernhardt

    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 a link to this question via email, Google+, Twitter, or Facebook

0
Draft saved Draft deleted