def get_end_time(self):
        # Cycle through all notes from all instruments and find the largest
        events = ([n.end for i in self.instruments for n in i.notes] +
                  [b.time for i in self.instruments for b in i.pitch_bends])
        # If there are no events, return 0
        if len(events) == 0:
            return 0.
        else:
            return max(events)
Returns the time of the end of this MIDI file (latest note-off event).
dataset/ETHPy150Open craffel/pretty-midi/pretty_midi/pretty_midi.py/PrettyMIDI.get_end_time