Hi, i've been trying to combine a number of sine waves together for the past few days without any luck. No processes i've found on the internet seem to work for me.
I have code which creates different sine waves at different frequencies, but it always only plays the final frequency, so any pointers on what I should do with this code would be appreciated.
I have code which creates different sine waves at different frequencies, but it always only plays the final frequency, so any pointers on what I should do with this code would be appreciated.
Code:
for(int i = 0; i < file.getNumSamples(); i++) { wave = sin(PIX2 * i * (f/SR)); buffer[a] = wave * gain; output = (buffer[a] + output)/2; file.setSample(output, i); }
Comment