Hartmann, W. M. (1998). Signals, sound, and sensation. AIP: Woodbury, NY.

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:
=2\pi\sum_{t_0}^{t}(\Delta t\cdot f_{t}))
Therefore, looking back at equation (19.1), where x(t) is the value of the sound signal at timepoint t:
=A\sin\Big(2\pi\sum_{t_0}^{t}(\Delta t\cdot f_{t})\Big))
In programming speak: x = A*sin(2 * pi * cumsum(1/sr * f))