Convert one sound sample in different sample where each sample's pitch is a note (do-re-mi...)
One generic term for the class of libraries and algorithms that do this, make a set of music keyboard notes from random (psuedo-periodic) pitched sounds, is "time pitch modification".  This is sometimes accomplished by frequency domain phase vocoder analysis-resynthesis or by time domain synchronized overlap-add, followed by filtered resampling.  One example library might be Apple's OS X AVAudioUnitTimePitch effect unit.  Here's a wikipedia page on the topic: https://en.wikipedia.org/wiki/Audio_time-scale/pitch_modification 

First, you might have to use a pitch estimation algorithm to determine a perceived pitch for the original sound sample.  Here's a wikipedia page summarizing some of these methods: https://en.wikipedia.org/wiki/Pitch_detection_algorithm