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: Multi-headed notes - 'correct style'  (Read 1594 times)

0 Members and 1 Guest are viewing this topic.

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 828
  • Urmston, Lancashire, U.K.
Multi-headed notes - 'correct style'
« on: September 11, 2019, 08:18:26 AM »

A very simple question about ABC 'style'.

I wish to code multiple notes on the same stem - duration (say) two default notes.

Using e and d as an example, do I do it like this: [e2d2] or like this: [ed]2?

Is there an 'approved style'? Does 'the body o' the kirk' have an opinion?

Thank you.
Logged
For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.
My (large) ABC Tune Book is here.

Tone Dumb Greg

  • Hero Member
  • *****
  • Online Online
  • Posts: 4929
    • Dartmoor Border Morris
Re: Multi-headed notes - 'correct style'
« Reply #1 on: September 11, 2019, 08:36:28 AM »

A very simple question about ABC 'style'.

I wish to code multiple notes on the same stem - duration (say) two default notes.

Using e and d as an example, do I do it like this: [e2d2] or like this: [ed]2?

Is there an 'approved style'? Does 'the body o' the kirk' have an opinion?

Thank you.

[ed]2 is more efficient-less typing and less memory- and therefore more elegant.
Mind you, I'm the man who forgot A/2 = A/ etc. This looks more like math than music.
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

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 828
  • Urmston, Lancashire, U.K.
Re: Multi-headed notes - 'correct style'
« Reply #2 on: September 11, 2019, 10:38:48 AM »

[ed]2 is more efficient-less typing and less memory- and therefore more elegant.
Mind you, I'm the man who forgot A/2 = A/ etc. This looks more like math than music.
Yes, that was what I thought too. Thanks for the input.

The question arises because working with what I call a 'legacy' file of ABC tunes, I like to 'normalise'(1)
the files to use a standard note length of L:1/8. If I convert an L:1/16 tune to L:1/8, the abc2abc
parser processes these two differently(2) - and under certain circumstances, one of them doesn't
play back correctly. I haven't sorted out exactly what is happening yet. More investigation needed.

(1)There's a good mathematical term for you! I do approach these ABC files to some extent as if they
were algebraic equations - it's easy sometimes to 'factorise' them and save a whole line of code. I actually do this
as a precursor to carrying out other fairly hefty processing of the ABC files, and it's 'good medicine' to standardise
the ABC as much as possible before doing this.

(2) I can't show the difference right now, I'm in the Library with no ABC files or program...
« Last Edit: September 11, 2019, 11:06:41 AM by Roger Hare »
Logged
For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.
My (large) ABC Tune Book is here.

Tone Dumb Greg

  • Hero Member
  • *****
  • Online Online
  • Posts: 4929
    • Dartmoor Border Morris
Re: Multi-headed notes - 'correct style'
« Reply #3 on: September 11, 2019, 11:08:22 AM »


Yes, that was what I thought too. Thanks for the input.

...if I have what I call a 'legacy' file of ABC tunes, I like to 'normalise'(1)
the files to use a standard note length of L:1/8.

I have always been told that good practice is to use the L: value that makes inputting the code easiest. I try to use the value that does this, whether it be 1/8, 1/16 or something different. Usually it depends on the most common note length. The option of choosing is available, why not use it?

Again, it's down to efficiency and file size. Mind you, I don't worry about that much.
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

Steve_freereeder

  • Content Manager
  • Hero Member
  • ***
  • Offline Offline
  • Posts: 7511
  • MAD is inevitable. Keep Calm and Carry On
    • Lizzie Dripping
Re: Multi-headed notes - 'correct style'
« Reply #4 on: September 11, 2019, 12:39:39 PM »


Yes, that was what I thought too. Thanks for the input.

...if I have what I call a 'legacy' file of ABC tunes, I like to 'normalise'(1)
the files to use a standard note length of L:1/8.

I have always been told that good practice is to use the L: value that makes inputting the code easiest. I try to use the value that does this, whether it be 1/8, 1/16 or something different. Usually it depends on the most common note length. The option of choosing is available, why not use it?

Again, it's down to efficiency and file size. Mind you, I don't worry about that much.
I agree with Greg on this one. For example, if a tune consists of a lot of semiquavers, I will use L:1/16 as the header note length. Using L:1/8 in this case would result in a lot of / / / / in the tune body. This adds to the line lengths in the ABC code. During the Buttrey MS transcriptions we were advised to minimise the line lengths as far as possible to optimise legibility for people viewing the file on mobile phones and tablets.
Logged
Steve
Sheffield, UK.
www.lizziedripping.org.uk

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 828
  • Urmston, Lancashire, U.K.
Re: Multi-headed notes - 'correct style'
« Reply #5 on: September 11, 2019, 02:16:44 PM »

(1) ...it's down to efficiency and file size. Mind you, I don't worry about that much....
(2) ...if a tune consists of a lot of semiquavers, I will use L:1/16 as the header note length. Using L:1/8 in this
case would result in a lot of / / / / in the tune body. This adds to the line lengths in the ABC code...
(3)...advised to minimise the line lengths as far as possible to optimise legibility for people viewing the file on
mobile phones and tablets....
Getting a little away from the question I posed, but it's part of the same 'problem' for me, and I need all
the sensible advice I can get, so here goes...

(1) I agree - size doesn't matter (:) ... particularly since memory is cheap and plentiful these days.

(2) Exactly the argument I used in my 'thought experiment' while thinking long and hard about this stuff.(a)
The other side of the same argument goes something like "If a tune consists of a lot of semiquavers and quite
a few quavers, I need to think about whether it is better to use L:1/16 and end up with lots of 2 2 2 in the
tune body, or to use L:1/8 and end up with a lot of / / /.".(b)  I 'need' to use a standardised ABC style, so
I might as well go for the default form...  :-\

Two equivalent (I hope!) lines of code:

[L:1/16] |: c2E2 c3 B | BAA^G A3 f- | f2g2 e3 f | e2f2 d4 |
[L:1/8]  |: cE c>B | B/A/A/^G/ A>f- | fg e>f | ef d2 |

In this random (honest!) example, the L:1/8 code is actually shorter than the L:1/16 example, (yes, I'm well
aware that this ain't always the case, but it sort of validates the argument for me). I'm sure that one of the
leading lights on this forum stated a while ago that they always used L:1/8, but I'm blowed if I can find the
post, though I've looked high and low for it...

(3) I'm ashamed to say that I never considered that one. In this case, my aim is to produce a 'standard' form
of ABC which is then processed for my current project (which incidentally is more or less guaranteed to double
the size of the ABC file ::)).

Thank you both for the input - it's all helping me develop my ideas of what constitutes the 'correct' style for
my own project.

(a) A perfect illustration of what a sad old git I really am...
(b) There are other computer-programmer style arguments here, but I don't intend to bore the pants off folks
more than I already am...
« Last Edit: September 11, 2019, 02:21:55 PM by Roger Hare »
Logged
For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.
My (large) ABC Tune Book is here.

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1041
  • 🇬🇧
Re: Multi-headed notes - 'correct style'
« Reply #6 on: September 11, 2019, 04:00:33 PM »

(b) There are other computer-programmer style arguments here, but I don't intend to bore the pants off folks
more than I already am...


I'm interested! Also, to play devil's advocate, consider, what if you didn't use > because you're targeting midis and you don't agree with the abc2midi developer's default implementation of this as 2:1 (triplets) and want to strong arm the 'correct' outcome? Suddenly you'll find yourself in this situation:
[L:1/16] |: c2E2 c3 B | BAA^G A3 f- | f2g2 e3 f | e2f2 d4 |
[L:1/8]  |: cE c>B | B/A/A/^G/ A>f- | fg e>f | ef d2 |
[L:1/8]  |: cE c3/2B/ | B/A/A/^G/ A3/2f/- | fg e3/2f/ | ef d2 |

Or perhaps you have to encourage use of the -RS flag to your end user? (per https://github.com/leesavide/abcmidi)

Also, to thricely answer the original question, [ABCDEF]2 is clearly superior to [A2B2C2D2E2F2]
Logged

Tone Dumb Greg

  • Hero Member
  • *****
  • Online Online
  • Posts: 4929
    • Dartmoor Border Morris
Re: Multi-headed notes - 'correct style'
« Reply #7 on: September 11, 2019, 04:17:16 PM »

Quote from: Roger Hare link=topic=24459.msg291331#msg291331
 
...In this random (honest!) example, the [font=courier
L:1/8[/font] code is actually shorter than the L:1/16 example, (yes, I'm well
aware that this ain't always the case, but it sort of validates the argument for me). ...

That is my point, really, sometimes 1/8 feels better, sometimes 1/16 does. For what it's worth, sometimes 1/4 does.

I don't actually care much about file size and the line can always be split, with a backslash, to make it shorter (I do this while coding anyway, to give myself space to display the ABC code, the score I am coding and the image of the score I am coding). However, for me, picking an appropriate L: value can make the file more readable and easier to code.
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

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 828
  • Urmston, Lancashire, U.K.
Re: Multi-headed notes - 'correct style'
« Reply #8 on: September 11, 2019, 08:07:26 PM »

That is my point, really, sometimes 1/8 feels better, sometimes 1/16 does. For what it's worth, sometimes 1/4 does.

I don't actually care much about file size and the line can always be split, with a backslash, to make it shorter (I do
this while coding anyway, to give myself space to display the ABC code, the score I am coding and the image of the
score I am coding). However, for me, picking an appropriate L: value can make the file more readable and easier to
code.
Absolutely! I hear what you are saying.

Briefly, I have a project to 'add value' to an ABC file. There are 2 components - the data (the ABC file) and the processor
(a computer program). The program needs 'good' data, hence the need to enforce more-or-less strict conventions on the
data file(1) eg: the standard length of a note (hence opting for the default L value of 1/8). Without 'good data', when summat
goes wrong, I don't know if it's the data or the program which is faulty. As it happens, I find files with a standard L:1/8
easier to read and assimilate than with L:1/16 or L:1/4 (one man's 'more readable and easier to code' is another man's
pain in the *rse, I guess - I, for my sins, am that other man (:)). The real nightmare is a tune file with different L values,
sometimes within the same tune... :o

It would be like feeding a ship design program written to accommodate metric units with a data file written in imperial
units. You'd get some very odd looking ships  ;D.

Thanks to you all for the input - I'm standing a little too close to the project, and need unbiassed advice from other folks,
so I can get a more objective feel for what I'm doing and for what conventions to apply to the input (ABC) file. All very
helpful so far! Thank you.

(1) It's a little difficult to do this with ABC as it's 'grammar' isn't as tightly defined as other 'languages' (eg: TeX, Postscript,
lilypond, etc.). This means that there can be different ways of doing the same thing - too many 'exceptions' in computing
terms. We were always taught "if you have to program in too many exceptions, you are doing it wrong", but if the data is
inherently riddled with exceptions, you are stuffed  :(. GC's example illustrates that point brilliantly - ie: it's even worse
than I make it out to be because we're dealing with an underlying suite of programs which all do different things...
« Last Edit: September 12, 2019, 06:37:17 AM by Roger Hare »
Logged
For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.
My (large) ABC Tune Book is here.
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