oscil3 reads table ifn sequentially and repeatedly at a frequency xcps. The amplitude is scaled by xamp. Cubic interpolation is applied for table look up from internal phase values.
ifn (optional) -- function table
number. Requires a wrap-around guard point. Defaults to -1
indicating a sinewave.
iphs (optional) -- initial phase of sampling, expressed as a fraction of a cycle (0 to 1). A negative value will cause phase initialization to be skipped. The default value is 0.
Performance
kamp, xamp -- amplitude
kcps, xcps -- frequency in cycles per second.
oscil3 is identical to oscili, except that it uses cubic interpolation.
Table ifn is incrementally sampled modulo the table length and the value obtained is multiplied by amp.
If you need to change the oscillator table with a k-rate signal, you can use oscilikt.
Examples
Here is an example of the oscil3 opcode. It uses the file oscil3.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac;;;realtime audio out;-iadc ;;;uncomment -iadc if realtime audio input is needed too; For Non-realtime ouput leave only the line below:; -o oscil3.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1kamp=.6kcps=440ifn=p4asigoscilkamp,kcps,ifnoutsasig,asigendininstr2kamp=.6kcps=440ifn=p4asigoscil3kamp,kcps,ifnoutsasig,asigendin</CsInstruments><CsScore>f10128101; Sine with a small amount of dataf201281010.50.30.250.20.1670.140.125.111; Sawtooth with a small amount of dataf3012810100.300.200.140.111; Square with a small amount of dataf401281011110.70.50.30.1; Pulse with a small amount of datai1021i2321i1622i2922i11223i21523i11824i22124e</CsScore></CsoundSynthesizer>