Unexpected phase shift when adding harmonics via Spectrum in uhm

Official support for: u-he.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Hello, I have noticed that in uhm, if Spectrum is called multiple times, adding to the same waveform (frame), every odd harmonic introduces a phase shift, that is not applied when the individual harmonics are rendered alone.

For example, when adding harmonics to create a Square-like waveform

Code: Select all

Spectrum start=0 end=0 lowest=1 highest=1 "(1 / (index))"
Spectrum start=0 end=0 lowest=3 highest=3 "(1 / (index))"  // phase shift: +pi
Spectrum start=0 end=0 lowest=5 highest=5 "(1 / (index))"  // phase shift: -1/2 pi
Spectrum start=0 end=0 lowest=7 highest=7 "(1 / (index))"  // phase shift: +3/4 pi
Spectrum start=0 end=0 lowest=9 highest=9 "(1 / (index))"  // phase shift: -3/4 pi
The phase shift can be removed simply with:

Code: Select all

Phase "0"
I found it strange that the phase shifting happens only on odd harmonics. Even harmonics seem to always have phase 0 as expected, at least the initial few I tested.

Moreover, creating a waveform with just any one of the mentioned Spectrum calls, looks correct, with phase 0.

This was found on Hive2 VST3, Win x64, rev 12092.
Is there anything I am missing or misunderstanding?

Thank you very much
Enrico

p.s.
I am well aware that this is not the *best* way to create a Square waveform, and if one really wanted to use the Spectrum function, could do that just in a single call, like shown in the sample code:

Code: Select all

Spectrum start=0 end=0 lowest=1 highest=9 "(1 / (index)) * (index % 2)"

Post Reply

Return to “u-he”