[chuck-users] continuous random values

Tom Lieber tom at alltom.com
Sun Sep 26 14:48:40 EDT 2010


It sounds like Thomas is looking for a noise generator with smoother
output than Noise. I think Stefan was closest when he suggested
sub-sampling Noise and interpolating the output. The easiest way to do
this is SubNoise => LPF.

In this patch I save the output as a file so I can examine the shape
in Audacity. I got terrible results for low values of freq like 1, but
5 and up look okay. I lowered the gain on the noise so that WvOut
wouldn't clip.

  5 => float freq; // rough frequency of the noise

  SubNoise n => LPF lpf => WvOut wav => dac;
  ((second / samp) / freq) $ int => n.rate;
  .6 => n.gain;
  freq => lpf.freq;
  "subnoise.wav" => wav.wavFilename;

  minute => now;

-- 
Tom Lieber
http://AllTom.com/
http://favmusic.net/


More information about the chuck-users mailing list