Lyrics & Knowledge Personal Pages Record Shop Auction Links Radio & Media Kids Membership Help
The Mudcat Cafemuddy

Post to this Thread - Sort Descending - Printer Friendly - Home


Tech: ABC Transposing Tool

DrugCrazed 31 Jul 13 - 06:40 AM
GUEST 31 Jul 13 - 07:02 AM
GUEST,PeterC 31 Jul 13 - 07:13 AM
GUEST 31 Jul 13 - 07:36 AM
pavane 31 Jul 13 - 05:06 PM
DrugCrazed 31 Jul 13 - 06:45 PM
GUEST,Grishka 01 Aug 13 - 05:33 AM
DrugCrazed 02 Aug 13 - 06:28 AM
Jack Campin 02 Aug 13 - 08:04 AM
GUEST,Grishka 03 Aug 13 - 04:10 AM
pavane 03 Aug 13 - 01:19 PM
pavane 04 Aug 13 - 12:17 PM
Artful Codger 04 Aug 13 - 05:37 PM
Artful Codger 04 Aug 13 - 05:50 PM
Jack Campin 04 Aug 13 - 07:23 PM
pavane 05 Aug 13 - 09:42 AM
DrugCrazed 05 Aug 13 - 10:14 AM
GUEST,Grishka 12 Aug 13 - 02:02 PM
Share Thread
more
Lyrics & Knowledge Search [Advanced]
DT  Forum
Sort (Forum) by:relevance date
DT Lyrics:





Subject: Tech: ABC Transposing Tool
From: DrugCrazed
Date: 31 Jul 13 - 06:40 AM

Hello all,

I've been very (very) bored over the past two days so I wrote a script to help with the transposition of abc files for those who aren't using abc explorer (or any other tool that gives you an easy transpose).

It is probably broken, but it looked about right.

It's available from GitHub. Just download it, unzip it and have a play.

Currently I haven't got a decent installer working - the file you need to run is in the src directory

All you need is python, and then it's easy to use.

python abc-transpose -u 2 /path/to/input /path/to/output
python abc-transpose -d 2 /path/to/input /path/to/output

The first will tranpose up two semitones (so D to E) and the second will tranpose down two semitones (E to D). There's other options as well:

python abc-transpose -d 2 -n 2 /path/to/input /path/to/output

This one will only transpose the tune with header X:2 (but copy everything else across). Any questions, give us a shout. I'll work on an easier way of using this for the less computer literate.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: GUEST
Date: 31 Jul 13 - 07:02 AM

Or just go here...

mandolintab.net/abcconverter.php


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: GUEST,PeterC
Date: 31 Jul 13 - 07:13 AM

Why not use ABCMus? It will transpose with 99% accuracy, and even add chords! Mind I do not always agree with their chords, but it is a start!


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: GUEST
Date: 31 Jul 13 - 07:36 AM

EasyABC also does a good job


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: pavane
Date: 31 Jul 13 - 05:06 PM

So does my program HARMONY - also adds chords AND accompaniment. For Windows only though


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: DrugCrazed
Date: 31 Jul 13 - 06:45 PM

Indeed - this was basically me being very bored and needing something to do while I had no internet. Hell, I don't even need it for the moment.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: GUEST,Grishka
Date: 01 Aug 13 - 05:33 AM

DC, did you test your software with tunes in "distant" keys, such as Db major? Using additional accidentals and "naturals"? Preferably as soberly as possible?

The ordinary ABC tool for the purpose is "abc2abc", found in the ABCMidi package. It basically works correctly, but has some "issues" related to the ABC standard, and some idiosyncracies of the ABCMidi family. EasyABC may be the best bet currently.

DC, the ABC community certainly has some demand for "bored" but dedicated sober Python programmers. You can study the existing ABC↔MusicXML tools for inspiration.

A new and "final" ABC standard has been announced long ago, but I am not convinced that those in power are seriously working on it. Mudcatters should occasionally utter their continuing interest, particularly for software based on firm ground.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: DrugCrazed
Date: 02 Aug 13 - 06:28 AM

Done a bit of an update. Someone's pointed out that I made a boo-boo. Have fun!

Latest version (0.4)


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: Jack Campin
Date: 02 Aug 13 - 08:04 AM

Unfortunately HARMONY adds a horrendous amount of non-standard clutter to ABC headers. You're quite likely to find that other programs can't read its output without manual editing.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: GUEST,Grishka
Date: 03 Aug 13 - 04:10 AM

DC, transposition of notation is no rocket science, but takes a lot more thinking and/or Internet research than, say, transposing a MIDI file. Although I do not really know the Python language, I can see at a first glance that you have not even started analyzing the problem, whose solution is well known.

The design of ABC adds some complication, being optimized for different tasks. You can use the nifty tool abc2xml.py as a model.

When you have convinced yourself thoroughly that your tool works correctly for all legal ABC tunes in all legal key signatures, possibly with accidentals directly at the notes, you can submit your it to Chris Walshaw's list.

If you want to abuse Mudcatters for testers, note that our willingness is naturally limited, so use it economically.

You seem to be quite young, not only by Mudcat standards, so you can learn a lot if you start now. Boredom is for the very unfortunate persons who are severely disabled.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: pavane
Date: 03 Aug 13 - 01:19 PM

Jack, if you give me details, I will look at it. I tried to keep everything in line with abc standards


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: pavane
Date: 04 Aug 13 - 12:17 PM

Transposing is a surprisingly complex function, when you need to take into account accidentals, the key signature, and the implied accidentals within a bar. As I understand it, in classical notation, once you have applied an accidental, this is also applied to following instances of that note in a bar, until cancelled by a natural. This applies to ALL voices!


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: Artful Codger
Date: 04 Aug 13 - 05:37 PM

Actually, each contrapuntal voice/part must be tracked independently, and the alteration applies only to the specific pitch (staff line or space), not to similar pitches in other octaves. By implication, the bass and treble staves of a piano score remain independent, though the contrapuntal rule applies to different melodic lines on the same staff (normally indicated by separated stem directions and beams). I don't know what the rule is when a line crosses from a bass to treble staff, but for clarity I'd either use explicit or reminder (parenthesized) accidentals after the crossing.

Sadly, the ABC standard doesn't provide a good way to notate reminder accidentals, but I'll stop with that observation before I digress too far off-topic.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: Artful Codger
Date: 04 Aug 13 - 05:50 PM

I should add that my reference for the handling of accidentals was Music Notation: A Manual of Modern Practice by Gardner Read.

To make matters worse, different rules apply to early music and to modern atonal music. I'm aware of three other conventions:
1) No propagation (memory/stickiness) of accidentals.
2) Limited propagation, but the ending extent isn't specified.
3) An accidental extends to all octaves, not just the given pitch.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: Jack Campin
Date: 04 Aug 13 - 07:23 PM

I'm off to Scarborough in the morning - more in a week or so, maybe. The most serious problem with HARMONY's output is adding an unnecessary voice declaration. And you don't need comments "explaining" what the ABC header lines mean. As far as I can recall the tune body itself is usually converted well.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: pavane
Date: 05 Aug 13 - 09:42 AM

Artful Codger,
Thanks for the clarification. I will check what HARMONY does. I am here to make improvements if required.
You are probably aware that abc is not HARMONY's native format, and abc files have to be imported and exported. This transformation cannot reproduce exactly what was imported, as new items (voices, chords) etc may have been added.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: DrugCrazed
Date: 05 Aug 13 - 10:14 AM

"As I understand it, in classical notation, once you have applied an accidental, this is also applied to following instances of that note in a bar, until cancelled by a natural"

That's actually something that the transposition shouldn't care about. All I care about is changing the letters that you've given me. abc handles the rest.

"Boredom is for the very unfortunate persons who are severely disabled."

Boredom means you need something to do. This was something. I did it.

And don't worry, once it actually reaches v1 I'll submit it somewhere. Currently it's 0.4.3 until I'm confident that I've got all of it.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ABC Transposing Tool
From: GUEST,Grishka
Date: 12 Aug 13 - 02:02 PM

That's actually something that the transposition shouldn't care about.
Absolutely right.

All I care about is changing the letters that you've given me. abc handles the rest.
Quite erroneous. Dealing with accidentals and key signatures is not all that easy. Musicians know how to do it correctly, but programmers must translate it into algorithms.

Boredom means you need something to do. This was something. I did it.
It is preferable to do things because you really want to do them. Exploring one's own wishes is another task that is sometimes underestimated.

... until I'm confident that I've got all of it.
Well said. Best of success!


Post - Top - Home - Printer Friendly - Translate
  Share Thread:
More...

Reply to Thread
Subject:  Help
From:
Preview   Automatic Linebreaks   Make a link ("blue clicky")


Mudcat time: 21 September 12:58 AM EDT

[ Home ]

All original material is copyright © 1998 by the Mudcat Café Music Foundation, Inc. All photos, music, images, etc. are copyright © by their rightful owners. Every effort is taken to attribute appropriate copyright to images, content, music, etc. We are not a copyright resource.