Jump to content

ABC Transcription Tools


Michael Eskin

Recommended Posts

If you put a curly style quote in the ABC, it will render as such:


Looking at the thesession.org tune library, most of the tunes that have curly quotes in the name appear to have standard single quotes in the ABC posted.  As I said, my tool will just render whatever is there.

Here's a typical entry on thesession.org showing a curly quote in the page title but a standard single quote in the ABC made available on the site. 

Copy and pasting a bunch of tunes from the site is a very common way folks build a starting point for tunebooks with my tool.

I copied out the ABC from the site as-is and replaced the standard single quote with a curly one and pasted in into my tool.

You see that the curly quote renders properly and is present in the PDF output. 

I'll just leave it to users to decide what they want.

image.thumb.png.b4e1671add3382f2787471500a4ba760.png

image.thumb.png.b0901cecbf8938ad5a9d01dd264c9315.png

image.thumb.png.21170fe9c99375c3dd45230944da6abb.png

Edited by eskin
Link to comment
Share on other sites

@David Barnert Another thing I just realized about using a URL shortener is that if I'm using their API to do the shortening, it will most likely require an API key. 

All my code runs entirely client-side in the browser.  It would mean embedding the API key in the client code itself, which is a very bad idea indeed.

Typically, when I'm doing work that requires API key access to a service, I stand up a little Node.js based server in an Azure AKS cluster and only the server-side code has the API key, it's never exposed to the client.

In this case, I want users to be able to download the .zip of the source tree from GitHub, unzip and launch the abctools.html file and be able to use the tool with no dependency on any other service.

Everything will work other than share links (they require an actual URL), for that they'd have to put the same source tree up on their own web server.

 




 

Link to comment
Share on other sites

4 hours ago, eskin said:

If you put a curly style quote in the ABC, it will render as such

 

Thanks. I guess it’s easy enough to do a global find-and-replace to change ' to ’ in the file before pasting it into your site.

 

3 hours ago, eskin said:

All my code runs entirely client-side in the browser.  It would mean embedding the API key in the client code itself, which is a very bad idea indeed.

 

Fair enough.

Link to comment
Share on other sites

I haven't tried this linking to toc and index yet, but it occurs to me that it might make 'sense' to use '<<' to point back to the toc, and '>>' to point forward to the index? It's a purely 'cosmetic' change, but just a thought...

_____________

Two-way links like this are something have tried (and failed) to achieve in any sensible way in my own (non-music) documents...

Edited by lachenal74693
Link to comment
Share on other sites

I assume we're referring to the 'apostrophe' in a title, or lyrics, not the one which changes the pitch of a note?

 

I bet 'curly quotes' -  'right single apostrophes' - on sites like the Session often originated in Windows' programs like Word which substitutes them. This often resulted  in undisplayable characters on  websites which did not specify Unicode, though it's less of a problem these days. Some people may prefer ABC to be in ASCII for compatibilty with ancient software.

 

This piece argues that you should - sometimes - use the Unicode 'modified letter aposthophe' instead.

https://tedclancy.wordpress.com/2015/06/03/which-unicode-character-should-represent-the-english-apostrophe-and-why-the-unicode-committee-is-very-wrong/

 

If I were you, Michael, I'd leave them alone!.

 

 

 

Link to comment
Share on other sites

I kind of like the idea of having << on the left going back to the TOC (if requested) and >> on the right to go to the index (if requested). Would be easy to do in a future version, probably could get it working in a couple of hours. The linkback feature was suggested by a user on Facebook, he just wanted a TOC linkback, but I figured some might want links back to the index instead so supported both, but not at the same time.

 

I'm not planning to do any quote processing. If someone wants them a specific way, they can do a global search and replace themselves.  

Edited by eskin
Link to comment
Share on other sites

4 hours ago, eskin said:

[1] I kind of like the idea of having << on the left going back to the TOC (if requested) and >> on the right to go to the index (if requested)....

 

[2] I'm not planning to do any quote processing. If someone wants them a specific way, they can do a global search and replace themselves.  

[1] Yup! That's the full implementation of what I had in mind. I would have been sort of surprised if it wasn't something you'd considered... Thanks...

__________

[2] Yup! I do this all the time with all sorts of 'odd' characters - it's usually the fastest way, and once it's done, it's done...

Link to comment
Share on other sites

My ABC Transcription tool can now add hyperlinks to external websites to the tune notation in a PDF tunebook.

Tune hyperlinks are available for tune notation and tune incipits tunebooks, and are not available for ABC text incipit tunebooks.

When a hyperlink is present, touch the title of the tune and you will automatically launch the associated tune hyperlink.

To add a hyperlink to an external website in any tune, add the following comment-based annotation anywhere in the ABC for a specific tune:

%hyperlink URL

Examples:

%hyperlink http://michaeleskin.com

%hyperlink https://cnn.com

You may automatically add a hyperlink for every tune to the thesession.org search page for the tune title by adding the following comment-based annotation anywhere in the ABC file:

%addlinkstothesession

Any manually added tune hyperlinks take precedence over an automatically generated thesession.org hyperlink.

Demo video:

https://youtu.be/Na4XwOKYP4A
 

Link to comment
Share on other sites

Added a bunch of new PDF hyperlink features to my ABC Transcription Tools, including an new option to have either all the tunes or any specific tune in the PDF automatically link back to Paul Rosen's ABCjs QuickEditor site for playback:

Here's the section in the user guide:

 

The tool can add hyperlinks to external websites to the tune notation in a PDF tunebook.

 

Tune hyperlinks are available for tune notation and tune incipits tunebooks, and are not available for ABC text incipit tunebooks.

 

When a hyperlink is present, touch the title of the tune and you will automatically launch the associated tune hyperlink.

 

To add a hyperlink to an external website in any tune, add the following comment-based annotation anywhere in the ABC for a specific tune:

 

%hyperlink URL

 

Examples:

%hyperlink http://michaeleskin.com

%hyperlink https://cnn.com

 

To add a hyperlink to Paul Rosen's ABC Quick Editor for playing a specific tune with a specific General MIDI program number sound, add the following comment-based annotation anywhere in the ABC for a specific tune:

 

%add_playback_link MIDI_PROGRAM_NUMBER

 

The MIDI_PROGRAM_NUMBER is optional.

 

Some MIDI program numbers I recommend:

74 - Flute, 49 - Fiddle, 23 - Accordion, 25 - Guitar, or 0 - Piano

 

Example: To have a specific tune played with a fiddle sound

 

X:1
T:The Tarbolton
M:4/4
K:Edor
%add_playback_link 49
Beed e2BA|GBAF GFEF|Dddc d2AG|FAGE FEDF|
Eeed efge|fedf e2BA|GABG FGAF|BGAF GEE2:|
|:gfef gebe|gebe gfec|d2fd Adfd|cdAG FDEF|
GABG FGAF|E2ef gfed|BcdB A2FA|BGAF GEE2:|

 

To add a hyperlink to a specific tune to the thesession.org search page for the tune title, add the following comment-based annotation anywhere in the ABC for a specific tune:

 

%add_link_to_thesession

 

Example:

 

X:1
T:The Tarbolton
M:4/4
K:Edor
%add_link_to_thesession
Beed e2BA|GBAF GFEF|Dddc d2AG|FAGE FEDF|
Eeed efge|fedf e2BA|GABG FGAF|BGAF GEE2:|
|:gfef gebe|gebe gfec|d2fd Adfd|cdAG FDEF|
GABG FGAF|E2ef gfed|BcdB A2FA|BGAF GEE2:|

 

Precedence order for multiple manually added hyperlinks on one specific tune is website hyperlinks take highest priority, then playback hyperlinks, then thesession.org hyperlinks.

 

Adding playback or thesession.org hyperlinks to every tune in a PDF tunebook:

 

You may automatically add a hyperlink for every tune to Paul Rosen's ABC Quick Editor for playing the tune with a specific General MIDI program number sound by adding the following comment-based annotation anywhere in the ABC file:

 

%add_all_playback_links MIDI_PROGRAM_NUMBER

 

The MIDI_PROGRAM_NUMBER is optional.

 

Some MIDI program numbers I recommend:

74 - Flute, 49 - Fiddle, 23 - Accordion, 25 - Guitar, or 0 - Piano

 

Example: To have all tunes played with a flute sound

%add_all_playback_links 74

 

You may automatically add a hyperlink for every tune to the thesession.org search page for the tune title by adding the following comment-based annotation anywhere in the ABC file:

 

%add_all_links_to_thesession

 

%add_all_playback_links takes precedence for all tunes over %add_all_links_to_thesession

 

Any manually added tune hyperlinks, thesession.org hyperlinks, or playback hyperlinks take precedence over automatically generated thesession.org or playback hyperlinks.

 

Demo video:

https://youtu.be/EcSknrJOxBE

 

Edited by eskin
Link to comment
Share on other sites

@David Barnert  I know this isn't 100% of what you wanted, but I think it's a step in the right direction to make it easier to create shortened ABC Share URLs.

 

I've added a bunch of new features and enhancements related to share URL shortening and QR codes in PDF files.

 

ABC Share URLs can get pretty long, particularly for large sets of tunes.

 

A third-party service like TinyURL can be used to shorten the ABC Share URLs.

Click "Shorten URL" to automatically copy the ABC Share URL to the clipboard and then launch TinyURL in another browser tab.

 

Paste the already copied ABC Share URL into the TinyURL "Enter long link" box and click "Shorten URL".

 

You may have to agree to the TinyURL terms-of-service before you can shorten the URL.

 

Copy the shortened URL from TinyURL and paste it into emails or share it on social media.

 

For example, here is the "Sliabh Notes" polka set Share URL as a shortened URL:

 

https://tinyurl.com/5n9293yu

 

TinyURL also allows you to create and save a simple QR code for the shortened URL.

 

Note: Incorporating URL shortening  directly into the tool itself would require having a server-side component (since it's a very bad idea to include service API keys in client-side code) to call the URL shortening service APIs.

 

This would go against my "no reliance on server-side code" requirement for this tool.

 

Additionally, URL shortening services like TinyURL have a limited number of free shortening calls per month for web applications before you need to go to a paid service.  

 

I'd probably run out of free shortened URLs in the first week or two of each month.  

 

Individuals should have no problem shortening as many URLs as they like using the streamlined manual system now in the app.

 

Also, you can now override the automatically generated ABC share URL used during PDF file QR Code generation:

 

%qrcode URL

 

where the URL is optional. If not present, it uses the ABC share link generated by the tool to create the QR code.

 

You can also now override the caption under the QR code with the following directive:

 

%caption_for_qrcode YOUR_CAPTION_FOR_THE_QR_CODE_HERE

 

If not present, it will use the auto-generated QR code based on the tune names in the tunebook.

 

QR codes and their captions in PDF tunebooks now also have clickable hyperlinks to the URL used to create the QR code.

 

Demo video on Share URL shortening assist using TinyURL:

 

https://youtu.be/MZEsEPnr7Sk

Edited by eskin
Link to comment
Share on other sites

5 hours ago, eskin said:

I know this isn't 100% of what you wanted...

 

Click "Shorten URL" to automatically copy the ABC Share URL to the clipboard and then launch TinyURL in another browser tab.

 

Thank you. Actually, that’s precisely what I had in mind.

Link to comment
Share on other sites

Oh, heck, why not:

@David Barnert I went ahead and directly integrated TinyURL-based URL shortening into the tool.

Hopefully it won't be abused and I won't run out of free shortening sessions each month. 

If they do run out, it will (well, as far as I can tell simulating a failure) automatically fall back to the manual TinyURL shortening assist system as I originally implemented.
 

 

 

Edited by eskin
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...