asigalov61 commited on
Commit
d7dbf57
·
verified ·
1 Parent(s): 8c321c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -14
app.py CHANGED
@@ -125,9 +125,10 @@ print('=' * 70)
125
 
126
  #====================================================================================
127
 
128
- def Generate_POP_Section(input_parsons_code,
129
- input_first_note_duration,
130
- iinput_first_note_MIDI_pitch
 
131
  ):
132
 
133
  print('=' * 70)
@@ -137,17 +138,15 @@ def Generate_POP_Section(input_parsons_code,
137
  print('=' * 70)
138
  print('Requested settings:')
139
  print('-' * 70)
140
- print('Parsons code:', input_parsons_code)
141
- print('First note duration:', input_first_note_duration)
142
- print('First note MIDI pitch:', iinput_first_note_MIDI_pitch)
 
143
  print('=' * 70)
144
 
145
  #===============================================================================
146
 
147
-
148
- #===============================================================================
149
-
150
- print('Generating melody...')
151
 
152
  # seq = [916] + [part_tok+512, mode_time(score)+532, mode_dur(score)+660, mode_pitch(score)+788]
153
 
@@ -289,13 +288,13 @@ if __name__ == "__main__":
289
 
290
  gr.Markdown("## Select POP composition section to generate:")
291
 
292
- input_comp_section = gr.Dropdown(sections_dict + ['random'], label="Composition section", value='intro')
293
 
294
  gr.Markdown("## Select generation options:")
295
 
296
- input_mode_time = gr.Slider(0, 127, value=10, step=1, label="Composition mode time")
297
- input_mode_dur = gr.Slider(0, 127, value=15, step=1, label="Composition mode dur")
298
- input_mode_ptc = gr.Slider(0, 127, value=60, step=1, label="Composition mode pitch")
299
 
300
  run_btn = gr.Button("Generate", variant="primary")
301
 
 
125
 
126
  #====================================================================================
127
 
128
+ def Generate_POP_Section(input_comp_section,
129
+ input_mode_time,
130
+ input_mode_dur,
131
+ input_mode_ptc
132
  ):
133
 
134
  print('=' * 70)
 
138
  print('=' * 70)
139
  print('Requested settings:')
140
  print('-' * 70)
141
+ print('Composition section:', input_comp_section)
142
+ print('Mode time:', input_mode_time)
143
+ print('Mode duration:', input_mode_dur)
144
+ print('Mode pitch:', input_mode_ptc)
145
  print('=' * 70)
146
 
147
  #===============================================================================
148
 
149
+ print('Generating...')
 
 
 
150
 
151
  # seq = [916] + [part_tok+512, mode_time(score)+532, mode_dur(score)+660, mode_pitch(score)+788]
152
 
 
288
 
289
  gr.Markdown("## Select POP composition section to generate:")
290
 
291
+ input_comp_section = gr.Dropdown(sections_dict + ['random'], label="Composition section", value='random')
292
 
293
  gr.Markdown("## Select generation options:")
294
 
295
+ input_mode_time = gr.Slider(0, 127, value=0, step=1, label="Composition mode time")
296
+ input_mode_dur = gr.Slider(0, 127, value=0, step=1, label="Composition mode dur")
297
+ input_mode_ptc = gr.Slider(0, 127, value=0, step=1, label="Composition mode pitch")
298
 
299
  run_btn = gr.Button("Generate", variant="primary")
300