# What is the algorithm to generate sine waves of arbitrary frequency in the STFT domain?

I'd like to write a DSP algorithm to do additive synthesis using arbitrary sine waves with inverse rectangular FFTs.

This requires two things:

1. The ability to generate phase/amplitude lists that cause the IFFT to create sine waves that are not integer multiples of 1/(IFFT length)

Example: How do I generate 1000 Hz with 16 sample IFFTs at 44100 Hz?

1. The ability combine two frames pre-IFFT so they are added post-fft.

What are the necessary steps here?

• This can be done but it's tedious and inefficient. There are some extremely efficient oscillator algorithms that work in the time domain. What's wrong with using those ? – Hilmar Jan 30 at 0:18
• I'm working in wavetable synthesis and I'm sort of assuming that if I pile up enough oscilators in the fft domain it'll outperform a typical additive synth. Note: The oscillators here would be of stable frequency but not amplitude. – Audiomatt Jan 31 at 3:22
• what is the connection you have between wavetable synthesis and sinusoidal modeling with the STFT? i don't see them as directly related to each other. – robert bristow-johnson Feb 5 at 19:23
• My first choice would be to use a simple NCO (Numerically Controlled Oscillator) to generate any arbitrary sinewave with extremely high precision, fidelity, ability for nearly instantaneous frequency change and minimum resources. Have you ruled this out? dsp.stackexchange.com/questions/37803/… – Dan Boschen Mar 7 at 21:06