Did you notice the CALCRAND subroutine? We are free running timer W at 16 MHz and then sampling the counter "sawtooth" in a non-sychronized fashion. That number is then used as the seed for the RANDOM function. Theoreticaly, that should be closer to "true" random than a psuedo-random shift register of any length. I believe it is used in the "Wigglyman" code. You just have to setup the counter, then access the TCNT variable. Unfortunately, none of this is documented, but Mike and I puzzled it out. --- In SynthModules@yahoogroups.com, "Woody Wall" <woody_wall@h...> wrote: > --- In SynthModules@yahoogroups.com, "grantrichter2001" > <grichter@a...> wrote: > > Very cool application. > > Thanks. > > > I think Dr. Mabuse might have some tweakage for this > > program???? > > > > It seems right up his alley.... > > I thought he might get a kick out of it. > > By the way, the RANDOM function wasn't behaving as I expected, so I > lifted one out of Hal Chamberlin's "Musical Applications for > Microprocessors." It only has a length of 4096, but I can't hear any > cycling. > > Woody > > > --- In SynthModules@yahoogroups.com, "Woody Wall" > > <woody_wall@h...> wrote: > > > I've just uploaded two programs that generate different noise > > > functions. minoise.bas produces interpolated noise. This > > basically > > > turns out to be a triangle LFO whose amplitude changes at > > each slope > > > transition. Four outputs are provided, each twice the frequency > > of the > > > previous one. Put a voltage in IN-1 to change the basic > > frequency. > > > > > > perlin.bas produces Perlin noise. You may not know what this > > is, but > > > you've surely seen it in use. Two- and three-dimensional Perlin > > noise > > > is used in computer graphics to produce landscapes, clouds, > > smoke, > > > fire, etc. This program produces one-dimensional noise to > > control > > > filters, flangers, whatever. Higher numbered output have a > > greater > > > concentration of high-frequency noise. As with minoise, the > > basic > > > frequency can be voltage-conrolled at IN-1. I'm not completely > > happy > > > with this program, as I wanted to use another input to > > continously > > > vary the weighting of the frequencies. But integer arithmetic > > and the > > > lack of exponentiation put that beyond my capabilities. So for > > now the > > > relationships are fixed. Maybe someone else can improve this. > > > > > > Enjoy. > > > > > > Woody
Message
Re: Noise functions
2004-03-13 by grantrichter2001
Attachments
- No local attachments were found for this message.