MakeMusic
SmartMusic Finale Garritan MusicXML

SVG and musicXML

Moderator: Michael Good

RE: SVG and musicXML

Postby Paul Mindrup » Wed Aug 21, 2002 2:54 pm

It does seem to be an encoding problem, but I don't know how to solve it. I have Windows 2000, which supports Unicode. Clearly, most of the fonts on my system are unicode - you get a 4-digit number when you look at them in the Character Map accessory application. For example, point at the "A" in the Arial font and the tooltip says "U+0041 : Latin Capital Letter A." When you point at this character in Maestro, it says about this font. I've tried adding the encoding attribute to my XML header tag - I've tried all the encodings that are supported by the Adobe SVG viewer, which are UTF-8, UTF-16, ISO-8859-1, and us-ascii. This seems to have no effect. (Well, actually, when I tried UTF-16, I got the error, "Encoding specified in XML declaration is incorrect," so maybe Adobe is lying.

I'm wondering if I need to convert the font into some other format, and how this might be done (Fontographer?).


Paul


Brian Grainger wrote:
Paul Mindrup wrote:Can you guys tell me why I can't seem to use my Finale music fonts with SVG? They're installed on my system, and all other fonts on my systems seem to appear fine in the Adobe SVG viewer. But all characters of the Jazz Font or Maestro appear as squares - the kind you get when there's no glyph for the character you input. I realize these are not Unicode fonts, but I've tried using ttf2svg to create a def section for my .svg file, but to no avail. Do I need to somehow convert these to a unicode format?

What encoding is your system using? If you're using the wrong encoding you'll get that problem.

Regards, Brian
Paul Mindrup
 
Posts: 16
Joined: March, 2014
Reputation: 0

RE: SVG and musicXML

Postby Brian Grainger » Wed Aug 21, 2002 10:19 pm

Paul Mindrup wrote:Capital Letter A." When you point at this character in Maestro, it says about this font. I've tried adding the encoding attribute to my XML header tag - I've tried all the encodings that are supported by the Adobe SVG viewer, which are UTF-8, UTF-16, ISO-8859-1, and us-ascii.

I'd say the problem is twofold. First, your Maestro font is designed to be understood by Finale, so the glyphs will have whatever index number has been assigned to them by Coda. Second, it sounds like this index falls within the index range of regular ASCII, 0x2E is an ASCII ".".

That's one of the big problems with fonts which are not Unicode compliant. The creator of the font is free to assigned whatever index they want to a particular glyph. If Maestro complied with Unicode, each glyph would be required to use its defined index number. You can see how this creates problems for a public domain MusicXML/SVG converter. Even if someone is licensed to use a Finale or Sibelius font on their personal system, the SVG converter has no way of knowing which index number to use for any particular glyph. As an example, a quarter note might be index 0x36 in a Finale font, but 0x82 in Sibelius. And there's no guarantee that different fonts even from the same company will use the same glyph indexing scheme. That's why Unicode-standard fonts are so important.

What I would suggest is that you determine the index for each of the glyphs in your Maestro font. Then declare your SVG as UTF-8, and when you want to call a glyph, encode it's index in the standard format for XML - eg 0x2E in UTF-8 XML is \u002E.

Regards, Brian
Brian Grainger
 
Posts: 111
Joined: March, 2014
Reputation: 0

RE: SVG and musicXML

Postby Brian Grainger » Wed Aug 21, 2002 10:24 pm

Paul Mindrup wrote:Thanks for your help. I had tried the Batik converter, which, as you said, doesn't work. I was able to duplicate your success with WebDraw

Actually, the Batik converter work very well, it just has an undocumented
'feature' that you have to give it the correct index range for the glyphs, which means you have to figure that out first with another program which can analyze TrueType fonts.

Paul Mindrup wrote:(a very interesting program) - but I hate to think this is necessary - it added massive amounts of text to my .SVG file when I just used one character.

Just extract the glyph definition you need, you can tell by the index number. Keep in mind that the Adobe SVG viewer doesn't support external font definitions. They must be defined in the same SVG file in which they're used. A serious oversite in my opinion, but we'll have to wait for the next version to see if that's corrected.

Regards, Brian
Brian Grainger
 
Posts: 111
Joined: March, 2014
Reputation: 0

RE: SVG and musicXML

Postby Michael Good » Thu Aug 22, 2002 1:09 pm

Regarding music fonts and SVG:

While many of Maestro's glyphs are in the ASCII space, many are up in the ISO-8859-1 space. These are represented by a single 8-bit byte in ISO-8859-1, but as a multiple-byte sequence in UTF-8. So make sure that your XML encoding matches the real encoding of your file format. In Windows 2000, Notepad gives you an option to specifically save in UTF-8. But other programs may not be Unicode aware, in which case using iso-8859-1, windows-1252, or something similar may be needed.

The main problem appears to be the way that SVG viewers are handling fonts. From reading about SVG, I would think something like this would work:

<text x="10" y="10"
font-family="Maestro, Petrucci, Jazz, fantasy"
font-size="24pt">q</text>

But when I tried this with Adobe's SVG Viewer 3.0, I got the same problem that Paul saw. Paul, please let us know if following Brian's advice here works for you.

Unicode is a great thing, but I think there is still going to be a need for non-standard symbol fonts (e.g., the "fantasy" font-family in CSS). The Unicode musical symbols are a great start, but I don't believe they include all the elements that you find in combining Finale's different fonts (Maestro, Jazz, Engraver), for instance.

Regards, Michael
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

RE: SVG and musicXML

Postby Paul Mindrup » Thu Aug 22, 2002 8:41 pm

OK, I've solved the mystery. For the Batik converter to work with ASCII-only fonts like Jazz and Maestro, you must specify the -ascii flag.

Before I did so, all it produced was a <defs> element, no matter what other arguments I used. Not knowing any better, I thought this was normal. I guess I somehow thought this definition just assisted the SVG viewer in interpreting an existing font, either through the normal system font mechanism or by peeking directly into the Jazz____.ttf file, which I had in the same directory. That's why I was surprised that the output of WebDraw was so verbose, because I didn't realize ttf2svg does the same thing when used properly.

So my example is working now. This certainly has been educational. For one, I learned that it is indeed a pain in the *** that the Adobe viewer doesn't accept external font definitions.

I still think this wouldn't be necessary if I could convert these fonts into Unicode fonts. And even if there's not an official standard, there must be *some* kind of standardization among existing musical fonts, because I can do a search and replace in Finale from one font to another, and I still get a legible score.

Thanks for everyone's help.


Paul Mindrup
Paul Mindrup
 
Posts: 16
Joined: March, 2014
Reputation: 0

RE: SVG and musicXML

Postby Michael Good » Thu Aug 22, 2002 9:30 pm

Hi Paul,

Glad to hear it's working! If it is not too long, would you mind posting a short example of a Batik-friendly SVG file for music?

Note that Western musical symbols were added in Unicode 3.1 - and in a character set range that goes beyond what was used in previous versions of Unicode. So while Unicode may help in the long term, in the short term you will have the problem of programs understanding Unicode 3.0 but not Unicode 3.1. Microsoft's big "Arial Unicode MS" font, the one non-music font I have that includes the sharp, flat, and natural symbols from earlier Unicode definitions, does not make it up to Unicode 3.1 characters yet.

Coda's Maestro, Petrucci, and Jazz fonts certainly have some standardization to make Finale's life easier. And Opus seems to have followed along in many cases. But don't get too carried away - for example, the accent/tenuto mark that is at 0x92 in Jazz is at 0x8A in Maestro (0x92 in Maestro is the flag for an upstem sixteenth note). You can look at the fonts in Character Map to see the differences.

Somebody once sent me an Excel spreadsheet of different fonts in different encodings. I can look for it, but it's pretty easy to assemble yourself. Keep the text character the same in each column, but change the font in each column to each music font on your computer that you want to compare.

Thanks for keeping us posted on your progress.

Regards, Michael
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

Re: SVG and musicXML

Postby Jane Singer » Sun Oct 27, 2002 2:21 pm

A while back I was following the discussion on glyphs and fonts in SVG.

Brian kindly sent me a set of (unicode) glyphs to try out. These worked fine, except that I couldn't find any flags. In the meantime I was busy with other things. The subsequent discussions seemed to focus on very esoteric symbols, none of which I need right now.

My question is, is there presently a solution for basic notation - whole notes (ok, I'll admit it, I have some breves) to thirty-second notes on a single treble cleff staff (with a few leger lines)? Including flags? (I'll have to create the beams myself.)

I need to find a solution quickly to notate the output of my thesis data. The notation is simple, they are all single-line incipits of vocal in treble cleff. (I will be adding graphical representations under the staff, but this is no problem.)

Any suggestions? Any help most appreciatively accepted.

Jane
Jane Singer
 
Posts: 27
Joined: March, 2014
Reputation: 0

Re: SVG and musicXML

Postby Brian Grainger » Sun Oct 27, 2002 2:44 pm

Jane Singer wrote:My question is, is there presently a solution for basic notation - whole notes (ok, I'll admit it, I have some breves) to thirty-second notes on a single treble cleff staff (with a few leger lines)? Including flags? (I'll have to create the beams myself.)

I'm not aware of any Unicode set of SVG musical glyphs being available yet. The only thing I can think of would be to use the public-domain TTF font set I have as the cut-and-paste basis for a new font set, and then convert that new font set to SVG with the Batik converter. There are some shareware font editors available, but it would still be a bit of work.

At least with SVG you don't need a glyph set for each note of the scale. You just use one glyph and position it wherever you want on the staff. Hint- make sure the hole in the whole and half notes is styled as transparent in your stylesheet. Otherwise it covers up the staff line behind it.

Let me know if you'd like a copy of the public-domain font. After all that work on your thesis, it must be a pain to stumble on something as simple as marking up your examples. The devil is always in the details.

TTYL Brian
Brian Grainger
 
Posts: 111
Joined: March, 2014
Reputation: 0

Re: SVG and musicXML

Postby Neil Jennings » Sun Oct 27, 2002 3:56 pm

Try my program HARMONY. It doesn't yet support XML, but may do what you need. By the way, it automatically creates the beams. Neil Jennings see www.greenhedges.com for a download.

Date: 27 October 2002 19:24


Jane Singer wrote:A while back I was following the discussion on glyphs and fonts in SVG.

Brian kindly sent me a set of (unicode) glyphs to try out. These worked fine, except that I couldn't find any flags. In the meantime I was busy with other things. The subsequent discussions seemed to focus on very esoteric symbols, none of which I need right now.

My question is, is there presently a solution for basic notation - whole notes (ok, I'll admit it, I have some breves) to thirty-second notes on a single treble cleff staff (with a few leger lines)? Including flags? (I'll have to create the beams myself.)

I need to find a solution quickly to notate the output of my thesis data. The notation is simple, they are all single-line incipits of vocal in treble cleff. (I will be adding graphical representations under the staff, but this is no problem.)

Any suggestions? Any help most appreciatively accepted.

Jane
Neil Jennings
 
Posts: 16
Joined: March, 2014
Reputation: 0

Previous

Who is online

Users browsing this forum: No registered users and 2 guests

cron