Hartmann, W. M. (1998). Signals, sound, and sensation. AIP: Woodbury, NY.
Generate sinusoidally FM tones Generate sinusoidally FM tones
Consider what this means if you want to generate a tone with arbitrarily changing frequency. Say you have a list of frequencies for each discrete timepoint:

Since we're working with a discrete sampled digital signal with sampling rate 1/, equation (19.2) becomes a sum:

Therefore, looking back at equation (19.1), where x(t) is the value of the sound signal at timepoint t:

In programming speak: x = A*sin(2 * pi * cumsum(1/sr * f))