The quality of a sound is determined by the number of overtones present in the note. The fundamental note of a violin and sitar may be the same but they are accompanied by a different number of overtones. As a result, the quality of the two sounds is different and we can distinguish the two notes.