Combine several notes.

Thanks again for taking your time to help me through, I really appreciate it.

Ive taken a look through the code and tried to understand whats really going on.

What kind of "mix" does he use? What is a mix? :stuck_out_tongue:
I assume he has several mixes that each one output a sound.

  if (digitalRead (note1button) == LOW) {
1.    if (note1playing == 0)  // if key is pressed and note is not started
2.    { 
3.      note1playing = 1; // set note flag to playing
4.      note1end = micros() + note1time; // capture time to make note change state
5.      digitalWrite (note1pin, (1-note1state)); // start the note at high level (replace the write with something faster)
6.    }
7.    if (note1playing == 1){ // if key is pressed and note is already playing
8.      if (micros()>=note1end){ // see if its time to change note state
9.        note1end = note1end + note1time; // set time for next change
10.        digitalWrite (note1pin, 1-note1state); //  change the note state (1->0, 0->1)
      } 
    }
  }

If we take a look at this part of the code.
Line 4 and 9 = Keeps track for how long we have been holding down the button.
Line 5 and 10 = This is the part where we make the output sound, and also the part that is confusing me a bit. He uses his "mix" here with the opamp, but I cannot see where he really output the specific tone.

I hope Im not making myself look dumb or something.

Cheers