Melodeon.net Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the new melodeon.net forum

Pages: [1] 2   Go Down

Author Topic: Generating incipits with easyABC  (Read 4344 times)

0 Members and 1 Guest are viewing this topic.

Dave Sawdon

  • Regular debater
  • ***
  • Offline Offline
  • Posts: 102
Generating incipits with easyABC
« on: February 26, 2020, 03:39:05 PM »

I can print scores OK but have never been able to successfully generate an incipits file.
If I "generate incipits file" (with default settings) I get 4 bars of a tune on each page.
If I "view incipits" I get a blank page, then a page with the title of the first tune, then a 2-column page of incipits (with the last one truncated), then a blank page, then a page with the title of the next tune ... etcetera.
I can't see anything wrong with the notation so I'd be very grateful if someone would volunteer to try generating incipits from the attached file. If this gives the same problem I know to look more deeply into the file, and if it works I know to look elsewhere.
Any volunteers to look at the attached file?
Logged

Anahata

  • This mind intentionally left blank
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 6767
  • Oakwood D/G, C/F Club, 1-rows in C,D,G
    • Treewind Music
Re: Generating incipits with easyABC
« Reply #1 on: February 26, 2020, 04:04:17 PM »

I know nothing about the incipit generator, but that I'm pretty sure that file isn't standard ABC as there should be a blank line between each tune.

(PS: Yes - from the ABC standard 2.1 "An abc tune itself consists of a tune header and a tune body, terminated by an empty line or the end of the file. ")

So that's worth a try for a start.
« Last Edit: February 26, 2020, 04:06:16 PM by Anahata »
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Dave Sawdon

  • Regular debater
  • ***
  • Offline Offline
  • Posts: 102
Re: Generating incipits with easyABC
« Reply #2 on: February 26, 2020, 04:34:19 PM »

Thanks for the suggestion - I think I took the carriage returns out when I last tried to fix this. I've just put them back and get the same results. I also spotted an unwanted space in an X line that had snuck-in from somewhere, but deleting that also did nothing to help the problem.
I'll attach the revised file.
Logged

Tone Dumb Greg

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 4955
    • Dartmoor Border Morris
Re: Generating incipits with easyABC
« Reply #3 on: February 26, 2020, 05:35:42 PM »

Anahata's fix worked OK for me, in EasyABC.

Bye the bye, your collection looks extraordinarily like my  collection of session tunes. Some of your sets look fun, as well.
Logged
Greg Smith
DG/GC Pokerwork, DG 2.4 Saltarelle, pre-war CF Hohner, Hohner 1040 Vienna style, old  BbEb Hohner that needs a lot of work.

ACCORDION, n. An instrument in harmony with the sentiments of an assassin. Ambrose Bierce

Dave Sawdon

  • Regular debater
  • ***
  • Offline Offline
  • Posts: 102
Re: Generating incipits with easyABC
« Reply #4 on: February 26, 2020, 06:38:11 PM »

Hmmm, after a bit more experimenting the problem seems to only be associated with selecting "2 column output", which is when EasyABC inserts the following at the start of the incipits file:
Quote
%%topspace 0.0cm
%%staffsep 0.7cm
%%titleformat T-1
%%maxshrink 1.4
%%musiconly 1
%%printtempo 0
%%titlefont Helvetica-Oblique 16
%%subtitlefont Helvetica-Oblique 13


%%multicol start
%%rightmargin 11.5cm
%%leftmargin 1.5cm
and
Quote
%%multicol end
%%newpage

%%multicol start
%%rightmargin 11.5cm
%%leftmargin 1.5cm
at various points.


(Tone Dumb Greg: I started a steady session about 2 1/2 years ago and have slowly been expanding the repertoire since then; this is the latest tune book)
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Generating incipits with easyABC
« Reply #5 on: February 27, 2020, 11:55:34 AM »

I hope it's OK to mention this - a side issue really - but there's a (3BcBB2 in bar 14 of
Lemmie Brazil's which I think should be (3BcB...
Logged
My ABC tune collections can be found here (GoogleDrive) & here (Dropbox).

For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.

Dave Sawdon

  • Regular debater
  • ***
  • Offline Offline
  • Posts: 102
Re: Generating incipits with easyABC
« Reply #6 on: February 27, 2020, 12:06:35 PM »

Thanks Roger, all input gratefully received.

Does the file produce a sensible 2-column incipit PDF for you?
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Generating incipits with easyABC
« Reply #7 on: February 27, 2020, 12:47:03 PM »

...Does the file produce a sensible 2-column incipit PDF for you?
Yes, it does, though the pages are filled a little oddly. I have a 5 page incipits PDF
with a single item on the final page, which I am quite sure would fit on the preceding
page. In general, pages seem to be 'not quite filled as much as they could be' - if that
makes sense...

I did this via Tools>Generate incipits file, followed by File>Export all>As PDF book

but Tools>View incipits seems to directly generate and display the same PDF with
the name temp.pdf. I guess I can directly print that, but the file disappears if I exit my PDF
viewer

I haven't really taken it any further than that, but I haven't seen the 'blank page' artefact
which I think you mentioned earlier in this thread.
Logged
My ABC tune collections can be found here (GoogleDrive) & here (Dropbox).

For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.

Dave Sawdon

  • Regular debater
  • ***
  • Offline Offline
  • Posts: 102
Re: Generating incipits with easyABC
« Reply #8 on: February 27, 2020, 01:03:34 PM »

That's what I've been doing, so it looks as if the problem is not the ABC file. I just tried updating ghostscript and changing the %% commands that easyABC injects, but to no avail.
I'm beginning to wonder whether this is worth the effort.
Logged

Mike Hirst

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1433
  • Black Dot B/C, Bastardo C#/D, Corona II GCF
Re: Generating incipits with easyABC
« Reply #9 on: February 27, 2020, 01:55:57 PM »

I am not an easyABC user. I prefer to use the command line. As the back end of easyABC is run using abcm2ps I experimented using the command:

Code: [Select]
sed '/^%abc/s/.*/&\n%%tune .*\n%%clip 1-5/' "Mar 2020.abc"|abcm2ps - -O incipits.ps

to generate the postscript file 'incipits.ps' which I have attached as a pdf. (Converted using ps2pdf.)

Despite a warning re use of the illegal key ref. 'K:Gmaj/Em' in the tune 'T:Rochdale Coconut Dance', I achieved the desired incipit collection without error.

I agree with Ahahata re lack of empty line(s) between tunes. Ordinarily I would use a slightly longer script to add these when working with abc collections that I have not written myself. Significantly I did not have to remove any of the pre-existing embedded abc commands or make any other alterations.

In precise the code printed above adds the lines:

Code: [Select]
%%tune .*
%%clip 1-5

after the '%abc" declaration at the head of the file.

These instruct abcm2ps to select all tunes (%%tune .*) and to print only the measures included between the first and the fifth measure bars (%%clip 1-5). This is then piped to abcm2ps for abc to postscript conversion. In practice I would pipe abcm2ps output to ghostscript to give pdf output, but for the sake of simplicity I have broken things down into what I hope is a clear and simple three step process.
« Last Edit: February 27, 2020, 02:07:11 PM by Mike Hirst »
Logged
Semper idem, sed non eodem modo

Dave Sawdon

  • Regular debater
  • ***
  • Offline Offline
  • Posts: 102
Re: Generating incipits with easyABC
« Reply #10 on: February 27, 2020, 02:10:19 PM »

The problem I'm having seems to only be associated with two-column output, can the command line approach be used to generate a 2-column incipits file?
Logged

Mike Hirst

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1433
  • Black Dot B/C, Bastardo C#/D, Corona II GCF
Re: Generating incipits with easyABC
« Reply #11 on: February 27, 2020, 02:52:21 PM »

The problem I'm having seems to only be associated with two-column output, can the command line approach be used to generate a 2-column incipits file?

Dunno?? I'll give it a try.
Logged
Semper idem, sed non eodem modo

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1108
  • 🇬🇧
Re: Generating incipits with easyABC
« Reply #12 on: February 27, 2020, 03:06:36 PM »

Tools>View Incipits creates a file in a temporary folder which will likely vary by both version of EasyABC And platform, but in my case it's in C:/Users/Gena/AppData/Local/EasyABC/cache/temp.pdf. You could either retrieve the file, or, you could probably also print the pdf to another pdf, again, depending on OS. The file is only replaced when you generate incipits again, so, it's probably still in a very similar folder somewhere on your system.

I should also ask, Dave, what version of EasyABC are you using? Help/About should provide you a version number. This should infer what version of abcm2ps is being used and what it's trying to do.

To actually deal with your problem, though, I think basically the problem is that, %%multicol is a fairly primitive attempt at implementing the idea of how to actually figure out making a multicolumn output - It doesn't know how to deal with page wrapping correctly, and needs to be manually instructed on where to place tunes within the space of a page. You have to manually define new pages, as it can't work out how to wrap, and you have to manually define where position of each column.

Personally, I would advise you don't use that multi column at all, and instead retrofit a solution of your own over the top, such as adding %%scale 2 (or maybe less, to suit your taste) and then using eg google chrome or anything slightly clever to print your PDF 4 pages per sheet. You could also modify the left/right margins etc. I think ignoring easyABC's incipits system and writing extra lines into the header and printing the file as a book is the better choice. That's exactly how I now intend to make an incipits tune book for my morris side, which I've been meaning to do.

If you wish to persisit with it, I'd aim to ensure you know exactly how many rows fit on a given page, and try to use it like that - if a tune wraps strangely or has chord symbols or not etc will all impact how 'tall' a tune is, and probably cause the output file to get messed up, so, it'll be a bit of a game of cat & mouse.
Logged

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1108
  • 🇬🇧
Re: Generating incipits with easyABC
« Reply #13 on: February 27, 2020, 03:22:08 PM »

Also, both EasyABC's method and %%clip both seem to have no idea how to deal with multiple tunes added as a set, so, the Set Lists at the end of the file are probably getting butchered.
Logged

Mike Hirst

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1433
  • Black Dot B/C, Bastardo C#/D, Corona II GCF
Re: Generating incipits with easyABC
« Reply #14 on: February 27, 2020, 03:46:36 PM »

To actually deal with your problem, though, I think basically the problem is that, %%multicol is a fairly primitive attempt at implementing the idea of how to actually figure out making a multicolumn output - It doesn't know how to deal with page wrapping correctly, and needs to be manually instructed on where to place tunes within the space of a page. You have to manually define new pages, as it can't work out how to wrap, and you have to manually define where position of each column.

Also, both EasyABC's method and %%clip both seem to have no idea how to deal with multiple tunes added as a set, so, the Set Lists at the end of the file are probably getting butchered.

This is exactly what I found.

I can see ways to achieve the desired result, but not without an enormous amount of unnecessary jiggery-pokery.

ABC is great tool for enabling simple exchange of tunes and printing, but for anything complicated it's perhaps not the best thing to use. For fancy formatting svg export and further editing using vector editing tools is a good option for individual tunes, but I don't think it would be much use here.

Maybe lilypond or musicxml would give better options.

BTW looking through the list has reminded me of some good tunes I had forgotten. Thanks for sharing
« Last Edit: February 27, 2020, 03:49:01 PM by Mike Hirst »
Logged
Semper idem, sed non eodem modo

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Generating incipits with easyABC
« Reply #15 on: February 27, 2020, 05:05:41 PM »

Mea culpa! I should have said - I am using EasyABC 1.3.7.7

<pita on>
I think there may be summat up with bars 5 &21 of Winster Gallop...
<pita off>

...%%multicol is a fairly primitive attempt at implementing the idea of how to actually figure out
making a multicolumn output - It doesn't know how to deal with page wrapping correctly..

I'm not going to be as 'forensic' as Gena, but I agree. I tried to use multi-column output to do the
pseudo-academic references in a mixed text/music ABC document I prepared about a year ago.
I got it to work but it was a nightmare!

« Last Edit: February 27, 2020, 05:13:55 PM by Roger Hare »
Logged
My ABC tune collections can be found here (GoogleDrive) & here (Dropbox).

For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.

Mike Hirst

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1433
  • Black Dot B/C, Bastardo C#/D, Corona II GCF
Re: Generating incipits with easyABC
« Reply #16 on: February 27, 2020, 05:15:07 PM »

I think we are in agreement here.

I suspect the way froward would be to export abc to svg using abcm2ps. svg could be wrapped using html then css can be used to give multi-column output.
Logged
Semper idem, sed non eodem modo

Dave Sawdon

  • Regular debater
  • ***
  • Offline Offline
  • Posts: 102
Re: Generating incipits with easyABC
« Reply #17 on: February 28, 2020, 09:40:20 PM »

SOLVED. Many thanks to everyone.
The simple solution is to use EasyABC to output 1-column incipits, export the resulting file as a PDF book and then print as a booklet (doh! I should have thought of that). The sets will need to go in a separate file, but that's no hardship.

However, I hadn't encountered stylesheet directives until now so spent a while reading through the list of abcm2ps parameters and thought I had enough of an understanding to take control of the incipits generation. My plan was to insert the following directives (commented out) at the start of a collection of tunes and then, when incipits are wanted, to remove the comment markers, export to a PDF book and then print the book as a booklet.
% %%topspace 0.0cm
% %%staffsep .7cm
% %%titleleft 1
% %%titlefont Helvetica-Oblique 16
% %%scale .7
% %%tune .*
% %%clip 1-5
% %%writefields T
% %%maxshrink 0.9
But, the resulting output includes all the T lines for a tune and I can't find a Directive to only include the first T line (which is what EasyABC does when generating the incipits) - what have I missed?

(BTW, I'm using 1.3.7.7 of EasyABC)


Roger: wassup with bars 5 &21 of Winster Gallop...?


Mike: I can (almost) guarantee that you won't have heard of Polca Llewlyn Alaw before - I found it in a Welsh fiddle book and, err, fiddled with it a bit  >:E . If you go to the session website you'll find links to recordings for most of the tunes. FWIW I think the most successful tune at the session has been Traveller's Joy.
« Last Edit: February 28, 2020, 09:56:37 PM by Dave Sawdon »
Logged

Lester

  • MADman
  • Mods and volunteers
  • Hero Member
  • ***
  • Offline Offline
  • Posts: 9327
  • Hohners'R'me
    • Lester's Melodeon Emporium and Tune-a-Rama
Re: Generating incipits with easyABC
« Reply #18 on: February 28, 2020, 10:17:05 PM »


Roger: wassup with bars 5 &21 of Winster Gallop...?

Bar 5 is currently | "C"c2 e/e/  "(D)"g>e | but should be | "C"ce/e/  "(D)"g>e |
Bar 21* is currently | "Am"A2 c/c/ e>c | but should be | "Am"Ac/c/ e>c |

*Bar 5 of the Em version

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1108
  • 🇬🇧
Re: Generating incipits with easyABC
« Reply #19 on: February 28, 2020, 10:23:17 PM »

But, the resulting output includes all the T lines for a tune and I can't find a Directive to only include the first T line (which is what EasyABC does when generating the incipits) - what have I missed?

You could be cheeky and use subtitlefont and %%subtitlespace  and make the font really really tiny. Perhaps try adding

%%subtitlefont serif 1
%%subtitlespace 0cm


To your header. That will give you tiny little lines which will should be less obtrusive. There's also the command titleformat, but, it's weird and based on a few attempts at using it, I suspect it doesn't work if the titles are not all defined before any staves.

Really, though, when you're outputting as a booklet with multiple tunes per page, having your set tunes enclosed within a single X line is working to your disadvantage here, well, barring the fact that they might appear on separate pages otherwise but I think technically that is still true if any given tune can wrap a page, which I think is an option. But, as of current, the other tunes in the set aren't appearing at all, so, I think either you want to generate your incipits with EasyABC without columns, and then add in the missing lines from your set tunes, or, you want to use either clip -5 or clip 1-5 and split your sets up (you can likely use the same X: value, and just duplicate the other params like M and L) and use your current headers.

edit - So, after some fiddling, you could try adding something like

%%titleformat T0 C1 T1 T1
%%composerfont serifItalic 8


to your header - this will push the top-of-file secondary titles off to the side and draw the composer on the same line, so, it's ever so slightly more space efficient. Your additional titles in your sets are still going to be 'there' though, unless you try one of the above. But, it's super primitive and not very clever - if you look at set 2:

T:Set 2: Galopede - Portsmouth
M:4/4
L:1/8
K:G
T:Galopede


The existence of these other commands causes the second title to not be noticed by the format I suggested, and so it still gets drawn centrally. Basically, none of these commands were really designed to work with injecting a 2nd tune inside another one with a separate title halfway down. Perhaps they're considered 'something else'. I guess at this point I should probably just dig into the abcm2ps code and figure out how it decides to do what, in this case.
« Last Edit: February 28, 2020, 10:43:16 PM by Gena Crisman »
Logged
Pages: [1] 2   Go Up
 


Melodeon.net - (c) Theo Gibb; Clive Williams 2010. The access and use of this website and forum featuring these terms and conditions constitutes your acceptance of these terms and conditions.
SimplePortal 2.3.5 © 2008-2012, SimplePortal