Results 1 to 9 of 9

Thread: How to mix waves

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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

  2. #2
    Didn't I reply you? IIRC i commented that JSoftware's and Dan's solution would result in distorted sound. BTW I didn't tested it yet so I can't tell you.
    No signature provided yet.

  3. #3
    Quote Originally Posted by ?ëu?±o Mart??nez View Post
    Didn't I reply you? IIRC i commented that JSoftware's and Dan's solution would result in distorted sound. BTW I didn't tested it yet so I can't tell you.
    No, I hadn't seen any reply from you.

    Anyway, apparently the link I gave you makes mixing possible without volume changes or distortions

    cheers,
    Paul

  4. #4
    This article sums it up pretty nicely. http://kebby.org/articles/fr08snd4.html

    Just under the illustration in section 4.2 there's a section about mixing. In short, don't do any tricks to avoid clipping
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  5. #5
    Quote Originally Posted by JSoftware View Post
    This article sums it up pretty nicely. http://kebby.org/articles/fr08snd4.html

    Just under the illustration in section 4.2 there's a section about mixing. In short, don't do any tricks to avoid clipping
    hmm...interesting article, thanks for sharing

    cheers,
    Paul

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •