def add_dividers(pitches: list, interval: int) -> list:
    """
    Adds dividing sounds to a list of pitches at regular intervals.
    This is useful for when the data is periodic (e.g. temperature by month
    for multiple years), or when it is so long that rests may help with
    easier listening.

    :param pitches: prepared list of pitches
    :param interval: integer index (if 5, a divider will be added after every fifth note, etc.)
    :return: altered list of pitches
    """

    new_pitches = []

    for i, f in enumerate(pitches):
        new_pitches.append(f)
        if i % interval == interval - 1:
            new_pitches.append('div')

    return new_pitches