Here is an image of a square wave created by summing 64 partials. You can clearly see the little horns as well as the ripples at the ends of the peaks and throughs.
The sigma factor is defined as:
σ = sin (x) / x
x being:
x = nπ / M
Where n is the current partial number and M is the total partial number.
So, say you want to calculate this factor for the first partial and you want to add 32 partials in total. Take into account here that the fundamental pitch is seen as partial number one, so for this algorithm the total partials are then 33 and the first "real" partial is actually number 2.
x = 2 * π / 33
x = 0.19039955476
Here is a picture showing the same waveform (64 partials) as in the picture above, but now with the Lanczos factor added:
Convinced? Nevertheless, however great this might seem, it is important to point out that this perfection is not always wanted. I am not saying that the sigma factor takes away from the realism of the sound, as you will still get a very natural, nicely sounding sound for waveforms with high partials, when you are trying to get as close as possible to a perfect square wave while still retaining the natural sound as much as possible. The “problem” with the Lanczos factor is, however, that it straightens out every sound wave, no matter how many partials. Even waveforms with only two partials will be straightened out heavily.
Here a square wave consisting of a fundamental pitch and two partials:
And here the same waveform with the Lanczos sigma factor:
Wanted? Rarely. Therefore, I suggest that the sigma factor be used only when you really want to get a near perfect waveform. Whenever you’re actually out for the sound of a square wave with so and so many partials, I recommend not using it, as it really then destroys the shape of the additively synthesized waves.
If you have any questions, suggestions or free cake, feel free to comment.
No comments :
Post a Comment