To change pitch: calculate the quota of the target frequency and the sample's base frequency. This tells you how many samples you must skip/duplicate for each sample in the output. Use a float or something whose integer part is the offset in the wave, and add the previously calculated quota with each sample output. For linear interpolation, don't just duplicate the input sample but calculate a value you must add to it each time you output a sample. 

To mix several waves: just add the samples and check for clipping. This assumes they have all have the same frequency, which is what you accomplish through step 1. 

Hope this helps (it's all very basic and has been explained by better tutors than me on plenty of occasions)
