[sdiy] Granular synthesis/graintable synthesis

Olivier Gillet ol.gillet at gmail.com
Wed Aug 24 15:39:43 CEST 2011


> Particularly subject to bouts of hand-waving is the process of chopping up a sample into grains. Or the production of usable grains from wavetables.

Not sure if it falls or not in the scope of granular stuff, but I've
worked on some code that "wavetablize" a (monophonic) sample. Here's
how it worked:
1/ The f0 of the sample was detected using YIN, and the sample was
chopped into 1 period chunks
2/ The MFCCs of each chunk were computed
3/ VQ was used to cluster the chunks into 16 classes, with mahalanobis
distance over the MFCC as a distance metric. The output of VQ is a
codebook of 16 single-cycle waveforms. Their period was resampled to
256 samples.
4/ Going back to the original sample, assign to each chunk its
codeword index. This yields a kind of "compressed" representation of
the original sample as a concatenation of the single-cycle waveforms
extracted at the previous step. You can further remove duplicate in
this list to get a Waldorf-style wavetable.

So now you have a list of waves and a list of wave pointers that
recreates, when swept, the original sample. You can control the pitch
and travel within the sample independently. Fun!



More information about the Synth-diy mailing list