A non-interpolating sound generator based on the difference equations:
x(n+1) = sin(im * y(n) + fb * x(n)) y(n+1) = (a * y(n) + c) % 2pi
This uses a linear congruential function to drive the phase indexing of a sine wave. For im = 1
, fb = 0
, and a = 1
a normal sinewave results.
sclang code translation:
freq |
Iteration frequency in Hertz |
im |
Index multiplier amount |
fb |
Feedback amount |
a |
Phase multiplier amount |
c |
Phase increment amount |
xi |
Initial value of x |
yi |
Initial value of y |
mul | |
add |