In order to implement the melody extraction or the automatic clearly more stable or to improve the transcription result, respectively, at the resulting segments or trajectories, respectively, of a melody line gained from a
spectrogram of the
audio signal a harmony mapping is performed such that a follower segment directly neighboring a reference segment in time direction is virtually shifted in the frequency direction by stages of
octave, fifth and / or third in order to examine whether among the resulting lines of the
octave, fifth and / or third there is one that fulfills a predetermined condition, like e.g. that the time /
spectral representation along this line comprises a minimum which is larger by a certain factor than a minimum that it comprises along the reference segment line, and, if such a line exists, selects the same and actually performs the shifting of the follower segment. This way, errors in melody line determination may be corrected again. By a suitable selection of predetermined conditions for the lines of the
octave, fifth and / or third, the direct neighborhood and further possible conditions, a faulty shifting may be prevented.