def score2tpc_meredith(score):
    """ Generates a sequence of tonal-pitch-classes (diatonic pitch name + accidental) from a score,
    in the format used by David Meredith (http://www.titanmusic.com/data.php)

    Sharps are represented with "s" and flats with "f".
    Double and triple sharps and flats are just repetitions of those symbols.

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

    Returns:
        list[int]: a list of tonal-pitch-classes corresponding to each note in the score
    """
    return [
        p.nameWithOctave.replace("s", "#").replace("f", "-")
        if ("#" in p.nameWithOctave) or ("-" in p.nameWithOctave)
        else p.nameWithOctave.replace("s", "#").replace("f", "-")[:-1]
        + "n"
        + p.nameWithOctave.replace("s", "#").replace("f", "-")[-1]
        for n in score.flat.notes
        for p in n.pitches
    ]