I need to generate several sine waves concurrently. Some are fixed freq., some are a single freq. which is selected by the control s/w and the freq. can change due to operator input, and 1 or 2 must be a scanning freq over a certain range. The sample rate is 48KHz. The processor is a Blackfin 548. I am not very familiar with the Blackfin but I noticed there is a sine function in the math library. Is this function suitable for generating sine waves in this scenario or is there a better way? If there is a better way, does someone have some example code?

Thanks,

Mike

Mike,

If you don't run into a MIPS problem, sin() would be your easiest way to go. Just define your amplitudes and phase functions and sum all the different freq. component generated with the sin() function. Something like:

PI = 2 * acos(0.0);

Fs = 48000;

Y[t] = A1 * sin(2 * PI * t / Fs * F1) + A2 * sin(2 * PI * t / Fs * F2) + A3 * sin(2 * PI * t / Fs * (F3a + t * F3b));

Yaniv.