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 4347 times)

0 Members and 1 Guest are viewing this topic.

Dave Sawdon

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

Lester (and Roger):  :-[ I think the expression is "hiding in plain sight".  :|bl

Gena: I'm happy to put the sets into a separate file and not bother generating incipits for them because the tunes are all in the main session file. The problem comes in a tune that has two names (such as Battle of Prague). EasyABC manages to strip-off the second Title when generating the incipits but I can't see a Directive that will allow me to do that.
Logged

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1108
  • 🇬🇧
Re: Generating incipits with easyABC
« Reply #21 on: February 28, 2020, 11:32:49 PM »

Yes - basically, EasyABC is attacking the problem via text analysis of your ABC file, and creating a new ABC file. It's effectively choosing to say, 'oh, we don't need this T: line'. Unfortunately, there's nothing in abcm2ps by default that allows it to actually ignore T: lines in the body of your tune, so even though it would appear you can have it ignore additional titles that live at the top of your tune, you can't hide the ones within the body - the only thing I can think of is just making those secondary titles really small, which seems to work for me?

My full headers to test with are

Code: [Select]
%%topspace 0.0cm
%%staffsep 0.7cm
%%musiconly 1
%%printtempo 0
%%tune .*
%%clip -5
%%maxshrink 1
%%linewarn 0
%%breaklimit 1
%%scale 1
%%botmargin 0.6
%%leftmargin 0.6
%%topmargin 0.6
%%rightmargin 0.6
%%subtitlefont serif 1
%%subtitlespace 0cm
%%titleformat T0 C1 T1 T1
%%composerfont serifItalic 8

and the output is as attached.

Having dug around the code, I'm none the wiser as to how the title format works, but, I can see what it does when it isn't using it and yeah, there doesn't appear to be a 'just don't do it' option. Looks like they're sort of competing ideas. My current inclination is actually to try and reset whatever clip uses to count bar lines whenever it encounters a T: line, which might make it work 'as intended', or, as we'd like it to, here. don't think that's gonna happen, it pretty much manhandles the stream of data in ways I cannot get a handle on from just snippets of the rather large code base.

edit:
OK so, T lines, if they are present BEFORE a K: line in an ABC tune, are considered to be in the 'header' if the tune, and if they are after, they are considered to be part of the tune itself. To our eyes, there's not really any difference but to abcm2ps they're handled by separate code. This is why %%titleformat has no impact on the in body T: entries, and sometimes not in T entries that come before the ABC tune itself but after some other commands, all the while still including the Composer line regardless of it's location. Unfortunately, there is no directive to ignore T entries in the body of the tune.

But, this does mean that it is principally possible for abcm2ps to have its instruction set expanded to support such a request, however, I'd only actually want that because I'd want to make clip's current not ideal function work more appropriately. If however it did clip the 2nd tune in keeping with our desires, then... I would want those titles? So, that seems like the more prudent modification. However, most likely if it was me trying to do this, I'd be modifying the javascript of abc2svg, the project which replaced abcm2ps, just because I'm hoping that it will allow for a different approach than the really quite raw memory copying going on with abcm2ps that I could very easily get completely wrong. But, the actual reality is that, nowadays it's probably much more plausible to write eg a python or php script to attack the ABC code and produce the desired outcome in a much more nuanced way than either EasyABC or abcm2ps currently provide, such as considering how many bars are needed on a meter by meter basis (2/4 vs 4/4 vs 9/8 vs 12/8 might all benefit from different #s of bars being kept. Need to manually override it? Add your own directive to the tune, etc.

A project for another day, though.
« Last Edit: February 29, 2020, 04:15:43 AM by Gena Crisman »
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Generating incipits with easyABC
« Reply #22 on: March 01, 2020, 12:58:02 PM »

Roger: wassup with bars 5 &21 of Winster Gallop...?
Sorry, I only just saw this. Both bars are 'over-full'.

I had an idea what to put in there, but I didn't push it because I'm not a real musician, like
most of the folks here. I hoped one of the real musicians would cough up a suggestion, and
Mr. Bailey has obliged.

FWIW, my 'solution' was:
Bar 5: | "C" c/d/e/f/ "(D)"g>e |
Bar 21: | "Am" A/B/c/d/ e>c |
 
« Last Edit: March 01, 2020, 06:35:25 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.
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