-
Notifications
You must be signed in to change notification settings - Fork 23
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
ERROR: Didn't find any notes #113
Comments
The |
Yeah I've seen the troubleshooting, but it's not helpful in this case. I cut down my file to what I think is a minimum not-working example:
Okay I could have reduced the number of notes to make it more minimal, but I don't think that's the problem. Does anything stand out as obviously not supported? |
I copied the dump-spacetime-info.ly file from /tmp to my test code directory. I modified test.ly to contain: and when I ran lilypond, no errors were generated. The pdf looked normal. There was no output of "spacetime info" that I could see. Looking again at that troubleshooting page, it says there should be output to stdout. I didn't see any when I ran the lilypond command manually. |
I noticed that dump-spacetime-info.ly did not contain entries for DrumStaff or DrumVoice so I added them by copying Voice and Staff:
However, when I run lilypond, it gives this error:
I guess DrumVoice behaves differently than Voice. |
It's years since I worked on this, but looking at dump-spacetime-info.ly, I see it only generates output for |
Unfortunately I don't know anything about lilypond internals. If this isn't something you can fix by some glaring omission, I doubt I'm going to be able to fix it without some hand holding. Is there a reason |
That's the right question but I can't remember - however I do seem to remember it's not hard to find out from the LilyPond reference manual. |
I meant the internals docs not reference. https://lilypond.org/doc/v2.23/Documentation/internals/drum_005fnotes_005fengraver suggests that DrumVoice creates NoteHead grobs. |
Line 1335 in baddaf4
dump-spacetime-info function in the dumper to check.
|
I also hate scheme. I thought it was a waste of time at school and I'm shocked to see something actually written in it!
Can you break down this function call? The error complains about
It doesn't seem to like What function is complaining? |
Well that seems to confirm my suspicion: the code is assuming the grob has a valid |
If you search for "pitch" in https://github.com/aspiers/ly2video/blob/master/TROUBLE-SHOOTING.md you'll see that ly2video relies on pitch for ensuring the video frames are synchronised with the MIDI track. So this needs to work with drums too. However drum notes will still generate MIDI |
Based on the documentation, How do the midi events align with multiple notes played at the same time that are not a chord? |
I think the Line 1335 in baddaf4
https://lilypond.org/doc/v2.23/Documentation/internals-big-page#index-ly_003aevent_002dproperty Can't remember how multiple notes are handled. Note the check for pitch here: Line 1336 in baddaf4
This could be reused to avoid crashing when pitch is missing. |
Still trying to decipher this code:
The first command is format. Does that make a formatted string? The arguments then are printed and reference another variable called pitch. That comes from
and it's described as:
So this is a stream event. The object is
The cause for a grob is:
It seems to me that maybe there needs to be a check on what the cause is. Somehow it needs to be a note event? |
I also came across this tidbit:
Which may indicate that drum-type is a substitute for pitch. Unfortunately I don't know what to do with this information. If I change:
to:
I get an encouraging error:
|
This may seem like a stupid question, but the beatmap doesn't know about pitches. So why are pitches necessary for synchronization? Plodding on, Line 685 in baddaf4
If I patch cli.py to print out midiPitches
So it would seem that If I can stuff those midi note numbers into grobPitchValue somehow, then it would get farther along. The midi map is available in lilypond: But I don't know how to access
but the output is:
which isn't an integer. Do you know a way to convert the output of |
Well I think I made it work and it was surprisingly easy:
combined with my previous inclusion of the DrumVoice and DrumStaff contexts. This could be improved by detecting the drum-type and then conditionally fetching the note directly from the cause or from midiDrumPitches. Though a second mostly duplicate Now cli.py is happy and a video is generated. It mostly works, but as you can see there are some problems. test.mp4These are the same problems I saw running the tests under ly2video/test/regression. input.mp4Namely there's black space to the left of the score, the page is the wrong size, and the cursor doesn't go to the end. |
I've noticed that some other pull requests haven't been integrated yet. Both are related to some initial problems I had getting ly2video installed. Both have merit. One makes the least amount of change, the other does away with having to install unnecessary packages. I'd say bring them both in. That way the github change to https gets captured, but then ly2video moves to less install dependencies which I'm in favour of. I tested the change to mido + drum-support patches with all the regression tests. They all produced videos that seemed okay upon viewing (ignoring the problems I've already mentioned), but I'm not sure what the tests are supposed to look like. The text printed out to the screen is very noisy when running ly2video. I also ran test.py which reported "Ok" after printing a bunch of text. I diffed the output of master vs mido + drum-support and the only difference was that the mido branch ran 0.008s faster. I tested mido + drum-support on a full drum score and it worked as well as could be expected. There are some issues with the video as I mentioned previously, but it created a video where the red bar tracked all the notes (except for the last note). Would you be able to review/merge those other pull requests? And if you can spare some time to review my pull request, I'd like to see it integrated too. |
I'll take a look at those. Did you try messing around with |
I figured out some of the layout issues. One is that Another is that the height defaults to 720px. It used to be that ly2video configured the paper top/bottom margins to 200px, so if your music was only (say) 150px high, the output image would be 550px which was too small to crop into an image with the desired 720px height. In this case ly2video would abort but offer a helpful error about how to use The black space on the left is due to a similar reason, since left/right margins are still hard-coded to 200px. Setting |
Not all of the regression tests contain a lilypond does not complain when there are duplicate '\header' blocks. The last one to appear will override any of those preceding. So it should be simple for ly2video to append a bit of text to the input file? I'll play with |
Yes it could add a |
First time using ly2video. Installation was not straight forward (github doesn't allow git url access any more), but I found a way to get it done. ly2video works on the regression tests, but the output looks wrong. I don't know if that means I have a working installation or not.
I tried an old drum transcription and it failed to generate a video. The sanitised midi plays fine and the sanitised png has what looks like the whole score all in one line.
In the lilypond file I am using a DrumVoice to control line breaks in the pdf, but even if I comment it out the error persists. Not sure how to debug futher.
The --debug flag does not create a local directory (it still goes to /tmp) and despite supplying --keep, some of the temporary files are deleted.
The directory /tmp/ly2videobqt4hcex remains, but /tmp/lilypond-8LIXAW does not. I don't know if that's expected behaviour. There definitely is a bug there and I can report it in a different issue if there is any response to this one.
Back to this issue, here is the output of ly2video:
The text was updated successfully, but these errors were encountered: