oscilsSignal Generators:Basic Oscillatorsoscilsoscils
A simple, fast sine oscillator
Description
Simple, fast sine oscillator, that uses only one multiply, and two add operations to generate one sample of output, and does not require a function table.
Syntaxares oscils iamp, icps, iphs [, iflg]Initializationiamp -- output amplitude.
icps -- frequency in Hz (may be zero or negative, however the absolute value must be less than sr/2).
iphs -- start phase between 0 and 1.
iflg -- sum of the following values:
2: use double precision even if Csound was compiled to use floats. This improves quality (especially in the case of long performance time), but may be up to twice as slow.
1: skip initialization.
Performanceares -- audio output
Examples
Here is an example of the oscils opcode. It uses the file oscils.csd.
Example of the oscils opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoBasic OscillatorsCreditsAuthor: &nameistvan;January 2002New in version 4.18