def set_tempo(self, bpm):
        """Convert the bpm to a midi event and write it to the track_data."""
        self.bpm = bpm
        self.track_data += self.set_tempo_event(self.bpm)
Convert the bpm to a midi event and write it to the track_data.