Comments (12)
from ly2video.
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.
I will have a look the coming days. Thanks for your prompt reply!
from ly2video.
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.
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.
You probably didn't miss anything - could easily have been due to my ignorance :)
from ly2video.
This bug report seems to be related to #19.
from ly2video.
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.
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.
from ly2video.
@uliska Great idea - maybe you want to open a separate issue in Frescobaldi for that?
from ly2video.
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)
- cli option --videoDef not used HOT 1
- --scroll-notes missing int conversion HOT 1
- New Release? HOT 2
- Error: Failed to parse ly2video line HOT 6
- ERROR: Didn't find any notes HOT 23
- Fonts can be less painful
- beatmaps
- Work better with Windows HOT 4
- Q: Getting Line Breaks into class TimeCode HOT 15
- Replace TiMidity++ with FluidSynth HOT 1
- ly2video.py referenced in readme is not included HOT 1
- PIL is dead and uninstallable from pip HOT 2
- ly2video, is it still usable? HOT 1
- Switch to modern Pillow version HOT 2
- Suggestion: Virtual keyboard HOT 1
- Video frozen for the last part HOT 4
- Dockerfile for ly2video HOT 1
- An AUR dependency does not exist HOT 1
- Support for alpha background HOT 1
- midi file extension not honored / misleading error message HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ly2video.