The Alternative Csound Reference Manual
Previous |  | Next

# poscil3

poscil3 -- High precision oscillator with cubic interpolation.

## Description

High precision oscillator with cubic interpolation.

## Syntax

ar poscil3 kamp, kcps, ifn [, iphs]

kr poscil3 kamp, kcps, ifn [, iphs]

## Initialization

ifn -- function table number

iphs (optional, default=0) -- initial phase (in samples)

## Performance

ar -- output signal

kamp -- the amplitude of the output signal.

kcps -- the frequency of the output signal in cycles per second.

poscil3 uses cubic interpolation.

## Examples

Here is an example of the poscil3 opcode. It uses the files poscil3.orc and poscil3.sco.

Example 1. Example of the poscil3 opcode.

    /* poscil3.orc */
    ; Initialize the global variables.
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1

    ; Instrument #1 - a basic oscillator.
    instr 1
      kamp = 10000
      kcps = 440
      ifn = 1

      a1 poscil3 kamp, kcps, ifn
      out a1
    endin
    /* poscil3.orc */

    /* poscil3.sco */
    ; Table #1, a sine wave.
    f 1 0 16384 10 1

    ; Play Instrument #1 for 2 seconds.
    i 1 0 2
    e
    /* poscil3.sco */

## See Also

poscil

## Credits

Author: Gabriel Maldonado
Italy

Example written by Kevin Conder.

New in Csound version 3.52

Previous | Home | Next
poscil | Up | pow