def starts_with_tonic(a_list):
    """
    Takes a single NoteList object.

    Returns an empty list if the first non-rest note in the melody is the tonic
    of the key defined by the first bar in the melody.

    Returns a list containing the start time of the first melodic note,
    otherwise.
    """
    key = a_list.track.bars[0].key.name
    note = a_list.get_first_actual_note()
    if note.name == key:
        return []
    else:
        return [note.start]