Factored and moved next to the wavetable definition.