def note_to_key(note, default=4):
    indices = { 'C':0, 'D':2, 'E':4, 'F':5, 'G':7, 'A':9, 'B':11 }

    octave = default

    if note[-1] in '012345678':
        octave = int(note[-1])

    tone = indices[note[0].upper()]
    key = 12 * octave + tone

    if len(note) > 1 and note[1] == '#':
        key += 1
    elif len(note) > 1 and note[1] == 'b':
        key -= 1

    return key - 8;
It looks for any callback methods decorated with @event_callback
dataset/ETHPy150Open jdan/Melopy/melopy/utility.py/note_to_key--crossover with--dataset/ETHPy150Open ARMmbed/htrun/mbed_host_tests/host_tests/base_host_test.py/HostTestCallbackBase.__assign_decorated_callbacks