lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding images into a score created with -dbackend=svg


From: Paolo Prete
Subject: Re: Embedding images into a score created with -dbackend=svg
Date: Sat, 27 Nov 2021 12:28:32 +0100



On Sat, Nov 27, 2021 at 3:51 AM Valentin Petzel <valentin@petzel.at> wrote:
Hello Paolo,

The viewer needs to rasterize the svg, how else is it supposed to display it?
Also it’s not you who is supposed to add the image tag, but the svg backend.


Hello Valentin,

This is not what I meant. SVG embedded into an <image> tag gets rasterized regardless of its vector nature, thus producing a blurry or pixeled image after some transforms are done. Look at the blurry image of the fiddle inside the link of my previous message:

https://jsfiddle.net/godawnpL/

The embedded svg file is managed as a raster image and this is unwanted (then it's preferrable to inline the svg tree)

If you want to have a score in some markup, just do
\markup { bla bla bla \score{ ... } bla bla }


And this is the answer I really required! Thanks!! I got crazy in the past days trying to create a markup with a fragment of score, and I did not know that this was possible (and so simple). I sent a message to the ml ( https://lists.gnu.org/archive/html/lilypond-user/2021-11/msg00489.html ) about the problem, few days ago, but did not get an answer with a working solution for it. Thanks again.


There is nothing on this example page
that would require importing anything.[
 
And the problem with your approach of turning an svg into a Lilypond path is
than the lilypond drawing commands are significantly less powerful than SVG.
So you cannot process all graphics files using your method.

 
Yes and no. I still think it's necessary for what I have to do. I have to create notes for contemporary scores, where it is very easy to have images around the fragment of the staff, in addition to the notes. Therefore I need a tool for making this kind of notes, where the "score" part is, let's say, 50%. Think for example at clarinet or flute scores, where multiphonics or special sounds together with special fingerings have to be used. Normally, an image of the instrument + fingerings + other special symbols has to be attached both in the score and into the notes on the initial pages. Of course there are some prebuilt objects for this ( https://lilypond.org/doc/v2.22/Documentation/notation/woodwind-diagrams ), but I think it's much better to have a tool for making your custom images, because the shape of these symbols much depend on your particular score, there's not a shared standard. And these images require paths and nothing else, they are pretty simple: therefore the set of commands provided by LP cover completely their concrete drawing on SVG. Just pick a raster image as a model, then draw paths above its shape with Inkscape, then convert these paths to LP paths. Then my notes Will be a mixture of a \score part, as you suggested, and a "path" part made with the procedure I explained. 

Best,
Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]