def score2pc(score):
    """ Generates a sequence of pitch-classes (midi numbers modulo 12) from a score.

    Args:
        score (music21.Score): the input score

    Returns:
        list[int]: a list of pitch-classes corresponding to each note in the score
    """
    return [p.midi % 12 for n in score.flat.notes for p in n.pitches]