File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -547,7 +547,6 @@ def _truncate_seq(
547
547
return res
548
548
549
549
550
- # TODO: Add detection for pedal messages which occur before notes are played
551
550
def _process_silent_intervals (
552
551
seq : List ,
553
552
intervals : List ,
@@ -826,6 +825,7 @@ def _save_seq(_seq: List, _save_path: str):
826
825
tokenized_seq = _seq ,
827
826
len_ms = last_onset ,
828
827
)
828
+ mid_dict .remove_redundant_pedals ()
829
829
mid = mid_dict .to_midi ()
830
830
mid .save (_save_path )
831
831
except Exception as e :
@@ -1027,6 +1027,10 @@ def batch_transcribe(
1027
1027
):
1028
1028
file_queue .put (file_to_process )
1029
1029
1030
+ # If only processing one file, add even if save file exists
1031
+ if len (files_to_process ) == 1 :
1032
+ file_queue .put (files_to_process [0 ])
1033
+
1030
1034
logger .info (
1031
1035
f"Files to process: { file_queue .qsize ()} /{ len (files_to_process )} "
1032
1036
)
You can’t perform that action at this time.
0 commit comments