I am trying to implement a system where I give a set of frequencies to be played at once, currently can play each frequency individually. Below I have a code, that plays the giv
Simply sum the sample values at each time point, and divide by an appropriate scaling factor to keep your values in range. For example, to play A 440 and C 523.25 at the same time:
double[] a = tone(440,1.0);
double[] b = tone(523.25,1.0);
for( int i=0; i