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]   Go Down

Author Topic: Private 'extensions' to ABC  (Read 2446 times)

0 Members and 1 Guest are viewing this topic.

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Private 'extensions' to ABC
« on: December 09, 2020, 06:40:40 AM »

Increasingly, I'm putting a reference to an online video (usually YouTube) into my ABC tune files.

There doesn't seem to be an entirely suitable ABC field for this purpose. What do/would other folks
use/recommend for this purpose?

I've teetered on the edge of defining a 'private' directive (%%video) for this purpose, which would
allow me to use my own programs to process my ABC files in a way which suits me. I've already
done this for a program which does some tabbing/notename modification of ABC files (%%mapping).[1]
That makes two - which would be treated as a meta-comment by existing public ABC software, but
I'm an old programmer and very wary of 'private extensions' to existing languages.

Thoughts please,  about how to specify private extensions to ABC in a way which will not wreck the
processing when a file is input to public ABC software, and which are future-proofed against extended
or improved ABC standards?

Ta.
-----
[1]%%mapping - dangerously close to %%map?
 
« Last Edit: December 09, 2020, 06:46:34 AM 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.

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: Private 'extensions' to ABC
« Reply #1 on: December 09, 2020, 11:49:30 AM »

If I wanted to put a URL in an ABC file I'd put it in an N: header, which is a fairly non-specific header for notes.
If I wanted to make sure it was printed, I'd use %%begintext and %%endtext.

I note that the ABC headers are case sensitive, as both upper and lower case of the some letters are already used with different meanings,
so perhaps v: should be proposed for video links and a: for audio in a future ABC standard?
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Tone Dumb Greg

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 4955
    • Dartmoor Border Morris
Re: Private 'extensions' to ABC
« Reply #2 on: December 09, 2020, 12:35:30 PM »

Just wondering who is maintaining abc2 these days and, is anyone around here in contact with her/him/them?
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

Stiamh

  • Old grey C#/D pest
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3611
    • Packie Manus Byrne
Re: Private 'extensions' to ABC
« Reply #3 on: December 09, 2020, 12:51:52 PM »

so perhaps v: should be proposed for video links and a: for audio in a future ABC standard?

Just wondering who is maintaining abc2 these days and, is anyone around here in contact with her/him/them?

Discussion of revisions to the ABC standard has recently moved to a new group/email list at https://groups.io/g/abcusers (replacing the previous one at yahoo, which is axing groups). The move has generated a huge upsurge in activity - in the space of a couple of days there have been over a hundred messages about repeat signs, would you believe, a topic that people seem very exercised about - and already some posters are reacting hotly to perceived insults. So join at your own risks to your mental health - especially if you elect to receive all messages by email (I'd recommend a digest, or viewing topics on the website).

From my brief membership of this group I understand that Chris Walshaw walked away in disgust from past discussions of a new standard because of the intransigence of some, or at least one, contributor.  :(

The problem seems to be that nobody is in charge, no final arbiter. I think breath should not be held waiting for a new standard!

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Private 'extensions' to ABC
« Reply #4 on: December 09, 2020, 01:35:47 PM »

[1] If I wanted to put a URL in an ABC file I'd put it in an N: header, which is a fairly non-specific header for notes.
If I wanted to make sure it was printed, I'd use %%begintext and %%endtext.

[2] I note that the ABC headers are case sensitive, as both upper and lower case of the some letters are already
used with different meanings, so perhaps v: should be proposed for video links and a: for audio in a future ABC
standard?

[1] Yep, I thought about that one, though I hadn't cottoned to to the idea of using %%begintext and %%endtext
to print it out. Good thought!

[2] Yep, I thought about that one too. My 'reservation' was that (for example) w: and W: both deal with lyrics/words,
which are sort of 'connected'. v: and V: would deal with 'video' and 'voice' which aren't really connected. It probably
don't matter...

Still, it's nice to know that the whole idea is not regarded as completely insane by folks here, who are noticeably
'sensible'. Thank you very much. I will think in detail about how to do this - it's easy enough to do, it's just getting
the details 'right'.

Which brings me to the new abcusers group/mailing list - where folks appear to be perhaps not quite so 'sensible':

...in the space of a couple of days there have been over a hundred messages about repeat signs, would you believe,
a topic that people seem very exercised about - and already some posters are reacting hotly to perceived insults...

...I understand that Chris Walshaw walked away in disgust from past discussions of a new standard because of the
ntransigence of some, or at least one, contributor....

...The problem seems to be that nobody is in charge, no final arbiter. I think breath should not be held waiting for a
new standard...

I joined the list on the recommendation of a c.net user (like mel.net, populated mostly by 'sensible' folk). I too have
been amazed, and not a little amused by the aggressive tone of some of the exchanges, and I think it's not too difficult
to narrow down the suspects for the 'intransigence' award to 2/3 folks. Certainly, there seems to be a vocal section of
the user  community with at least some common interests - but they seem to be disagreeing with one another in a slightly
combative way...

I'm not surprised that some people have 'walked away'.
« Last Edit: December 09, 2020, 04:37:10 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.

Tone Dumb Greg

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 4955
    • Dartmoor Border Morris
Re: Private 'extensions' to ABC
« Reply #5 on: December 09, 2020, 01:53:00 PM »

[1] If I wanted to put a URL in an ABC file I'd put it in an N: header, which is a fairly non-specific header for notes.


[1] ... I hadn't cottoned to to the idea of using %%begintext and %%endtext to print it out.

I suppose this is a good solution since it is likely to be readable to all abc users.

Quote

[2] Yep, I thought about that one too. My 'reservation' was that (for example) w: and W: are both deal with lyrics/words.
v: and V: would deal with 'video' and 'voice' which aren't really connected.

As long as the single letter prefix with a colon convention is used options have to be limited.
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

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: Private 'extensions' to ABC
« Reply #6 on: December 09, 2020, 02:51:12 PM »

[2] Yep, I thought about that one too. My 'reservation' was that (for example) w: and W: both deal with lyrics/words,
which are sort of 'connected'. v: and V: would deal with 'video' and 'voice' which aren't really connected. It probably
don't matter...

The 2.1 standard also lists
M: for meter and m: for macro
R: for rhythm and r: for remark
S: for source and s: for symbol line
...so I don't think the lower case and upper case meanings are expected to be related.
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Private 'extensions' to ABC
« Reply #7 on: December 09, 2020, 04:53:32 PM »

The 2.1 standard also lists
M: for meter and m: for macro
R: for rhythm and r: for remark
S: for source and s: for symbol line
...so I don't think the lower case and upper case meanings are expected to be related.
Thank you. I knew about s: and S:, and w: and W:, but I hadn't clocked m: and M: and r: and R:,
so in the majority of cases (pun intended), there is indeed no relation. I really do need to go through
that standard with a fine-tooth comb, even though I am a dedicated minimalist - I deliberately use
the absolute minimum of ABC features to get the results I want.

I think you are right, using the lower case option may well be the best way to go...
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.

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Private 'extensions' to ABC
« Reply #8 on: December 11, 2020, 06:47:05 AM »

Just wondering who is maintaining abc2 these days and, is anyone around here in contact with her/him/them?

According to the ABC standards page, the contact is still Chris Walshaw. An electronic mail address can be found
at the top of this academic paper by Chris Walshaw. A quick search of the University web site also reveals a current address.

The mailing list referred to by stiamh would appear at first sight to be the place to go, but frankly, I 'hae ma doots'.
The list appears to be a home for a fairly argumentative collection of folks who seem to wish to argue not about how
many angels can dance on the head of a pin, but about the best method for determining how many angels can dance
on the head of a pin - not the same thing at all. I don't know how much 'authority' these folks have - not as much as
they would like to think, would be my guess.

All mildly amusing, but rather more smoke than light being generated, as far as I can see. I'm thinking of putting
on a tin hat and flak jacket and proposing the v: and a: extensions to ABC which were suggested here by Anahata.

It's times like this that I regret that the experimental ABC Notation Users forum started (from here) never really
caught on.

--------------------------
Aside: After a little more thought about Private 'extensions' to ABC, I think I'm going to 'go my own way', but only after some more careful
thought. I think the situation regarding ABC and adherence to the 'standard' is rather like that with FORTRAN IV compilers in the 1970s, 80s,
and 90s - every supplier added their own extensions/modifications to the existing 'standard'.
« Last Edit: December 11, 2020, 05:48:31 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.

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: Private 'extensions' to ABC
« Reply #9 on: December 11, 2020, 12:31:49 PM »

The ABC2.1 standard instructs interpreters to ignore any headers that they don't understand, so using "a:" and "v:" in this way should be entirely harmless for any existing software that behaves properly (that's a tall order, admittedly) though could cause trouble in the future if (and only if) another use for "a:" and "v:" is invented and used in some piece of software.
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Private 'extensions' to ABC
« Reply #10 on: December 11, 2020, 05:10:04 PM »

...using "a:" and "v:" in this way should be entirely harmless for any existing software that behaves properly...
though could cause trouble in the future if (and only if) another use for "a:" and "v:" is invented...
Ah! My weak spot - I am a pessimist and always plan for the worst. No Dr. Pangloss nonsense for me... 8)
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.

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1108
  • 🇬🇧
Re: Private 'extensions' to ABC
« Reply #11 on: December 11, 2020, 05:47:01 PM »

Unless I was adding a field that had general use across basically any expected way of using the ABC code, I probably wouldn't be adding it as a #: style directive thingy. I'd probably use something like %%video myself, or just add it in as a comment. A youtube url is pretty useless to me unless I can either copy and paste it from the source file, or, click on it in a pdf.

But, I'd also be content in the knowledge that it would take very little time to convert my entire database of tunes, if I had one, from v: to %%video or vice versa.

As an aside, I think the person who'll be in charge of the ABC spec is probably whomever makes the next good ABC editor, just by virtue of the older software becoming increasingly defunct.
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Private 'extensions' to ABC
« Reply #12 on: December 11, 2020, 05:56:18 PM »

...I'd probably use something like %%video myself, or just add it in as a comment....
This is the way I'm heading - with the rider that (as you suggest) it would be easy to edit %%video to v:
if such were ever to become part of 'official' ABC...

As a matter of principle, I'm a bit uneasy about adding private extensions to any 'programming' language,
which is why I sought advice/comments in the first place...
« Last Edit: December 11, 2020, 05:57: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.

Carl Allison

  • New Starter
  • Offline Offline
  • Posts: 3
Re: Private 'extensions' to ABC
« Reply #13 on: April 26, 2021, 02:01:41 AM »

I've messed up more abc notation with begintext and endtext than I care to admit to. There is one other approach to getting the text into the header fields without being an actual header and that is the W: You just have to follow the W:<your text> with %%vskip 0 to make it work. Unfortunately, you would have to copy and paste from the actual abc text to use it in a browser. This will not produce a clickable URL but there could be additional text/code that could be added to create that feature in a pdf file output. I've never looked into whether the abc standard has or ever will incorporate such an ability directly.

As an example W:<your text>:

X: 1
T: Caherlistrane
Z: Stewart
S: https://thesession.org/tunes/3006#setting3006
R: jig
M: 6/8
L: 1/8
K: Amaj
W:YouTube: https://www.youtube.com/watch?v=8rDZ_G98iYo
%%vskip 0
A B|:c2c BAF|EAF E2E|FEC A,CE|FAA B2B|
c2c BAF|EAF E2E|FEC A,CE|FAA A2B:|
|:c2c e2e|fec B2B|cec BAF|EFA BAB|
c2c ece|fec B2B|cec BAF|[1EFA A2B:|[2EFA A3|]

Following a W:<your text> with %%vskip 0 works anywhere within the abc body (at least in EasyABC anyway) so it's a sneaky way of adding directives or text that will not interfere with proper abc notation. Never mind that there are clickable URL's in the example, that's a function of the software on this site, not abc notation.

Depending on where you place the W:<your text> in the headers it will either precede or follow the title. Maybe. I use EasyABC but other abc programs may differ in the interpretation.
Logged
Pages: [1]   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