4. What's in a bug?

A "bug" has the following internal parameters:

An integer variable used to indicate the current state.

An unsigned integer used as a counter.

A floating point variable is used to store the current grain position, normalized 0-1. This is used to calculate the buffer playhead position, as well as the envelope window position.

A floating point buffer is used to store audio information. This is allocated to be a maximum size (externally known, as every grain will have the same max size).

The current buffer size is stored as an unsigned integer. This is in units of samples, and must be greater than 0 and less than or equal to the max samples.

A floating point value containing the "energy" level, which is a value between 0 and 1. Every time the bug fires off, the energy level decays by some factor (determined by the decay parameter).



prev | home | next