Combine several notes.

There are 4 outputs: note1pin, note2pin, note3pin, note4pin.
These will be oscillating up & down at hopefully audio rates.
Line 4 determines when to change from Low to High after the note key is pressed.
Line 9 determines when it subsequently changes from High to Low, Low to High, High to Low, Low to High, until the note key is released.

Lines 5 and 10 determine whether the note is High or Low.
Assuming it starts Low (0), then in line 5 the output changes from Low to High (1-0 = 1)
In Line 10 it subsequently changes state (1-0 = 1, 1-1 = 0, 1-0 =1, 1-1=0...)

Outputs are mixed with an op-amp:

http://masteringelectronicsdesign.com/how-to-derive-the-summing-amplifier-transfer-function/