How to Write a Piano Melody