Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

midi file extension not honored / misleading error message #99

Open
diovudau opened this issue May 12, 2021 · 2 comments
Open

midi file extension not honored / misleading error message #99

diovudau opened this issue May 12, 2021 · 2 comments

Comments

@diovudau
Copy link

I tried out ly2video with a lilypond file where I set the midi file extension to the standard .mid
#(ly:set-option 'midi-extension "mid")

ly2video is looking for .midi hardcoded so cli.py:1565 gave me the error "Failed to generate MIDI file".

Maybe ly2video could parse for that Scheme command, or at least rewrite the error message to inform the user of exactly which file it is looking for, and not assume that the midi file was not generated. For example instead of showing sanitisedLyFileName, show midiPath so one can check themselves.

@aspiers
Copy link
Owner

aspiers commented May 15, 2021

Good catch; thanks for the report. I'd be happy to accept a PR adding a naive parse for that command. Although to do it properly would require a full understanding of Scheme syntax, which realistically is just not gonna happen in this project, unfortunately.

I agree that improving the error message would be an easy and sensible first step towards handling this better. Again I'd be very happy to accept a PR doing this.

@jstma
Copy link

jstma commented Dec 8, 2023

I think a better solution to this problem is to set the extension back to midi before running lilypond. Since the user doesn't see these files, it shouldn't be an issue for them.

    fSanitisedLyFile.write("#(ly:set-option 'midi-extension \"midi\")")
    fSanitisedLyFile.close()

I tested this and it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants