Niemitalo's isn't great either, depending on the frequency range you're
analysing; here is a better one, courtesy of Martin Vicanek, who provided
the coefficients for a 16th-order one in the paper:
https://vicanek.de/articles/ReverseIIR.pdf.
combAP(coeff, x) = f ~ _ with {
f(s) = x'' - coeff * x + coeff * s';
};
coeffsHilbertVicanek = waveform {
0.0406273391966415,
0.2984386654059753,
0.5938455547890998,
0.7953345677003365,
0.9040699927853059,
0.9568366727621767,
0.9815966237057977,
0.9938718801312583,
0.1500685240941415,
0.4538477444783975,
0.7081016258869689,
0.8589957406397113,
0.9353623391637175,
0.9715130669899118,
0.9886689766148302,
0.9980623781456869
};
coeffHilbertVicanek(i) = coeffsHilbertVicanek , int(i) : rdtable;
hilbertVicanek(x) = (x : seq(i, 8, combAP(coeffHilbertVicanek(i)))) , (x :
seq(i, 8, combAP(coeffHilbertVicanek(i + 8))) : mem);
Dario
On Tue, Sep 1, 2026 at 11:17 AM Julius Smith <[email protected]> wrote:
> Hi Oleg,
>
> That looks fine to me: Hilbert = 2 * imag(pospass)
> (I don't care about the scale factor, but it's presumably due to pospass
> choosing a 0.5 scaling.)
>
> Glad to hear there is a better version - add it to filters.lib?
> My best version (in matlab somewhere) rotates the spectrum by -pi/2 on the
> unit circle, applies a high quality real half-band lowpass to the real and
> imag parts, and rotates back by pi/2 - no fiddling with special complex
> bandpass filtering to pass only positive frequencies.
>
> - Julius
>
> On Mon, Aug 31, 2026 at 10:52 AM Oleg Nesterov <[email protected]> wrote:
>
>> Hi Julius,
>>
>> On 08/26, Julius Smith wrote:
>> >
>> > I don't recall the details of fi.hilbert or pospass, but at the
>> definition
>> > level, I want to note that a pospass ("positive-frequency-pass filter")
>> > consists of a pass-through for the real part and an ideal Hilbert
>> transform
>> > for the imaginary part, i.e. pospass = _,hilbert; In practice, hilbert
>> is
>> > never ideal, so the real part should be identically bandpassed to avoid
>> > inconsistencies near dc and nyquist
>>
>> Hmm... perhaps I am totally confused but
>>
>> hilbert(N,fc) = fi.pospass(N,fc) : !,*(2.0);
>>
>> from
>>
>> https://github.com/grame-cncm/faustlibraries/commit/d678c0464f03e40c85732421e38a7b7e8ea578e1
>>
>> doesn't look right to me at all...
>>
>> And this reminds me, it seems there is a much better implementation, see
>>
>> Re: [Faudiostream-users] Hilbert filter
>> https://sourceforge.net/p/faudiostream/mailman/message/36710453/
>>
>> the links to frequency responses are still valid.
>>
>> Oleg.
>>
>>
>
> --
> AI has taken my job, but only I know what it is.
> _______________________________________________
> Faudiostream-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users