'Parse the MusicXML <pitch> element.'

def _parse_pitch(self, xml_pitch):

    step = xml_pitch.find('step').text
    alter_text = ''
    alter = 0.0
    if (xml_pitch.find('alter') is not None):
        alter_text = xml_pitch.find('alter').text
    octave = xml_pitch.find('octave').text
    if alter_text:
        alter = float(alter_text)
    alter_semitones = int(alter)
    is_microtonal_alter = (alter != alter_semitones)
    alter_string = ''
    if (alter_semitones == (-2)):
        alter_string = 'bb'
    elif (alter_semitones == (-1)):
        alter_string = 'b'
    elif (alter_semitones == 1):
        alter_string = '#'
    elif (alter_semitones == 2):
        alter_string = 'x'
    if is_microtonal_alter:
        alter_string += '    (+microtones)    '
    pitch_string = ((step + alter_string) + octave)
    midi_pitch = self.pitch_to_midi_pitch(step, alter, octave)
    midi_pitch += self.state.transpose
    self.pitch = (pitch_string, midi_pitch)
