Code Monkey home page Code Monkey logo

Comments (12)

uliska avatar uliska commented on August 19, 2024 1

from ly2video.

aspiers avatar aspiers commented on August 19, 2024

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.

from ly2video.

wbsoft avatar wbsoft commented on August 19, 2024

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

from ly2video.

wbsoft avatar wbsoft commented on August 19, 2024

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.

from ly2video.

wbsoft avatar wbsoft commented on August 19, 2024

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?

from ly2video.

aspiers avatar aspiers commented on August 19, 2024

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

from ly2video.

Stemby avatar Stemby commented on August 19, 2024

This bug report seems to be related to #19.

from ly2video.

mtarenskeen avatar mtarenskeen commented on August 19, 2024

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.

from ly2video.

aspiers avatar aspiers commented on August 19, 2024

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!

from ly2video.

uliska avatar uliska commented on August 19, 2024

from ly2video.

aspiers avatar aspiers commented on August 19, 2024

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

from ly2video.

aspiers avatar aspiers commented on August 19, 2024

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.

from ly2video.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.