Quote Originally Posted by ?ëu?±o Mart??nez View Post
I've made a "wave reator" to simulate old sound stuff (square, saw, sinus and noise). Now I want to write a function to mix the waves.

I did something similar to:
Code:
(* Pseudo Pascal *)
  FUNCTION MixWaves (Wave1, Wave2: ARRAY OF BYTE): ARRAY OF BITE
  BEGIN
    FOR B := 1 TO Length (Wave1) DO
      Result[B] := (Wave1[B] + Wave2[B]) DIV 2;
  END;
It almost works but the result sounds "softer" (I mean with less volume).

What function should I use?
I know it has been a while, but I found this site the other day which might help with the mixing and volume issues:
http://www.vttoth.com/digimix.htm

cheers,
Paul