def get_notes_by_song(song, notes_map):
    """
    Iterate over all labels for a given song.

    Same note have different midi codes in different octaves.

    For example the note C has the following codes: 12, 24, 36, 48, 60, 72,
    84, 96, 108, 120


    For this representation, we transform all these code only to the note C.
    We do the same for all the notes.
    """
    notes = []
    for segment in song:
        # (start,end,(instrument,note,measure,beat,note_value))
        notes.append(notes_map[segment[2][1]]['note'])
    return notes