It seems that I haven't studied enough about FM Synthesis. My current algorithm looks like this:
modulator = sin( 2 * pi * fm_freq * i/sample_rate ) carrier = sin( 2 * pi * ( freq + modulator ) * i/sample_rate )
Instead of generating one stable waveform, it generates a sound warping from a pure sine wave to something awfully distorted. What am I doing wrong?