def trim_trailing_silence ( self ) : length = self . get_active_length ( ) self . pianoroll = self . pianoroll [ : length ]
python remove pause in audio
Trim the trailing silence of the pianoroll .
def trim_trailing_silence(self):
        """Trim the trailing silence of the pianoroll."""
        length = self.get_active_length()
        self.pianoroll = self.pianoroll[:length]