def preprocess_midi(path): note_seq = NoteSeq.from_drum_midi_file(path)#get note note_seq.adjust_time(-note_seq.notes[0].start)# change offset of note seq event_seq = EventSeq.from_note_seq(note_seq) control_seq = ControlSeq.from_event_seq(event_seq) return event_seq.to_array(), control_seq.to_compressed_array()
def preprocess_midi(path): note_seq = NoteSeq.from_midi_file(path) note_seq.adjust_time(-note_seq.notes[0].start) event_seq = EventSeq.from_note_seq(note_seq) control_seq = ControlSeq.from_event_seq(event_seq) return event_seq.to_array(), control_seq.to_compressed_array()