Melody Detection in Polyphonic Audio: From Pitch Extraction to Note Identification