Rhythm Rule for Better Melodies