poscil
High precision oscillator.
Syntax
ares poscil aamp, acps [, ifn, iphs]
ares poscil aamp, kcps [, ifn, iphs]
ares poscil kamp, acps [, ifn, iphs]
ares poscil kamp, kcps [, ifn, iphs]
ires poscil kamp, kcps [, ifn, iphs]
kres poscil kamp, kcps [, ifn, iphs]
Initialization
ifn -- (optional) function table number. This defaults to -1 which indicates a sinewave.
iphs (optional, default=0) -- initial phase (normalized table index 0-1). If a negative value is given initialisation of the phase is skipped.
Performance
ares -- output signal
kamp, aamp -- the amplitude of the output signal.
kcps, acps -- the frequency of the output signal in cycles per second.
poscil (precise oscillator) is the same as oscili, but always employs floating-point table indexing, instead of integer math, like oscil and oscili (which can use either alternatively, depending on the table size). It is only a bit slower than oscili when reading power-two size tables.
The opcode poscil3 is the same as poscil, but uses cubic interpolation.
Examples
Here is an example of the poscil opcode. It uses the file poscil.csd.
See also
Credits
Author: Gabriel Maldonado
Italy
1998
November 2002. Added a note about the changes to Csound version 4.22, thanks to Rasmus Ekman.
New in Csound version 3.52
Function table optional in Csound version 6.00
Skip of initialisation new in version 6.06