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
ChordNames break synchronization #16
Comments
I kicked off a thread on
will return |
Moving this to 0.3 due to the available workaround, i.e. exclude the chords from MIDI generation, and hack |
I have an even better solution cooking, thanks to Jan Nieuwenhuizen who I met at FOSDEM and who helped me implement it! It's in the spacetime branch, but not quite there yet. |
We now take a radically different approach to synchronization: rather than brittle heuristics in ly2video, we tweak the .ly source so that LilyPond gives us all the data we need for synchronization. For each grob, it outputs paper positions, timing, and origin within the source file. Then for each moment in which one or more grobs occur, the leftmost grob is used to determine the position at which the video frame will be focused during that moment. This is far more robust, so we no longer require special handling for ties, grace notes, chord names, chords which have note heads on either side of the stem, etc. A big thank-you to Jan for helping with this! Fixes the following issues: #5 - music written with \partial command can cause a lot of bugs #14 - articulate.ly should not have to be disabled #16 - ChordNames break synchronization #23 - \turn breaks synchronization #5 #14 #16 #23
For reference, here's the key Scheme code at the heart of the new algorithm. |
The
ChordNames
context does not have an impact on MIDI rendering in LilyPond, but it does result in multiple note events being rendered as a single text grob (e.g. "Eb-7") whose PDF annotation links back to a location in the.ly
source which looks like a normal note e.g.ef1:m9
, which the tokenizer currently cannot distinguish from a normal note.This makes it almost impossible for the synchronization algorithm to work. It's cleaner just to remove chords from the equation. This can easily be done with the MIDI by creating a separate
\score
which excludes the chords, but they still appear in the PDF.The text was updated successfully, but these errors were encountered: