One way to create samples is to use the PADsynth algorithm. It is simple; here it is:
- Get input parameters, which are the amplitudes, bandwidths, and centers of a number of Gaussian distributions.
- Add together the generated Gaussian distributions to fill in the amplitude table.
- Fill the phase table with random data.
- Perform an inverse Fourier transform.
The result is a high quality perfectly looped sample.
A few programs implement it; one is AmigaMML.