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

ly2video uses old version of ly module; conflicts with python-ly package #56

Closed
wbsoft opened this issue Mar 20, 2015 · 12 comments
Closed

Comments

@wbsoft
Copy link

wbsoft commented Mar 20, 2015

When ly2video is installed, the toplevel ly Python package conflicts with the ly module of the python-ly package. That package in turn, is needed to run Frescobaldi. I decided to make ly a standalone package so other tools (such as ly2video) can use it as well.

ly2video is using an old version of the same ly module, and probably could be changed so it depends on the python-ly package. The ly parser has improved since then and is maintained very well. I am willing to investigate the effort needed to use the parser from the newer ly module, from the python-ly package. And I can help making the changes. When that is done, python-ly becomes a dependency of ly2video.

An easier solution could be to move the ly module in ly2video to a private space or another name, such as ly2v.ly or ly2vly.

@aspiers
Copy link
Owner

aspiers commented Mar 20, 2015

Thanks a lot for the information and the offer to help fix this! I would love to see this fixed - please do investigate the effort involved and let me know what you find :) If it's not easy and quick to do then I agree that renaming ly to ly2vly or similar is a good short-term workaround.

@wbsoft
Copy link
Author

wbsoft commented Mar 20, 2015

I will have a look the coming days. Thanks for your prompt reply!

@wbsoft
Copy link
Author

wbsoft commented Mar 22, 2015

If I understand correctly, you are using ly to get the pitches of the source document, mapped to their location in the source document. You are using the changes that are recorded when performing a relative-to-absolute conversion to get the real pitch.

In the (much improved) structure of python-ly package, a LilyPond source file is now represented by a ly.document.Document (automatically tokenized), and you can register ly.document.Cursor instances to point to a certain position. Then you can perform a thing like relative-to-absolute to the Document. Although the document changes, the Cursors still point to the correct locations. The ly.document module is very mature and stable.

So I will try to take the following approach: I will load the LilyPond file using ly.document. I will make Cursors for every Pitch in the document, mapped to their current location. Then run ly.pitch.rel2abs on the document. All cursors now point to the possibly changed pitch. Then we map the pitch values to the original (line, column) locations.

@wbsoft
Copy link
Author

wbsoft commented Mar 22, 2015

By the way, do you know that LilyPond also makes the pitch absolute when reading a music expression? If I analize a (make-music 'RelativeOctaveMusic) construct, it seems that the octaves are already converted to their absolute value. So you could get them from LilyPond as well.... or do I miss something?

@aspiers
Copy link
Owner

aspiers commented Mar 22, 2015

You probably didn't miss anything - could easily have been due to my ignorance :)

@Stemby
Copy link
Contributor

Stemby commented Mar 27, 2015

This bug report seems to be related to #19.

@mtarenskeen
Copy link

I wanted to report this today, but it seems it's a known issue. Hope there will be a fix soon, and the result will be easy way to install ly2video, even when, or especially when, Frescobaldi and python-ly are already installed on my system. I can even imagine ly2video could be an interesting plugin, integrated in Frescobaldi, that could be called by selecting it from Frescobaldi's File->Export menu. Anyway, glad to see things happening with the development of this project again.

@aspiers
Copy link
Owner

aspiers commented Apr 20, 2017

Hi again @wbsoft, I would love to see ly2video switch to using this stable library in the manner you suggest. Clearly that's a far superior approach to relying on some old code which IIRC is frankenstein parts stolen from an old version of Frescobaldi. Please let me know if you are able to help with this!

@uliska
Copy link

uliska commented Apr 20, 2017 via email

@aspiers
Copy link
Owner

aspiers commented Apr 20, 2017

@uliska Great idea - maybe you want to open a separate issue in Frescobaldi for that?

@uliska
Copy link

uliska commented Apr 20, 2017 via email

@aspiers aspiers closed this as completed in 1ed2489 Sep 3, 2017
@aspiers aspiers reopened this Sep 3, 2017
@aspiers
Copy link
Owner

aspiers commented Sep 3, 2017

So this should no longer clash with an install of python-ly. The final step will be to switch ly2video from using its own ancient version of Frescobaldi's ly library to using a modern python-ly. That is being tracked in #19 so I think I can close this.

@aspiers aspiers closed this as completed Sep 3, 2017
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

5 participants