'Convert MusicXML pitch representation to MIDI pitch number.'

@staticmethod
def pitch_to_midi_pitch(step, alter, octave):

    pitch_class = 0
    if (step == 'C'):
        pitch_class = 0
    elif (step == 'D'):
        pitch_class = 2
    elif (step == 'E'):
        pitch_class = 4
    elif (step == 'F'):
        pitch_class = 5
    elif (step == 'G'):
        pitch_class = 7
    elif (step == 'A'):
        pitch_class = 9
    elif (step == 'B'):
        pitch_class = 11
    else:
        raise PitchStepParseException(('Unable    to    parse    pitch    step    ' + step))
    pitch_class = ((pitch_class + int(alter)) % 12)
    midi_pitch = ((12 + pitch_class) + (int(octave) * 12))
    return midi_pitch
