why music has a rythm and melody