Quote:
Originally Posted by xpi0t0s View Post
If I read the code correctly then the line where you calculate the data point is this:
Code:
res = amplitude_scale * sin(phase) * maxval;
So it's just a case of doubling up on this, bearing in mind that you may need to reduce the maxval to prevent clipping when peaks reinforce:
Code:
res = (amplitude_scale1 * sin(phase1) + amplitude_scale2 * sin(phase2)) * maxval/2;

Thanks alot. That worked perfectly.