Jump to content

Musical characters in ABC text...


Recommended Posts

Can any expert ABC user please tell me a fool-proof method for inserting Unicode characters into the

text generated by an ABC file?


I want to insert sharp, flat, natural, and (occasionally) double sharp and double-flat into the w: line(s)

of an ABC file.


The escape sequences given in Guido Gonzato's manual (\201, \202, \203, \204, \205) work for sharp,

flat and natural, but not for double-sharp and double-flat. This is as per ABC standard as far as the

first three go, but unless I missed it, the standard is silent on the subject of double-sharp and double-flat

in text (as opposed to music)


If I use Unicode hex escape sequences (\u266d, \u266e, \u266f, \u2670, \u2671), again, they work

for flat, natural and sharp, but not for double-sharp and double-flat.


I can fudge the whole thing by just using two instances of the appropriate symbol for flat or sharp,

or even just using the nearest keyboard characters ( ##, bb), but it would be nice to do it 'right'.


I'm aware that there are different ways of encoding Unicode character escape sequences, but I am

happy to admit that I do not fully understand how some of these are constructed, and may be using

'incorrect' sequences.


I'm using EasyABC rather than explicitly using any of the abc??? family of programs - that may be the

root cause of the problem?


Any advice appreciated.



Edited by lachenal74693
Link to comment
Share on other sites

3 hours ago, schult said:

[1] I'm no abc expert, so this is probably a silly question, but does it work to just paste the actual characters into a utf-8 encoded file?


[2] Are you certain that the font being used includes the characters in question?

[1] If I've understood the manual and the standard correctly, this is supposed to work. Indeed in GG's manual, 

it is cited as being a 'preferred' method. It works for sharp, flat and natural, but not for double sharp and double flat.


[2] Well now, I've been cutting and pasting the characters direct from the Babelmap utility into the ABC file, or

copying the hex/w.h.y. encoding into the ABC file. It works for sharp, flat and natural, but not for double sharp and

double flat. Maybe I should try changing the font used for the lyric lines as you suggest (as I said, I'm putting

these characters into w: lines in the ABC file).


If it worked for all of 'em, no problem (obviously!). If it didn't work for all 'of 'em, there would be a problem which

would be easier to identify. It's the inconsistency of it working for some of 'em, but not for others which is getting

up my nose. I'm afraid I'm one of the awkward squad - I always have to know...


I'll try your suggestion and try changing the font, though I suspect it's more likely to be something to do with the

way EasyABC interfaces with the underlying program (abcm2ps, I guess - it's supposed to be installed with

Pango support - whatever that means). Or possibly something to do with the GhostScript I have installed...



Edited by lachenal74693
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...