See https://en.wikipedia.org/wiki/Whistled_language for more instances of this phenomenon and a good discussion. My understanding is that whistled languages often arise on top of tonal languages where tones carry a lot of information. The Turkish example is interesting since Turkish is not a tonal language but they still figured out how to do it.