Previous topic

A Vocoder

Next topic

Rates and Domains

This Page

Complex Sinusoids

Real sinusoid vs complex sinusoid example:

signal SineReal {
        default:        0.0
        rate:           AudioRate
        reset:          MasterReset
        meta:           'A Sine wave at 1000Hz'
}

Oscillator (
        type:                   'Sine'
        amplitude:              1.0
        frequency:              1000.0
        phase:                  0.0
        reset:                  off
)
>> SineReal;
signal SineComplex {
        default:        [0.0, 0.0]
        rate:           AudioRate
        reset:          MasterReset
        meta:           'A complex sinusoid at 1000Hz'
}

CxOscillator (
        amplitude:              1.0
        frequency:              1000.0
        phase:                  0.0
        reset:                  off
)
>> SineComplex;

A real sinusoid built from two complex sinusoids:

complex ComplexSinusoid [2] {
        default:        [0.0, 0.0]
        rate:           AudioRate
        reset:          MasterReset
        meta:           'Sum of two complex sinusoids'
}

CxOscillator (
        amplitude:      0.5
        frequency:      [1000.0, -1000.0]
        phase:          [-90.0, 90.0]
        reset:          off
)
>> ComplexSinusoid;

# Use complex oscillators to produce a sine wave
ComplexSinusoid
>> CxAdd()
>> CxReal()
>> RealSinusiod;