Hilbert transformer

This plugin uses the spectral delete plugin as a base.
Rather than generating a sinc impulse response to filter out frequencies, it generates a hilbert impulse response and rotates the phase of the selected audio by 90 degrees. I also changed the window to Blackman-Harris rather than the standard Blackman window.
I’m still very much a beginner to Nyquist programming, so there’s a good possibility that the program isn’t as optimized or well-coded as it possibly could be. But it works.
Hilbert.ny (1.92 KB)

Nice :ugeek:

Apart from strange indentation in this function (below), the code looks fine to me.

(defun blackmanHarris (i M)
  ;; Where: 0 <= i <= M
  (+ 0.35875
     (* -0.48829 (cos (/ (* 2.0 pi i) M)))
     (* 0.14128 (cos (/ (* 4 pi i) M)))
	 (* -0.01168 (cos (/ (* 6 pi i) M)))))

should be:

(defun blackmanHarris (i M)
  ;; Where: 0 <= i <= M
  (+ 0.35875
    (* -0.48829 (cos (/ (* 2.0 pi i) M)))
    (* 0.14128 (cos (/ (* 4 pi i) M)))
    (* -0.01168 (cos (/ (* 6 pi i) M)))))

I tested the effect by applying it twice to a “square no-alias” Chirp. As expected, the result was (close to) an inversion of the original Chirp.

Ah, I see. It looks like I accidently used a tab indent instead of four spaces there. Good catch.

I’ve only used Hilbert transform to create a psuedo-stereo effect,
(only apply to one track of dual-mono pair).
Hilbert - pseudostereo.gif