The continuous phase precision oscillator is a C++ class for use in VST plugins. It generates sinusoids with high efficiency using only one multiply per sample.
It is a modification of the digital sinusoidal oscillator represented by the following difference equation, where is the desired frequency of oscillation:
This difference equation predicts that when the frequency is changed by while the oscillator is running, the amplitude will deviate. We can overcome this problem by simultaneously recalculating the memory values and whenever we wish to change the oscillator frequency.
The solution for the new memory value is calculated whenever frequency is updated:
Download
Audio sample of the oscillator as frequency modulator:
Download the C++ class:
COsc.cpp
COsc.h
References
[1] J. W. Gordon and J. O. Smith, “A sine generation algorithm for VLSI applications,'' in Proceedings of the 1985 International Computer Music Conference, Vancouver, Computer Music Association, 1985
[2] J.O. Smith and P.R. Cook, “The Second-Order Digital Waveguide Oscillator”, Proceedings of the 1992 International Computer Music Conference, San Jose, 1992.
[3] R. Andraka, “A survey of CORDIC algorithms for FPGA based computers”, Proceedings of the 1998 ACM/SIGDA sixth international symposium on Field programmable gate arrays, Monterey, CA., 1998.
[4] P. A. Regalia, S. K. Mitra, and P. P. Vaidyanathan, “The Digital All-Pass Filter: A Versatile Signal Processing Building Block”, Proceedings of the IEEE, vol. 76, No. 1, 1988.
[5] J. Dattorro. “The Implementation of Recursive Digital Filters for High-Fidelity Audio”, J. Audio Eng. Soc., vol. 36, No. 11, 1988.
Yann
/ April 18, 2012 QuoteHi,
I would like to know why is the COsc.c not downloadable?
Is it always possible to get it with you?
Best regards,
Yann