Skip to content

Commit

Permalink
add clean score option
Browse files Browse the repository at this point in the history
  • Loading branch information
admin committed Sep 10, 2024
1 parent 61168a3 commit 3f0f45e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def generate_music(
fix_pitch=True,
fix_std=True,
fix_volume=True,
clean_score=False,
):
patchilizer = Patchilizer()
patch_config = GPT2Config(
Expand Down Expand Up @@ -302,7 +303,7 @@ def generate_music(
xml = abc2xml(tunes, f"{outdir}/[{emo}]{timestamp}.musicxml")

audio = xml2(xml, "wav")
if os.path.exists(xml):
if os.path.exists(xml) and clean_score:
os.remove(xml)

if os.path.exists(audio):
Expand Down

0 comments on commit 3f0f45e

Please sign in to comment.