def notes_to_positions(notes, root):
root_pos = note_to_val(root)<EOL>current_pos = root_pos<EOL>positions = []<EOL>for note in notes:<EOL><INDENT>note_pos = note_to_val(note)<EOL>if note_pos < current_pos:<EOL><INDENT>note_pos += <NUM_LIT:12> * ((current_pos - note_pos) // <NUM_LIT:12> + <NUM_LIT:1>)<EOL><DEDENT>positions.append(note_pos - root_pos)<EOL>current_pos = note_pos<EOL><DEDENT>return positions<EOL>
Get notes positions.

    ex) notes_to_positions(["C", "E", "G"], "C") -> [0, 4, 7]

    :param list[str] notes: list of notes
    :param str root: the root note
    :rtype: list[int]
    :return: list of note positions