Jump to content

ABC Transcription Tools


Michael Eskin

Recommended Posts

I've added a new feature to the ABC tool to allow you set the PDF quality and have some control over the PDF file size.

Just put this at the top of your ABC:

%pdfquality 0.5

and that will create a PDF about half the previous file size without sacrificing too much quality.

The default value is 0.75, which is lower than before, the previous default was 1.0.

Any new PDF files you create on the new version without overriding the default value will still be very high quality by default but a bit smaller in size than before.

Here's an example, you can paste this all into the tool to try:
 

%pdfquality 0.5

X: 1
T: The Blackwater
C: Matt Cranitch
R: polka
M: 2/4
L: 1/8
K: Dmaj
|:Fd Bd/B/|AF ED|A,B, DE|FE EF|
Ad Bd/B/|AF EF|DF A/B/A/F/|ED D>E:|
|:FA Bc|d2 Ad|fg/f/ ed|fe e2|
dc/d/ ed|BA FE|DF A/B/A/F/|ED D>E:| 



You can play around with the pdfquality value until you find the sweet spot for your use.

You'll need to refresh your browser and make sure you have the latest version.  If not, clear the cache and reload the page.


If you have the latest version and click "New ABC", you should see the pdfquality value listed in the list of optional headers.

 

Edited by eskin
Reformat
Link to comment
Share on other sites

  • 2 weeks later...
In my ABC Tools, I've added the ability to have the index page listings link to the tune pages if you add the following comment annotation at the top of the ABC:
 
%doindexpagelinks
 
There are some limitations.
 
First, this only works for tunebook index pages, not table of contents. It's not a perfect solution, but it's way better than nothing.
 
So, for example, if you put this at the top of your ABC collection in the editor, you'll get a title page, the tunes, then an index page with links back to the pages for each of the tunes:
 
%addtitle Session Tune Book
%addsubtitle My Tunes
%addindex Index of Tunes
%doindexpagelinks
 
I've tested it with several large tunebooks, both one tune per page, multiple tunes per page, and with text and notation incipits.
 
Please try the latest version of the tool, make sure you're loading the latest page by clearing cache, if you look at the page source for the main tool, you should see
 
<link href="app.css?v=288" media="all" rel="stylesheet" type="text/css">
near the top of the file. If you see v=286 or 287, force a page reload.
 
Hope this is useful to you!
 
Try my ABC Tools at:

 

Edited by eskin
Link to comment
Share on other sites

12 hours ago, eskin said:
In my ABC Tools, I've added the ability to have the index page listings link to the tune pages
...
this only works for tunebook index pages, not table of contents. It's not a perfect solution, but it's way better than nothing.
...
%addindex Table of Contents

Nice!

 

Later: Daft question about using the index page as a ToC deleted. It only works if the tunes are in the file in alphabetical order...

Edited by lachenal74693
Link to comment
Share on other sites

In my ABC Tools, I've now completely reworked the Table of Contents and Index pages as well as their sorted versions so that they now link back to the tune pages if you click on the tune name or page number.

So, for example, if you put this at the top of your ABC collection in the editor, you'll get a title page, a table of contents with links back to the pages for each of the tunes, the tunes, followed by an index with links back to the pages for each of the tunes:

%addtitle Session Tune Book
%addsubtitle My Tunes
%addtoc Table of Contents
%addindex Index of Tunes

I've tested it with several large tunebooks, both one tune per page, multiple tunes per page, and with text and notation incipits.

If for some reason you specifically don't want the hyperlinks in the table of contents or index pages, you can add this annotation anywhere in the ABC:

%nopagelinks

Please try the latest version of the tool, make sure you're loading the latest page by clearing cache, if you look at the page source for the main tool, you should see

<link href="app.css?v=290" media="all" rel="stylesheet" type="text/css">

near the top of the file.

 

If you see a lower value, like v=286, force a page reload.

 

If you see anything else, force a page reload.

Hope this is useful to you!

Full details at:

http://michaeleskin.com/abctools/userguide.html#adding_a_pdf_tunebook_table_of_contents_and_index

Try my ABC Tools at:

http://michaeleskin.com/abc

Edited by eskin
Link to comment
Share on other sites

11 hours ago, eskin said:

In my ABC Tools, I've now completely reworked the Table of Contents and Index pages as well as their sorted versions (my emphasis)
...
So, for example, if you put this at the top of your ABC collection in the editor, you'll get a title page, a table of contents with links back to the pages for each of the tunes, the tunes, followed by an index with links back to the pages for each of the tunes:

%addtitle Session Tune Book
%addsubtitle My Tunes
%addtoc Table of Contents
%addindex Index of Tunes

...

Using the 4 directives highlighted  above and a small 'tune book' of 5 tunes, I'm actually seeing an unsorted index - have I mis-understood, or done something amiss? ie: is there an explicit directive to sort the index? I don't think I've done anything totally dumb...

 

I'm seeing '291' in that ''<href link...' line so presumably I'm using the up-to-date version.

 

Thanks.

 

Roger

Edited by lachenal74693
Link to comment
Share on other sites

Yes, there are different directives for sorted vs. unsorted index and table of contents.
 

If you want a sorted index, use:

 

%addsortedindex your_index_title

 

or

 

for a sorted table of contents:

 

%addsortedtoc your_toc_title

 

Full info in the docs:

 

http://michaeleskin.com/abctools/userguide.html#adding_a_pdf_tunebook_table_of_contents_and_index

Edited by eskin
Link to comment
Share on other sites

24 minutes ago, eskin said:

If you want a sorted index, use

%addsortedindex

or

%addsortedtoc

Thanks for the speedy reply! This is perfect for me! It's something I've tried (and failed) to do with my own stuff!

 

Mea Culpa - I just went with the examples in the post without checking the detailed documentation! "Romeo Tango Fox-trot Mike! I now also get the subjective feeling that it's working a little faster...

 

Thanks again!

Edited by lachenal74693
Link to comment
Share on other sites

Major new ABC Transcription Tools feature 1 June 2023

 

You may now add hyperlinks to your PDF tunebook title page title and subtitle, as well as page headers and page footers.

 

The new ABC comment-based directives are:

 

To add a title page to your PDF tunebook as a hyperlink, simply add the following comment-based annotation anywhere in the ABC:

 

%urladdtitle URL (your tunebook title text goes here...)

 

To add a smaller subtitle as a hyperlink below the title on the title page, simply add the following comment-based annotation anywhere in the ABC:

 

%urladdsubtitle URL (your tunebook title page subtitle text goes here...)

 

Examples:

 

%urladdtitle http://michaeleskin.com Tunebook Title with Hyperlink

 

%urladdsubtitle http://michaeleskin.com/abc Tunebook Subtitle with Hyperlink

 

If you'd like to link to a specific URL when users click in the PDF page header or footer, include either the following ABC comment-based annotations anywhere in your ABC:

 

%urlpageheader (URL) (your header text goes here...)

 

%urlpagefooter (URL) (your footer text goes here...)

 

Examples:

%urlpageheader http://michaeleskin.com/abc Click in this page header to visit my home page

 

%urlpagefooter http://michaeleskin.com/abc Click in this page footer to visit my home page

 

For the full list of available PDF tunebook directives, please check out the User Guide at:

 

http://michaeleskin.com/abctools/userguide.html

 

Demo  video:

 

https://youtu.be/zh8qZhVwVek

 

This was very messy to implement. Testing looks good, but if you run into anything that seems to be broken, please let me know.

Link to comment
Share on other sites

  • 2 weeks later...
In my ABC Tools, you now have two new comment-based directives for PDF tunebooks that embed a link on each page of music back to either the index or the table of contents for quick navigation:
 
%addlinkbacktotoc
or
%addlinkbacktoindex
 
If either of these are present, I add a "<<" on the left side of each page of music that links back to either the table of contents or the index.

If both are present, the table of contents link takes precedence.

As previously the table of contents and index entries link back to the tunes, so now there are two-way links between the tunes and the table of contents or index.

Looks like this when used:


May be an image of trumpet, clarinet and text that says '"Sliabh Notes" Polkas Polka The Blackwater Matt Cranitch << Polka Kathleen's Matt Cranitch Created with ABC Transcription Tools'
Link to comment
Share on other sites

On 6/11/2023 at 11:47 AM, eskin said:

Here's the recording of this morning's (Saturday, June 11, 2023) ABC Transcription Tools Webinar and Q&A on Zoom (90 minutes):

 

Hi, Michael-

 

I just watched the above video. Thanks. One point and one question:

 

When somebody asked about url shorteners, you mentioned that they are not free. I have always used tinyurl.com and it is free.

 

I notice in the rendered pdfs that when a tune title has an apostrophe, it is rendered as ' rather than . Is there a way to control this choice?

Link to comment
Share on other sites

2 hours ago, David Barnert said:

 

Hi, Michael-

 

I just watched the above video. Thanks. One point and one question:

 

When somebody asked about url shorteners, you mentioned that they are not free. I have always used tinyurl.com and it is free.

 

I notice in the rendered pdfs that when a tune title has an apostrophe, it is rendered as ' rather than . Is there a way to control this choice?

I don't do any processing of the text for the titles, so whatever comes in the text gets rendered as present in the ABC file.  I'll play with the code and see if there is something that perhaps could be done, but it's not a high priority for me.  All the files I used in the demo have ' in the file, so that's what's getting rendered.

Even the free tier of tinyurl has API limits that would not be sufficient for my use as I'm getting potentially thousands of uses of the tool per day. 

Plus, it violates my principle that my code runs entirely locally and will have zero dependencies on external services.   Plus if tinyurl one day goes the way of the MandolinTab.net converter site, there could be thousands of broken links to tune sets.  Not wanting to have any dependencies on third party services was exactly why I decided to build this thing in the first place.


It's easy enough for someone to copy the share URL out of the tool and paste into whatever URL shortener they prefer.

All the best,

 

Michael



 

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...