HilbertH:
Filter:
Hilbert/Classes (extension) | Libraries > Hilbert > Pseudo-UGens | UGens > Filters > Nonlinear

HilbertH
ExtensionExtension

Applies the Hilbert Transform to an input signal. [1]

Description

Offers the Hilbert and related transforms and analyses of an input signal via Weaver's Second Method,1 known as Hartley Phasing.2

[1] this is a composite pseudo UGen. HilbertH is built with DelayN and Convolution2. Method *arSSB also includes SinOsc.

Class Methods

.ar

The Hilbert Transform, returning two signals in phase-quadrature. Considered as a complex analytic signal,3 the first may be regarded as the real component and the second as the imaginary.

Arguments:

in

The input signal to transform.

size

The size of the kernel used for Hartley Phasing filtering.

mul

Output will be multiplied by this value.

add

This value will be added to the output.

Returns:

An array of channels: [real, imag]

NOTE: The kernel used for Hartley Phasing filtering is windowed with the Signal: *kaiserWindow, where alpha is set to 1.

.arRotate

Rotate4 the phase of the input.

Arguments:

in

The input signal.

angle

Rotation angle, in radians.

size

The size of the kernel used for Hartley Phasing filtering.

mul

Output will be multiplied by this value.

add

This value will be added to the output.

Returns:

Phase rotated input.

.arSSB

Single-Sideband Modulate5 (SSB) the input.

Arguments:

in

The input signal.

freq

Frequency to shift by. May be positive or negative.

size

The size of the kernel used for Hartley Phasing filtering.

mul

Output will be multiplied by this value.

add

This value will be added to the output.

Returns:

SSB modulated input.

.arMag

Analyze the instantaneous amplitude of the input.

Arguments:

in

The input signal to analyze.

size

The size of the kernel used for Hartley Phasing filtering.

mul

Output will be multiplied by this value.

add

This value will be added to the output.

Returns:

Instantaneous amplitude.

.arPhase

Analyze the instantaneous phase of the input.

Arguments:

in

The input signal to analyze.

size

The size of the kernel used for Hartley Phasing filtering.

mul

Output will be multiplied by this value.

add

This value will be added to the output.

Returns:

Instantaneous phase, in radians.

.calcRealCoeffs

Generate real coefficients.

Arguments:

size

The size of the kernel used for Hartley Phasing filtering.

Discussion:

WARNING: To be deprecated! Use Signal *hilbert.real instead.

.calcImagCoeffs

Generate imaginary coefficients.

Arguments:

size

The size of the kernel used for Hartley Phasing filtering.

Discussion:

WARNING: To be deprecated! Use Signal *hilbert.imag instead.

Frequency response

Magnitude

The real output of HilbertH returns an allpass magnitude response.

The imag magnitude response may be regarded as bandpass, with notches at DC and Nyquist.

Phase

The real output of HilbertH returns a linear phase response. As a result, the output of the system as a whole is delayed in time. The total delay, in samples, can be calculated as size/2 + size - blockSize, where blockSize is the number of samples in one control period of the Server in use.

The imag output is offset by -pi/2 radians with respect to real.

Examples

ar

arRotate

arSSB

arMag

arPhase

[1] - Weaver, Donald. “A Third Method of Generation and Detection of Single-Sideband Signals.” Proceedings of the IRE, vol. 44, no. 12, 1956, pp. 1703–1705.
[2] - US Patent 1,666,206, Modulation System, April 17, 1928, United States Patent and Trademark Office.
[3] - Smith, J.O. “Analytic Signals and Hilbert Transform Filters”, in Mathematics of the Discrete Fourier Transform (DFT) with Audio Applications, Second Edition, https://ccrma.stanford.edu/~jos/st/Analytic_Signals_Hilbert_Transform.html, online book, 2007 edition, accessed 2017-08-08.
[4] - decrement
[5] - Aka, frequency-shifting.