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: Right and wrong  (Read 516 times)

0 Members and 1 Guest are viewing this topic.

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3313
Right and wrong
« on: December 10, 2019, 09:19:35 PM »

In a recent post about a tune collection, a couple of side questions arose regarding the abc coding and the number of errors I found in the file I was working on. The largest number of errors I encountered were to do with incorrect abc syntax and mangled file headers, many of which caused MIDI playback of the tune to foul up, but there were also an odd few howlers which were straightforward musical nonsense.

There are 24 tunes in the 'disused' file which I have now started and I've already found a few proper
howlers that took some sorting. The file I edited was straight off the website, perhaps you downloaded
it some time ago or maybe found an older version elsewhere?

Ah! nice to see that I'm not alone - I have recently edited one or two large ABC files (one with
~2800 tunes!), and there are some things I've come across, which I can only describe as 'odd'.
As a musical newcomer (relatively speaking), I'm a little hesitant to go full-out and call this stuff
'wrong'. The problem is often (usually?) with the MIDI playback, which seems to fit in with your
experience - the score looks 'OK' and can be correctly interpreted by real musicians (like wot
I am not !), but abc2midi is much less forgiving ...

You are correct - I downloaded my copy of the file at least a year ago, maybe two.

I have identified 5 tunes in 'your' file which are not in 'mine', and I will look at them in due course
(also the 'disused' file), but meantime I have to modify one of my G/D programs for a C/G player
(of concertina) as I want to road-test the program on a real user.

Interesting to compare the different interpretation of the same file by two people. For example,
I have changed default instrument to 'Tango Accordion' (because it sounds most like a concertina),
and have Flute and Fiddle for voice 2 and voice 3 in multi-voice tunes.

The first thing I should make clear is that I approach transcriptions for The Village Music Project very differently to most other musical projects I work on. VMP work is about historical accuracy and commenting on things that don't seem quite right rather than 'correcting' them, leaving it to the user of the file to decide what is best to do with the music before them.

Working with other music I tend to be rather more arbitrary, because although I'm happy to share it with anyone who is interested, it is primarily for my own consumption. I do however accept that if I make a file freely available in the public domain, the consumer is at liberty to edit and rearrange the file as they see fit. Most of the 'corrections' I make to an existing abc tune enable it to be played back correctly via a MIDI player. The additions I make are generally to format the notation for printing in a manner I find pleasing and legible and are very much a matter of personal taste.




Logged
Squeezing on the Isle of Oxney, UK
Primo D/G, Albrecht Custom Liliput D/G
Hohner B/E, B/C, C/F, Bb/Eb G/C/F
Liliputs D/G G scale, C/F, Bb/Eb

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 518
  • Urmston, Lancs., U.K.
Re: Right and wrong
« Reply #1 on: December 11, 2019, 06:24:00 AM »

In a recent post about a tune collection, a couple
    of side questions arose regarding the abc coding and the number of errors I found in the file I was working
    on. The largest number of errors I encountered were to do with incorrect abc syntax and mangled file headers,
    many of which caused MIDI playback of the tune to foul up, but there were also an odd few howlers which
    were straightforward musical nonsense...Most of the 'corrections' I make to an existing abc tune enable it to
    be played back correctly via a MIDI player. The additions I make are generally to format the notation for printing
    in a manner I find pleasing and legible and are very much a matter of personal taste.


Thank you Pete.

I agree 101% with everything you say in your post, particularly in respect of the 'archival' approach
to coding stuff for the VMP (though CP lets me 'get away' with a few departures from VMP SOPs).

Editing these 'legacy' files (which is what the original thread was related to) is a bit of a labour of
love, but my limited experience has led me to believe that there are sometimes gems in there which
may well not be found elsewhere, so it's 'worth it'...

Different folks have a different approach to this problem of editing (or correcting, cleaning-up, w.h.y)
these files. A few examples of what I do:

I find there are two types of file - I call them 'corrupted' and 'fragmented'. The 'corrupted' files contain
stuff like (for example) A2.999999999993/1.9999999999997B/1.9999999999997 where clearly A3/2B/2
has been corrupted. It's often not as clear as that, and unless it's obvious how to fix it, I will usually
(reluctantly) delete the tune from the file. Life's too short...

I don't know how it happens (I find it difficult to accept the idea that the original transcriber did it on
purpose), but the 'fragmented' files contain perfectly valid ABC code, but broken up in a strange way. For
instance, the example cited above might be coded across two lines, thus:

A3/
2B/2


or, several bars-worth of music is strung together withminimal 'punctuation' (bar lines):

"D"F>ED3/d/(3BdB(3ABAG>BA>FE/E/EE|"A7"AF>ED3/d/(3BdB(3ABAG>B A3"D"/2F/D/D/DD|"A7" A
(note the single bar-line, the accompaniment chord within the A3/2, and the end of line  broken bar).

I will usually try and 'repair' such a tune.

Other  things I do (the first two are a bit radical):

'Normalise' all tunes to a default note length of L:1/8. This does lead in some cases to a slight increase in
the size of the file (surprisingly often, it leads to a decrease in the size of the file). It does means that A2
always stands for a crotchet, B always stands for a quaver, etc... I find this very helpful.

Introduce 'white space' between all musical 'objects' where there would be white space in the printed score.
I find this improves readability and comprehensibility to such an extent that without it, I simply wouldn't
be able to use ABC (it is this departure from VMP SOPs which CP allows me to 'get away' with). It doesn't
actually increase the size of a file bya ll that much - remember - a lot of ABC files use more space for
the headers than for the actual music. In any case, a couple of the edits below will save some space...

Remove/delete/correct obsolescent/deprecated ABC code, eg: end-of line !; instructions within +...+ +fine+
becomes !fine!; chords within +...+  +ABc+ becomes [ABc]; removal of E:; removal of unnecessary empty
or 'content-free' fields, eg: N:Tune infos, etc.

Re-cast some constructs in a shorter form (thus saving space). For example A3/2B/2 becomes A>B and A2>B2
becomes A3 B, etc.

Fix some clear errors. A favorite is using a slur when a tie is meant, eg: (A A) should be A- A. These look fine
in the printed score but can muck up MIDI playback.

Explicitly specify start/end repeats and start/end 1st/2nd play, ie: |:...:|, |:...|1...:|2...|]. Again these
can look OK in the printed score, or can be correctly interpreted by competent musicians, but the can muck up MIDI
playback if not correctly specified.

Carefully edit out unnecessary use of [ and ], for example, they are not required in 1st/2nd play; in |[1...:|[2...|],
they are unnecessary (*I have 'private' reasons for this one).

The previous two need careful application to the case of multi-voice tunes. Sometimes, start/end repeats are not
specified in 2nd and subsequent voices in order to avoid the appearance of multiple Volta brackets in 2nd and
subsequent voices. Again, this looks OK but doesn't play back correctly. The repeats need to be specified in full
and the extraneous Volta brackets suppressed with a %%score 1|2 directive.

Fix text annotations which are presented as if they were accompaniment chords. Thus "Text" becomes "^Text"...

Go for a 'default' nominal line length of 4 bars/measures (as per VMP standard). This sometimes leads to a
line length in terms of characters which is 'too long', but the edit window in EasyABC (my preferred software)
is ~116 characters wide, so it doesn't happen often. When it does, I accept this and the subsequent
slight inconvenience of occasionally having to do a horizontal scroll...

Moving W: fields to the correct position after the tune code.

And so on, and on, and on...

I will always insert a comment line:
%A lightly edited tune from...
immediately after the title line to make it clear to subsequent users that the tune/file has been edited by me.

That's the way I do it. Pete does it differently (cha├žun a son gout  8)).

The effect can be to produce two completely different looking tune files - which sound exactly the same.
This is true of my edit and of Pete's edit of the tune collection which sparked this discussion.

Which brings us back to Pete's starting title for this spin-off thread - there are surely different ways to do
stuff, and I for one am not going to stick my neck out and say something is right or wrong - except when I'm
right, of course  :D ...

[* My 'private' reasons are to do with preparing robust, well-structured ABC code as test data for a couple of programming projects I have in hand.]



« Last Edit: December 12, 2019, 06:04:29 AM by Roger Hare »
Logged
Roger Hare, Urmston, Lancs., U.K. (rjhare at outlook dot com)   Manchester Morris Men   Beech Band
Music Packages (ABC/PDF/MIDI)    Thompson's Compleat Tutor for Fife (c.1765)

smiley

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 739
  • Folk music: it's not as bad as it sounds
    • a few sound clips
Re: Right and wrong
« Reply #2 on: December 11, 2019, 08:02:40 AM »

I was going to reuse some abc transcriptions that I'd done 4 or 5 years ago, but over that time I've been refining (perhaps even improving?) my formatting etc.
In the end I'd mucked around so much with the old abc code that it might've been quicker to just start from scratch again.

Its a bit embarrassing to see the outright errors and clunky formatting in some of the music that I'd given out at workshops years ago.
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 518
  • Urmston, Lancs., U.K.
Re: Right and wrong
« Reply #3 on: December 11, 2019, 08:44:37 AM »

...Its a bit embarrassing to see the outright errors and clunky formatting in some of the music that I'd given out
at workshops years ago.

Moi aussi! But, it's simply part of the 'learning process'. When the Fortran programming language was introduced
in mumble-mumble, that new species 'programmers' had to learn to use the language 'properly'. It took years and
years, and ultimately resulted in a language which looks somewhat different today than it did in the 1960s (but
which is 'backward compatible'). The same is true of of ABC - both the language, and its users. As I said, Moi aussi!
Logged
Roger Hare, Urmston, Lancs., U.K. (rjhare at outlook dot com)   Manchester Morris Men   Beech Band
Music Packages (ABC/PDF/MIDI)    Thompson's Compleat Tutor for Fife (c.1765)

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 579
  • 🇬🇧
Re: Right and wrong
« Reply #4 on: December 11, 2019, 06:05:34 PM »

I find there are two types of file - I call them 'corrupted' and 'fragmented'. The 'corrupted' files contain
stuff like (for example) A2.999999999993/1.9999999999997B/1.9999999999997 where clearly A3/2B/2
has been corrupted. It's often not as clear as that, and unless it's obvious how to fix it, I will usually
(reluctantly) delete the tune from the file. Life's too short...

Hahaha, so that's really kinda funny to me. For some reason the numbers have been converted to floating point style numbers by a computer (likely at someone's mistaken instruction).Unfortunately, and somewhat surprisingly, these struggle to precisely represent whole numbers, such as 2. The fact that got saved back to text is really quite ridiculous - I don't think ABC uses floats for anything?

That might be quite fixable though. The worst would probably be if there are exponents (eg +e##) mixed in as well, but, still. If you ever come across a tune or ideally a large file with a lot of this kind of damage, shoot me a message, as it would tickle me pink to fix it.
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 518
  • Urmston, Lancs., U.K.
Re: Right and wrong
« Reply #5 on: December 11, 2019, 06:32:08 PM »

...For some reason the numbers have been converted to floating point style numbers by a computer...worst
would probably be if there are exponents (eg +e##) mixed in as well, but, still. If you ever come across a
tune or ideally a large file with a lot of this kind of damage, shoot me a message, as it would tickle me pink
to fix it.
Aye, I recognised the FP format - basically, they were in Fw.d format. I can't remember now if there were any
Ew.d formatted numbers in there (to use Fortran descriptors). And, of course, I can't find the file now! If I find
it, or come across another, I'll send it along  (:) ...

R
Logged
Roger Hare, Urmston, Lancs., U.K. (rjhare at outlook dot com)   Manchester Morris Men   Beech Band
Music Packages (ABC/PDF/MIDI)    Thompson's Compleat Tutor for Fife (c.1765)

Pete Dunk

  • Typo Expert
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3313
Re: Right and wrong
« Reply #6 on: December 14, 2019, 12:06:57 PM »

Which brings us back to Pete's starting title for this spin-off thread - there are surely different ways to do
stuff, and I for one am not going to stick my neck out and say something is right or wrong - except when I'm
right, of course  :D ...

I found lots of redundant divisors (A/2 instead of A/) and a couple of really bizarre examples like B7/2 when 3 1/2 default note lengths were required which can only be written with two notes tied together: B4-B3. When I encounter that kind of gibberish I have no problem saying that it is wrong!

This kind of thing was very common:
"A7"c3d c2B2 | A2g2 f2e2 |[1 "D"d2de f2fg | "(A7)"a6 :|[2 "D"d2fd "A7"Acec | "D"d6 :|
Redundant square brackets are bad enough but a repeat sign at the end of a second time ending?

I found lots of slurs (A2|A) when ties A2-|A were intended.

I very commonly use 1/8 as my default note length but not universally by any means. If a tune is written largely in crotchets I see little point in appending lots of 2s to notes. The same applies to busy tunes with bar after bar of semiquavers, L:1/16 makes a lot of sense in that case. I'm quite happy to keep changing the value of L: in pieces with a lot of variations in order to keep the coding length to a minimum but that too is very much a personal quirk, I have a thing about keeping files as small and compact as possible without being ridiculous (I hope!)

I too use "^text" to print anything above the stave, largely because of my prolific use of V:1 gchord=down which may cause text to appear beneath the music.

I don't stick slavishly to 4 bars per line unless it's for VMP or I know that I'll be viewing the music in Tunebook SD on an iPad. The only reason I use it then is because Tunebook has a limited ABC vocabulary and doesn't recognise :: in the middle of a line of code, and some inline commands like [P:B] are ignored too. Otherwise for a tune with two repeated 8 bar parts I tend to use:
|:5 bars
3 bars::2 bars
6 bars:]
A and B parts often have a pick-up part bar, so the lines music are of similar length. (Picky!)

For some tunes I create a completely seperate file purely for midi output. These are mainly for the benefit of ear players in the morris side so that the playback is 'as usually played' without some of the hiccups that commonly appear in repeated sections with pick-up bars, and corner dances with an ABBB pattern. This way they can play along to the whole thing without it messing up. I also open the midi file with a proper editor, assign voices to the parts (chords have two seperate voices, fundamental and chord), mix the volumes so the melody is clear and adjust the stereo pans to give it a bit of width. Then I use a file converter to make an mp3 from the midi file, open that with Audacity, normalise it to get the best playback volume and add a touch of reverb for warmth. The results are quite pleasing, if a little wooden.

I don't generally add any comments to the effect that I've edited a file if I've just done a tidying up job on something downloaded from the net. I don't usually bother adding a Z: field to my own files any more either unless it's for the VMP. People can and will remove Z: fields if you make the file available on the www so why waste your time?

Many of the edits I do in abc files are 'tidying up', removing the unnecessary and observing the niceties because they are a bit sloppy rather than 'wrong'. If the object of the exercise is to produce sheet music then (E2|E) will look exactly the same as E2-|E on the page, job done. It doesn't play back properly in midi though and in this case syntax matters and I like a file to fulfill all of it's functions correctly and would edit it accordingly. E7/ on the other hand is just musically incoherent and impossible to resolve, sorting that out can only be classed as a correction not an edit. The same applies to repeat marks at the end of a |2 section, wrong, wrong, wrong! Much of this is personal opinion of couse but every so often a law is broken!  :|glug

Edit: Typo.
 
« Last Edit: December 14, 2019, 11:50:10 PM by Pete Dunk »
Logged
Squeezing on the Isle of Oxney, UK
Primo D/G, Albrecht Custom Liliput D/G
Hohner B/E, B/C, C/F, Bb/Eb G/C/F
Liliputs D/G G scale, C/F, Bb/Eb

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 518
  • Urmston, Lancs., U.K.
Re: Right and wrong
« Reply #7 on: December 15, 2019, 11:51:48 AM »


I found lots of redundant divisors (A/2 instead of A/)...Much of this is personal opinion of couse but
every so often a law is broken! 
Clearly, to a very large extent, we are singing from the same edition of 'Hymns Ancient and Modern'.

Some brief comments/observations:

I wonder if different pieces of ABC software sometimes produce different output from the same input?
Probably yes?

I had an attack of the vapours when I saw that 7/2 thing for the first time. I like your solution - thank
you. However, I'm curious - I'm gonna ask a professional orchestral player whether the notation produced
in the score by that particular (peculiar?) construct is 'acceptable' to a pro'.

That 'repeat at the end of a 1st/2nd play' thing works when the whole thing is played a 2nd time, thus:
|1,3...:|2,4...:| and |1,2...:|3,4...:| and |1,4...:|2,3...:| all seem to work 'as expected' - but not if the
closing :| is omitted. Odd? More investigation? Is it software-dependent - I use EasyABC?

I don't think it's 'picky' to get those pick-ups correct. If they are wrong, it mucks up the playback. I'm
pretty ruthless about getting that 'right', even if it means stuffing in the odd half-note rest occasionally...

It is indeed a 'tidying up' operation, very much directed by personal taste. It's good when differing personal
tastes result in simple, robust ABC code which sounds the same, and looks the same on the printed page -
even when the ABC code looks very different.

Your edited version of that Northern Roots file is a good example - it served as the first truly 'independent'
test file for one of my programs - it needed only 2 simple global edits to get it to work properly - 111 tunes
processed in 0.38 seconds...

It keeps us out of the public houses, I suppose... (:)
Logged
Roger Hare, Urmston, Lancs., U.K. (rjhare at outlook dot com)   Manchester Morris Men   Beech Band
Music Packages (ABC/PDF/MIDI)    Thompson's Compleat Tutor for Fife (c.1765)

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 579
  • 🇬🇧
Re: Right and wrong
« Reply #8 on: December 15, 2019, 07:50:16 PM »

A very large number of 'abc programs' (EasyABC/ABC Explorer etc) actually outsource the process of rendering and playing ABC notation to all the same set of smaller programs (abc2midi, abc2ps, etc). Some version or another of these is usually to be found in the program folder, so, you may find that really it is the version of these smaller programs that is making the difference.
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 518
  • Urmston, Lancs., U.K.
Re: Right and wrong
« Reply #9 on: December 16, 2019, 06:52:11 AM »

A very large number of 'abc programs' (EasyABC/ABC Explorer etc) actually outsource the process of rendering
and playing ABC notation to all the same set of smaller programs (abc2midi, abc2ps, etc). Some version or
another of these is usually to be found in the program folder, so, you may find that really it is the version of these
smaller programs that is making the difference.
Good point! When I said "I wonder if different pieces of ABC software sometimes produce different
output from the same input?
", I was thinking of the pantechnicon 'front-ends' (EasyABC, ABCExplorer,
ABCEdit, etc.) which give access to the underlying abc2midi, etc.

I hadn't thought it through and considered those underlying copies of abc2midi etc. I guess that in the
worst case, each program such as EasyABC will have it's own copies of abc2midi, etc., and each of those
could be a different version...

Perhaps I should do some checking... :-\
Logged
Roger Hare, Urmston, Lancs., U.K. (rjhare at outlook dot com)   Manchester Morris Men   Beech Band
Music Packages (ABC/PDF/MIDI)    Thompson's Compleat Tutor for Fife (c.1765)
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