Skip to content

hilbert2

A DFT-based implementation of a Hilbert transformer.

Syntax

ar1, ar2 hilbert2 asig, ifftsize, ihopsize

Initialisation

ifftsize -- DFT analysis size

ihopsize -- analysis hopsize

Performance

asig -- input signal

ar1 -- real output of asig

ar2 -- imag output of asig

hilbert2 is a DFT-based implementation of the Hilbert Transform producing two outputs in quadrature (90 degree phase difference across the spectrum). Unlike the IIR-based hilbert opcode, hilbert2 has a linear frequency response. Given that it employs a streaming algorithm, a delay of fftsize samples will be imposed between input and output.

Example

Here is an example of the hilbert2 opcode. It uses the file hilbert2.csd.

Example of the hilbert2 opcode.
<CsoundSynthesizer>
<CsOptions>
 -odac
</CsOptions>
<CsInstruments>

nchnls = 2

instr 1

asig  oscili   0dbfs*p4, p5
a1,a2 hilbert2 asig, 1024, 256
      outs     a1, a2

endin

</CsInstruments>
<CsScore>
i1 0 10 0.5 440
</CsScore>
</CsoundSynthesizer>

See also

Specialized Filters: Other filters

Credits

Author: Victor Lazzarini
2017