asigalov61 commited on
Commit
6fade3e
·
verified ·
1 Parent(s): bfd9f77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -127,9 +127,15 @@ def GenerateMIDI(num_tok, idrums, iinstr, input_align):
127
 
128
  output.append(event)
129
 
130
- if input_align:
131
  output = TMIDIX.align_escore_notes_to_bars(output)
132
 
 
 
 
 
 
 
133
  detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output,
134
  output_signature = 'Allegro Music Transformer',
135
  output_file_name = 'Allegro-Music-Transformer-Composition',
 
127
 
128
  output.append(event)
129
 
130
+ if input_align == "Start Times":
131
  output = TMIDIX.align_escore_notes_to_bars(output)
132
 
133
+ elif input_align == "Start Times and Durations":
134
+ output = TMIDIX.align_escore_notes_to_bars(output, trim_durations=True)
135
+
136
+ elif input_align == "Start Times and Split Durations":
137
+ output = TMIDIX.align_escore_notes_to_bars(output, split_durations=True)
138
+
139
  detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output,
140
  output_signature = 'Allegro Music Transformer',
141
  output_file_name = 'Allegro-Music-Transformer-Composition',