asigalov61
commited on
Commit
•
a47f748
1
Parent(s):
7e73b3d
Update app.py
Browse files
app.py
CHANGED
@@ -129,8 +129,8 @@ def render_midi(input_midi, render_type, soundfont_bank, render_sample_rate, cus
|
|
129 |
f.write(fdata)
|
130 |
f.close()
|
131 |
|
132 |
-
if soundfont_bank in ["General MIDI", "Nice strings plus orchestra", "Real choir", "Super Game Boy"]:
|
133 |
-
sf2bank = ["General MIDI", "Nice strings plus orchestra", "Real choir", "Super Game Boy"].index(soundfont_bank)
|
134 |
|
135 |
else:
|
136 |
sf2bank = 0
|
@@ -190,7 +190,7 @@ if __name__ == "__main__":
|
|
190 |
print('App start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
191 |
print('=' * 70)
|
192 |
|
193 |
-
soundfonts = ["SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2", "Nice-Strings-PlusOrchestra-v1.6.sf2", "KBH-Real-Choir-V2.5.sf2", "SuperGameBoy.sf2"]
|
194 |
|
195 |
app = gr.Blocks()
|
196 |
with app:
|
@@ -212,7 +212,7 @@ if __name__ == "__main__":
|
|
212 |
|
213 |
gr.Markdown("## Select desired render options")
|
214 |
|
215 |
-
soundfont_bank = gr.Radio(["General MIDI", "Nice strings plus orchestra", "Real choir", "Super Game Boy"], label="SoundFont bank", value="General MIDI")
|
216 |
|
217 |
render_sample_rate = gr.Radio(["16000", "32000", "44100"], label="MIDI audio render sample rate", value="16000")
|
218 |
|
|
|
129 |
f.write(fdata)
|
130 |
f.close()
|
131 |
|
132 |
+
if soundfont_bank in ["General MIDI", "Nice strings plus orchestra", "Real choir", "Orpheus", "Super Game Boy"]:
|
133 |
+
sf2bank = ["General MIDI", "Nice strings plus orchestra", "Real choir", "Orpheus", "Super Game Boy"].index(soundfont_bank)
|
134 |
|
135 |
else:
|
136 |
sf2bank = 0
|
|
|
190 |
print('App start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
191 |
print('=' * 70)
|
192 |
|
193 |
+
soundfonts = ["SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2", "Nice-Strings-PlusOrchestra-v1.6.sf2", "KBH-Real-Choir-V2.5.sf2", "Orpheus_18.06.2020.sf2", "SuperGameBoy.sf2"]
|
194 |
|
195 |
app = gr.Blocks()
|
196 |
with app:
|
|
|
212 |
|
213 |
gr.Markdown("## Select desired render options")
|
214 |
|
215 |
+
soundfont_bank = gr.Radio(["General MIDI", "Nice strings plus orchestra", "Real choir", "Orpheus", "Super Game Boy"], label="SoundFont bank", value="General MIDI")
|
216 |
|
217 |
render_sample_rate = gr.Radio(["16000", "32000", "44100"], label="MIDI audio render sample rate", value="16000")
|
218 |
|