1. A method for generating a note-based code representing musical information, comprising steps of receiving the musical information in the form of an audio signal; and applying an audio-to-notes conversion to the audio signal for generating the note-based code representing the musical information, the audio-to-notes conversion comprising the steps of estimating fundamental frequencies of the audio signal for obtaining a sequence of fundamental frequencies; and detecting note events on the basis of the sequence of fundamental frequencies for obtaining the note-based code.