Using SVG for a Playing Technique doesn't respect expected size

Hello everyone,

I need to create this kind of notation:

I have already worked on similar things in Dorico in the past so I proceeded like this:

  1. imported this single page from the PDF of the manuscript into the vector-drawing program I use (Illustrator). Locked the image into a separate “template” layer with 50% opacity and created a new layer above that to freely draw above it.
  2. added the notehead glyph from the publisher’s custom font (but it could’ve been Bravura without issues). Created outlines from this glyph to prevent text editing and allow vector resizing.
  3. drew the line using the Curvature tool (Pen tool works just as well). Grouped the notehead and the line together and exported the result as an SVG. Again, I’ve done this hundreds of times in the past successfully.

From within Dorico, I created a new Playing Technique with this SVG as a Graphic. Upon placing it in the score and positioning at the correct rhythmic position I got this:

Clearly too small and too short.

Thinking of it as an issue with the size of the drawing I exported this page as a PDF from Dorico, placed it in Illustrator in another artboard and resized the SVGs to be of the correct size before exporting them again.

In Dorico, I deleted the previous playing technique and created a new one with the new SVG. Same result as above. Here are the two SVGs if you want to try things out:

SVGs.zip (3.3 KB)

I cannot share the Dorico file, too many proprietary elements inside. You can use this mockup project to play with it.

SVG Playing Techniques.dorico (472.0 KB)

The two playing techniques used at the moment are called “custom 1” and “custom 2”. Also, more questions:

  1. why are they centred on the notehead when their design seems to start from coordinates 0, 0?
  2. why the SVG for “custom 2” seems to have some left padding? It doesn’t have it in Illustrator.

If this cannot be made to work I can just draw things afterwards and place them in InDesign but the editor expressly asked me to do everything possible in Dorico. Since this used to be possible for me, I am failing to understand why this is not working now.

I hope you have all the elements and files to test, reproduce, and provide feedback. If not, please shout out and I will promptly react!

Thank you so much!

It might be easier to create a graphic frame. As a last step.

Jesper

1 Like

As a last step I could do that for sure but this means that I will have to repeat that for parts, while Playing Techniques work well in both contexts.

Yes, that’s a bummer. What if you just rescale the playing techniques in the editor?

Jesper

Or custom scale it.

1 Like

Done also that.

Since it scales proportionally, as soon as I get the proper length the line is either too thick or the notehead is too big.

Yes, a PITA.

I guess you have to make the line longer in Illustrator, then.

Jesper

BTW, I never figured out how to get the correct sizes for glyphs and lines from graphic programs.

1 Like

I would be more interested in understanding why a line drawn on an A3 sheet placed in Illustrator at the correct size (297x420) then doesn’t import at the correct size in Dorico.

I can create a longer line, but the import scale seems to be the problem. Look at how small the notehead is. What is the point of drawing a line at the correct size if then it doesn’t import well?

Even if I change the scale in the Playing Technique editor, say 150 to 200%, then either the notehead is too big or the line is too thick. It kind of never gets right! The thickness of the line is as I want it to be in Illustrator. So the problem must be somewhere in the import process. But where?

Wish I knew.

Jesper

This is the size from opening the SVG in a text editor.

Jesper

image

Are these points, mm or what unit?

With the page being 297mm wide, I doubt they are mm …

Points, I think.

Jesper

Opened in Affinity.

Here is the Dorico page in the Illustrator file with the selected graphic.

Point size is similar to yours and it translates to ~100mm, which makes perfect sense.

Now, why would a 100mm wide SVG imported in a Playing Technique at 100% size result in something that is ~60% the original size?

For some reason, it seems to depend on the rastral size. With a space size of 1.76 mm (approx. rastral size 3), the SVG appears to be imported at a 1:1 scale. However, at a space size of 1.00 mm, it scales down to roughly 56.8%.


To make it fit, you would need to upscale your original SVG by about 180%. The downside is that this will likely cause issues in the parts, assuming you use a different rastral size there. I’m not sure if this is by design or a bug.

Regarding the centered placement: If you need it positioned specifically at the notehead, you should design a horizontal line using your SVG.

3 Likes

Thanks @es560, good to know.

Jesper

Technically, they’re pixels – screen dots. Standard screen resolution, though, is 72ppi, which makes them equivalent to points at that resolution.

2 Likes

Very … VERY … interesting! Excellent diagnosis! So it is as if this was a “staff-relative” sized object. This makes sense because Playing Techniques have their size “staff-relative”.

I have indeed scaled one of the two to 170% and the other to 180% but it causes issues with the notehead so I will eventually separate the notehead and the line.

Yes, parts will use 7 mm staves but, in there, those PTs will be hidden and added back directly in InDesign. There is only so much time in one’s life!

If this follows the rules of Playing Techniques, then it may be by design, but I will gladly hear what the devs have to say on this.

Not 100% sure I understand: how do you use an SVG within a custom horizontal line? Asking because I tried and found no way to do that!

Thanks for all this great help!

Correct but, at least on the Adobe communities Illustrator forum, it seems that a recent update to the SVG standard brought that to 96 ppi, breaking a whole lot of things!

Down in the weeds, but I think there hasn’t been a change to the SVG spec since 2018, although there was a draft revision published last year. In any case, the conversion of pixels to a fixed measurement like points/inches/mm isn’t part of the SVG spec; it has to do with the CSS spec.

(And I was wrong here – the CSS spec says 96ppi. 72ppi is an older “standard” that was stuck in my head. My InDesign CS5.5 – yes, I know, quite old – uses 72ppi.)

1 Like

Well, this is good to know because I had initially thought this was a quite recent change. Things had been working quite well for me and SVGs in the last year or so but then I realised that I had been using Sibelius for that. In there, you just insert the SVG and resize at will (but still, they are not affected by rastral sizes).

In the line annotation editor, if you select the Music Symbol category and then create a new annotation, you’ll see that the editor looks a lot like the playing technique editor – it has Glyph, Text, and Graphic tabs.

1 Like