kr oscil kamp, kcps, ifn[, iphs] kr oscili kamp, kcps, ifn[, iphs] ar oscil xamp, xcps, ifn[, iphs] ar oscili xamp, xcps, ifn[, iphs] ar foscil xamp, kcps, kcar, kmod, kndx, ifn[, iphs] ar foscili xamp, kcps, kcar, kmod, kndx, ifn[, iphs]
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.
foscil is a composite unit that effectively banks two oscils in the familiar Chowning FM setup, wherein the audio-rate output of one generator is used to modulate the frequency input of another (the "carrier"). Effective carrier frequency = kcps * kcar, and modulating frequency = kcps * kmod. For integral values of kcar and kmod, the perceived fundamental will be the minimum positive value of kcps * (kcar - n * kmod), n = 1,1,2,... The input kndx is the index of modulation (usually time-varying and ranging 0 to 4 or so) which determines the spread of acoustic energy over the partial positions given by n = 0,1,2,.., etc. ifn should point to a stored sine wave.
oscili and foscili differ from oscil and foscil respectively in that the standard procedure of using a truncated phase as a sampling index is here replaced by a process that interpolates between two successive lookups. Interpolating generators will produce a noticeably cleaner output signal, but they may take as much as twice as long to run. Adequate accuracy can also be gained without the time cost of interpolation by using large stored function tables of 2K, 4K or 8K points if the space is available.
k1 oscil 10, 5, 1 ; 5 cps vibrato a1 oscil 5000, 440 + k1, 1 ; around A440 + -10 cps