Melodeon.net Forums

Discussions => Tunes => ABC => Topic started by: Nick Ray on September 09, 2021, 01:12:51 PM

Title: ABC notation to indicate 'favourite' tunes
Post by: Nick Ray on September 09, 2021, 01:12:51 PM
Is there a header entry in ABC to mark the tune as a personal 'favourite'?
I think this may be how the Tradmusician app provides a 'favourites' listing, but I can't work out how to add to this list.
Any suggestions please.
Many thanks
Nick
Title: Re: ABC notation to indicate 'favourite' tunes
Post by: Anahata on September 20, 2021, 07:21:34 PM
Nothing in the ABC standard, but you could put a code in an ABC comment.
Any line starting with a '%' character is treated as a comment and ignored by the ABC interpreter.
Title: Re: ABC notation to indicate 'favourite' tunes
Post by: Roger Hare on September 21, 2021, 07:15:45 AM
An alternative approach might be to use one of the standard ABC headers (say N:), and append a
fixed 'favourite' text, eg:

N:favourite

You could then use the %%select directive at the start of your file to pick out all the 'favourites',
eg:

%%select N:.*favourite
  .
X:0
T:My Favourite Things
N:favourite
  .
X:0
T:My Non-Favourite Things
N:turkey
  .

It's a bit limited - %%select is an abctops feature, so you can only export to PDF. I guess it all
depends  on exactly what you want to do? I'm currently trying to write a little program which
allows me to select tunes in an ABC file and write them out to a separate ABC file (as far as I
can see, abc2abc doesn't have this feature).

The %%select directive is described in Guido Gonzato's manual...
Title: Re: ABC notation to indicate 'favourite' tunes
Post by: Pete Dunk on September 23, 2021, 09:43:47 PM
I'm currently trying to write a little program which
allows me to select tunes in an ABC file and write them out to a separate ABC file (as far as I
can see, abc2abc doesn't have this feature).


ABC Explorer can do that.  8)
Title: Re: ABC notation to indicate 'favourite' tunes
Post by: Roger Hare on September 26, 2021, 05:26:54 AM
ABC Explorer can do that.  8)
Aye. Unfortunately, it doesn't do quite what I want, in the way I want - neither does EasyABC or
any of the other ABC 'front-ends'...
Title: Re: ABC notation to indicate 'favourite' tunes
Post by: Nick Ray on October 02, 2021, 11:30:18 AM
Thanks for the suggestions guys.
SimplePortal 2.3.5 © 2008-2012, SimplePortal