'Parse the MusicXML <direction> element.'

def _parse_direction(self, xml_direction):

    for child in xml_direction:
        if (child.tag == 'sound'):
            if (child.get('tempo') is not None):
                tempo = Tempo(self.state, child)
                self.tempos.append(tempo)
                self.state.qpm = tempo.qpm
                self.state.seconds_per_quarter = (60 / self.state.qpm)
                if (child.get('dynamics') is not None):
                    self.state.velocity = int(child.get('dynamics'))
