hilbert2
Prev | Orchestra Opcodes and Operators | Next

## hilbert2

hilbert2 — A Hilbert transformer.

## Description

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 433. Example of the hilbert2 opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsOptions>
    </CsOptions>
    <CsInstruments>

    instr 1

    asig oscili p4, p5
    a1,a2 hilbert2 asig,1024,256
      outs a1, a2

    endin

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

## Credits

Author: Victor Lazzarini
2017

Prev | Up | Next
hilbert | Home | hrtfearly