def note_and_bend(mycents, middle_note=60):
    """Take a cent value and return a MIDI note and bend.

    Scale to '0 cents = middle-C' if middle_c=True.
    """
    note, remain = divmod(mycents + 50, 100.0)
    note = int(note + middle_note)
    bend = 8192 + int(round((remain - 50) * 40.96))
    return note, bend
