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: Spaces in ABC  (Read 2086 times)

0 Members and 1 Guest are viewing this topic.

Richard Shaul

  • Good talker
  • **
  • Offline Offline
  • Posts: 92
Spaces in ABC
« on: January 11, 2020, 04:08:08 PM »

Easy ABC seems to be fairly forgiving as to where you use spaces, but is there any best practice e.g. before or after bar likes or chords?
Logged

Steve_freereeder

  • Content Manager
  • Hero Member
  • ***
  • Offline Offline
  • Posts: 7511
  • MAD is inevitable. Keep Calm and Carry On
    • Lizzie Dripping
Re: Spaces in ABC
« Reply #1 on: January 11, 2020, 04:46:16 PM »

Some people like to put spaces in, others don't. The ABC works whichever you choose.
ABC is just another form of music notation, so whichever method makes the notation clearer for you and your users is the one to go for.
Logged
Steve
Sheffield, UK.
www.lizziedripping.org.uk

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3706
Re: Spaces in ABC
« Reply #2 on: January 11, 2020, 07:50:19 PM »

The functional spaces are those that group quavers and smaller notes together with beams, these are the only important ones because they affect the way music is displayed on the page. The rest are optional and a matter of personal taste as Steve has already said.
Logged
Squeezing on the Isle of Oxney, UK
Primo (Serenellini) D/G
Isis D/G
Hohner B/E, G/C, C/F, Bb/Eb G/C/F
Liliputs D/G (G scale), C/F, Bb/Eb, Albrecht Custom D/G (G scale)

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Spaces in ABC
« Reply #3 on: January 12, 2020, 07:47:36 AM »

Easy ABC seems to be fairly forgiving as to where you use spaces, but is there any best practice
e.g. before or after bar likes or chords?
I too am an EasyABC user.

I'm a firm believer in using spaces wherever 'necessary'. 'Best practice' IMO is using spaces to
improve the readability, comprehensibilty and maintainability of the ABC files. This can mean
including as many spaces as the market will bear - but not always...

'Maintainability' can be important when looking at old, 'legacy' ABC files - the spaces make it easier
to spot and fix errors (which may be due to coding errors, or corruption/fragmentation of the file).
A program to spot the grosser errors is a good thing, but 'A1 eyeball' is best -  the spaces help
to spot those errors.

All of this is very much a computer programmer's view.

I've seen it said that too many spaces increases file size unacceptably. I just did a 'quick and dirty'
conversion of a file from 'nospaces' to 'spaces' and the increase in size was marginally greater than
10%. Personally, I think that the advantage in increased readability outweighs the disadvantage of
increased file size.

Chacun à son goût... 8)
« Last Edit: January 12, 2020, 08:00:29 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: Spaces in ABC
« Reply #4 on: January 12, 2020, 08:59:33 AM »

The file size argument is ridiculous. ABC is by far the most compact way of representing music in a computer file and a few extra spaces don't change that.

I like to put spaces around bar lines and sometimes in the middle of a bar (e.g. between beats 2 and 3 of  a 4/4). I also try to keep lines below 80 characters wide by  breaking lines with '\' where necessary, but I'm definitely an "old school" programmer.
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: Spaces in ABC
« Reply #5 on: January 12, 2020, 10:54:53 AM »

(1) The file size argument is ridiculous...
(2) ABC is by far the most compact way of representing music in a computer file...
(3) I like to put spaces around bar lines and sometimes in the middle of a bar
(e.g. between beats 2 and 3 of  a 4/4)...
(1) I completely agree...
(2) Yup! About 2 years ago, I did a 'rough and ready' comparison of file sizes for ABC and
and lilypond representations of the same tune. For simple tunes, lilypond files were ~5 times
larger than the equivalent ABC files. (At the time, you said: "...It is much more verbose than ABC...")
(3) I didn't phrase it quite as compactly as you have(!), but that's what the approach I'm using
effectively boils down to...
« Last Edit: January 12, 2020, 11:10:04 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.
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