pachet commited on
Commit
d654f15
·
1 Parent(s): f783922

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -182,9 +182,9 @@ class HexachordApp:
182
  # notes = [note.Note(n) for n in hexachord_str.split()]
183
  notes = self.build_octave_dependent_notes_from_string(hexachord_str)
184
  if len(notes) != 6 or len(set(notes)) != 6:
185
- return "Please enter exactly 6 unique MIDI note numbers."
186
  except ValueError:
187
- return "Invalid input. Enter 6 MIDI note numbers separated by spaces."
188
  chords = self.generate_chords(notes, itvl)
189
  midi_path = self.create_midi(chords, "base_chords.mid")
190
  score_path = self.generate_svg (midi_path, "score_base_chords.svg")
@@ -201,7 +201,7 @@ class HexachordApp:
201
  hexachord_selector = gr.Dropdown(label="Select Known Hexachord",
202
  choices=self.get_known_hexachords_choice(), value=None, interactive=True)
203
  hexachord_input = gr.Textbox(
204
- label="Enter 6 notes (pitchclass plus octave, separated by spaces)",
205
  value="C D E G A B",
206
  interactive = True
207
  )
@@ -243,8 +243,8 @@ class HexachordApp:
243
  outputs=realization_outputs
244
  )
245
 
246
- with gr.TabItem("Alternative Chord Realizations"):
247
- gr.Markdown("Alternative Chord Realizations")
248
 
249
 
250
  with gr.TabItem("Settings"):
 
182
  # notes = [note.Note(n) for n in hexachord_str.split()]
183
  notes = self.build_octave_dependent_notes_from_string(hexachord_str)
184
  if len(notes) != 6 or len(set(notes)) != 6:
185
+ return "Please enter exactly 6 unique notes."
186
  except ValueError:
187
+ return "Invalid input. Enter 6 notes separated by spaces."
188
  chords = self.generate_chords(notes, itvl)
189
  midi_path = self.create_midi(chords, "base_chords.mid")
190
  score_path = self.generate_svg (midi_path, "score_base_chords.svg")
 
201
  hexachord_selector = gr.Dropdown(label="Select Known Hexachord",
202
  choices=self.get_known_hexachords_choice(), value=None, interactive=True)
203
  hexachord_input = gr.Textbox(
204
+ label="Enter 6 pitchclasses, separated by spaces",
205
  value="C D E G A B",
206
  interactive = True
207
  )
 
243
  outputs=realization_outputs
244
  )
245
 
246
+ with gr.TabItem("Movements"):
247
+ gr.Markdown("Movements")
248
 
249
 
250
  with gr.TabItem("Settings"):