Hi Alexandre, Can you be a bit more specific as to what you mean by "narrow band noise"?= =20 White noise is, by definition, not narrow band. I just tried a little=20 experiment with white noise and even if there is a large difference between= =20 the sample at the end of the block and the sample at the beginning of the=20 block, you cannot hear any click unless the magnitude of the noise is=20 considerably less than the maximum range of the samples (which, it seems to= =20 me, would be a silly way to do things, why make your noise only a tiny=20 fraction of the dynamic range of your system if the noise is the only thing= =20 you are interested in). So, I suspect that the problem may lie in that you are using non-white=20 noise. White noise essentially CONSISTS of large step after large step from= =20 sample to sample, so an additional large step being added periodically adds= =20 a slightly noticeable periodic quality to the noise, but doesn't change the= =20 overall character of it. One thing which might work in a variety of cases (even fairly narrow band=20 signals) would be to play the block of samples forwards and then backwards= =20 and then forwards, etc., alternating like that. This would ensure that the= =20 curve which the output stream followed was continuous, since the boundary=20 between two blocks would just be a repetition of the same sample. For=20 example, if your block of "noise" was [1 5 7 9 9 4] then instead of playing [1 5 7 9 9 4 1 5 7 9 9 4 1 5 7 9 9=20 4] play [1 5 7 9 9 4 4 9 9 7 5 1 1 5 7 9 9 4]. This still does nothing=20 about phase, though, so there would be clicks with, say, a sine wave, since= =20 the first derivative is now discontinuous. What is your application? You should be aware that repeating the block like= =20 this will have an effect on the spectrum, so it may not be usable for some= =20 purposes. Also, I think you will have trouble making the human ear not=20 notice at least slightly that it is repetitive. Alternatively, you could=20 implement a random number generator very easily in PIC code which would not= =20 repeat for hours or days. Even if you needed a non-white spectrum, you=20 could easily use a modified version which supplies the kind of noise=20 needed, or use a white noise type generator and follow it with a simple=20 digital filter. Hope this helps :-) Sean At 12:53 AM 10/16/01 -0300, Alexandre Guimar=E3es wrote: >Hi, > > This question goes to the more math enlightened of the list :-) > > I have to make an audio noise generator that has to repeat a narrow= band >noise over and over again. I have enough memory to hold 0.5 segs of noise. >My problem is that when I get from the end to the begining of the cycle I >always get a click on the sound output. I have already tried to apply a >number of "windowing" functions ( Hamming, Kayser and etc.) to try to make >the begin and end of the noise to be as close to each other as possible but >it has not worked ! I also have tried to match it by hand with wave editors >and have not been able to get good results ! > > The question is : Is there any way to generate white noise, filter= with >3 db by octave filters and make it so that the begin and end of the wave= can >be tied together without generating and audible click ??? I need 16000 >samples at 32K sample rate. I never imagined that human audition would be= so >sensitive to phase differences !! > > I have really tried all the ways I can imagine and would really >apreciate any help you guys could give me. > >Best regards, >Alexandre Guimaraes > >-- >http://www.piclist.com hint: The list server can filter out subtopics >(like ads or off topics) for you. See http://www.piclist.com/#topics ---------------------------------------------------- Sign Up for NetZero Platinum Today Only $9.95 per month! http://my.netzero.net/s/signup?r=platinum&refcd=PT97 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics